8bit alpha transparency with Interiors
by Jeff Gran · in · 05/24/2005 (6:44 pm) · 12 replies
We have implemented the translucent details resource in our game. Before merging the lighting pack, it was working great. Since merging the lighting pack, I have noticed that my translucent PNGs get "clipped" -- so to say -- to 1 bit (on or off only, no blending) transparency, instead of the 8 bit translucency that's actually in the image. Any idea why this would be happening?
#2
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4648
this pathed-interiors resource also includes the transparency code... not sure if it's the same as the above or if it has any bug fixes:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4980
05/25/2005 (11:31 am)
The original resource:www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4648
this pathed-interiors resource also includes the transparency code... not sure if it's the same as the above or if it has any bug fixes:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4980
#3
You might want to double check the transparent interior resource code to make sure it's all in the correct spot, you can also try commenting out the interiorTrans rendering code to make sure the transparent surfaces aren't being rendered twice.
05/25/2005 (2:03 pm)
All of the rendering code for the transparent surfaces are handled in interiorTrans, which is a custom class created for the resource, so the Lighting Pack doesn't alter that code. The Lighting Pack doesn't change the PNG support or transparency code either (DTS transparency work great).You might want to double check the transparent interior resource code to make sure it's all in the correct spot, you can also try commenting out the interiorTrans rendering code to make sure the transparent surfaces aren't being rendered twice.
#4
Maybe if you can find where these lighting options are you can enable transparent interiors.
05/25/2005 (10:36 pm)
I noticed this printout in my console.Quote:
Synapse Gaming Lighting Pack for TGE - 1.3.2.0
Lighting Pack Core version: 2.0
Based on Torque version: 1.3
Compiled lighting options:
SG_LIGHTING - enabled
SG_USE_TERRAIN_COLOR_CORRECTION - enabled
SG_STATIC_LIGHT_SHADOWS_BLUR - enabled
SG_TRANSPARENT_INTERIORS - disabled
SG_ADVANCED_INTERIOR_LIGHTING - enabled
SG_ADVANCED_DYNAMIC_SHADOWS - enabled
SG_ADVANCED_DTS_DYNAMIC_LIGHTING - enabled
SG_ADVANCED_PARTICLE_LIGHTING - enabled
SG_OVEREXPOSED_SELFILLUMINATION - enabled
Maybe if you can find where these lighting options are you can enable transparent interiors.
#5
The macro to enable basic transparent textures on interiors is named SG_TRANSPARENT_INTERIORS and is located in sgLighting.h, but the code Jeff is using performs depth sorting by using a new object named interiorTrans, which has its own rendering code that the Lighting Pack doesn't change.
But this brings up an interesting point...
Jeff,
Did you try to add the Lighting Pack interior rendering calls into the interiorTrans object? That could be the cause of your problem, in which case Brandon is right - try enabling the Lighting Pack's transparent interior code.
-John
05/26/2005 (1:05 am)
Hi Brandon,The macro to enable basic transparent textures on interiors is named SG_TRANSPARENT_INTERIORS and is located in sgLighting.h, but the code Jeff is using performs depth sorting by using a new object named interiorTrans, which has its own rendering code that the Lighting Pack doesn't change.
But this brings up an interesting point...
Jeff,
Did you try to add the Lighting Pack interior rendering calls into the interiorTrans object? That could be the cause of your problem, in which case Brandon is right - try enabling the Lighting Pack's transparent interior code.
-John
#6
Hmm. Again, I'm just an artist, so I'm slow to pick up on these things... so are you saying that the SG_TRANSPARENT_INTERIORS code would enable transparent textures, without using the code from that resource? Or do they both need to work together?
Thanks as always for your help!
06/02/2005 (11:37 am)
John,Hmm. Again, I'm just an artist, so I'm slow to pick up on these things... so are you saying that the SG_TRANSPARENT_INTERIORS code would enable transparent textures, without using the code from that resource? Or do they both need to work together?
Thanks as always for your help!
#7
You need both - the Lighting Pack provides support for transparent interior surfaces, this allows you to add in your own depth sorting technique, or one from a resource, without having to change the rendering pipeline.
-John
06/02/2005 (4:31 pm)
Hi Jeff,You need both - the Lighting Pack provides support for transparent interior surfaces, this allows you to add in your own depth sorting technique, or one from a resource, without having to change the rendering pipeline.
-John
#8
Have anyone here succeeded implementing a translucent interiors resource with the lighting kit?
09/14/2005 (8:04 am)
John, have you ever tried one of the translucent interiors resources available? Do you recomend one to use with TLK?Have anyone here succeeded implementing a translucent interiors resource with the lighting kit?
#9
I recommend this one:
Alpha-Transparency support for Interiors
Though it's a heavyweight approach to alpha sorting, it handles sorting (some of the transparency resources don't) and handles rendering separate from the interior rendering code, which means the TLK and resource code is completely separate and doesn't affect each other.
If you have any questions while adding the resource, just ask (in the TLK private forums) and I'll be happy to help out,
-John
09/14/2005 (8:18 am)
Hi Adib,I recommend this one:
Alpha-Transparency support for Interiors
Though it's a heavyweight approach to alpha sorting, it handles sorting (some of the transparency resources don't) and handles rendering separate from the interior rendering code, which means the TLK and resource code is completely separate and doesn't affect each other.
If you have any questions while adding the resource, just ask (in the TLK private forums) and I'll be happy to help out,
-John
#10
Thanks for the quick response, I'll give this one a try and keep you posted.
Cheers
09/14/2005 (8:22 am)
Wow, the man is online!Thanks for the quick response, I'll give this one a try and keep you posted.
Cheers
#11
There's just one thing: trans brushes aren't affected by lighting, static or dynamic (probably because they're entities).
Maybe later (at the polishment phase) I try to figure it out.
EDIT: by "lighting" I mean TLK lights. I don't use Hammer lights.
09/28/2005 (11:39 pm)
Last but not least, I applied the resource. It works perfect. There's just one thing: trans brushes aren't affected by lighting, static or dynamic (probably because they're entities).
Maybe later (at the polishment phase) I try to figure it out.
EDIT: by "lighting" I mean TLK lights. I don't use Hammer lights.
#12
-John
10/02/2005 (3:08 pm)
It sounds like the resource code is not using the interior's light maps. I'll look into it, but any resolution needs to be posted in the TLK Private forums.-John
Torque Owner John Kabus (BobTheCBuilder)
What is the translucent details resource?
-John