Plan for transparency in interiors
by Tom Spilman · in Torque Game Engine Advanced · 12/28/2004 (3:10 pm) · 14 replies
We're going to need transparency for simple windows and catwalks in our interiors in the next few months. What is the GG plan for this... if any? I've seen Brian mention it's not supported (kinda sounded like never supported), but seen a few different resources including one posted by Tim on how to add them to the TGE. These resources are not perfect, but the bugs like sorting with particles can be fixed.
So are there TSE plans for interior transparency and when in the roadmap can we expect to see them?
So are there TSE plans for interior transparency and when in the roadmap can we expect to see them?
About the author
Tom is a programmer and co-owner of Sickhead Games, LLC.
#2
The glass texture is a png with an alpha channel. I still get an opaque surface with it.
12/28/2004 (4:22 pm)
Doesn't seem to be working for me... but alot of times materials give me headaches:datablock Material(glass)
{
baseTex[0] = "~/data/interiors/ship/glass";
translucent = true;
};
addMaterialMapping( "glass", "material: glass" );The glass texture is a png with an alpha channel. I still get an opaque surface with it.
#3
Options are:
Mul
Add
AddAlpha
Sub
LerpAlpha
I Belive its set to the last one as default.
12/29/2004 (4:05 am)
Try setting the translucentBlendOp too.Options are:
Mul
Add
AddAlpha
Sub
LerpAlpha
I Belive its set to the last one as default.
#4
They are definitely not set up to handle this right now. It's not a simple problem to solve and it's a pretty low priority. If you really want a lot of translucent geometry for your interiors, you're going to need to figure out a custom solution. If you just want a little thing translucent here and there, it should work OK though.
12/29/2004 (10:35 am)
You should be able to make any Material translucent, but I haven't tried it specifically with interiors, so there may be some issues there. The big problem that you can run into is sorting multiple translucent pieces of geometry on interiors. They are definitely not set up to handle this right now. It's not a simple problem to solve and it's a pretty low priority. If you really want a lot of translucent geometry for your interiors, you're going to need to figure out a custom solution. If you just want a little thing translucent here and there, it should work OK though.
#5
After reading up on how Unreal mappers deal with this it seems they use a number of techniques including "movers" (pathed interiors in Torque speak i believe). The big benefit from using a non-moving pathed interior is that it's not part of the BSP which means it can be hidden and replaced with say glass shard particles.... you can't do that if it was part of the BSP brush. There is an old resource which adds working pathed interiors plus translucency to them... i may try that to solve both issues at once.
My next issue will be how to do stuff like metal grating catwalks with lots of transparency, yet still get DIF shadows.
12/29/2004 (11:46 am)
Simply using material translucency may work in a few cases, but i'm betting they won't work properly with particles.After reading up on how Unreal mappers deal with this it seems they use a number of techniques including "movers" (pathed interiors in Torque speak i believe). The big benefit from using a non-moving pathed interior is that it's not part of the BSP which means it can be hidden and replaced with say glass shard particles.... you can't do that if it was part of the BSP brush. There is an old resource which adds working pathed interiors plus translucency to them... i may try that to solve both issues at once.
My next issue will be how to do stuff like metal grating catwalks with lots of transparency, yet still get DIF shadows.
#6
12/30/2004 (5:12 pm)
Seems translucency is broken for interiors... and maybe materials in general. Looking into it and will post to the bugs forum.
#7
12/30/2004 (6:09 pm)
Translucency works fine for me with trees and .dts-shapes like windows. They do look very weird though, they seem to have huge problems sorting multiple translucent pieces behind eachother, like the leaves on a tree.
#8
Now even for dts shapes translucentBlendOp in the Material datablocks do not support the enum types (None, Mul, Add, AddAlpha, Sub, and LerpAlpha) as they are undefined in the script. I'll be submitting a patch for that soon.
12/30/2004 (6:19 pm)
I'm focusing on interiors mostly... so that's where i've come across these issues. It *should* work, but doesn't. So that's the big bugs i'm solving right now. I'm not gonna bother with sorting issues... just making translucent materials render on interior surfaces.Now even for dts shapes translucentBlendOp in the Material datablocks do not support the enum types (None, Mul, Add, AddAlpha, Sub, and LerpAlpha) as they are undefined in the script. I'll be submitting a patch for that soon.
#9
12/30/2004 (8:59 pm)
I posted my patch for translucent materials on DIF interiors over on this other thread.
#10
02/21/2005 (9:39 am)
@Tom Still working on translucent sorts for dts? I've just now begun adding trees everywhere, and the sort issues are absolutely horrid looking...
#11
What sort issues do you see with DTS? As far as i know the DTS shapes in the scene are sorted... see TSStatic::prepRenderImage().
02/21/2005 (1:32 pm)
@Erik - So far no. I've focused on the DIF transparency and at the moment it's pretty good in most cases. It still fails for particles, so i need to get back to that and fix it once and for all.What sort issues do you see with DTS? As far as i know the DTS shapes in the scene are sorted... see TSStatic::prepRenderImage().
#12
02/21/2005 (5:53 pm)
I'm using trees with multiple layers of leaves. The layer closest to you renders fine, but its transparent sections block out any layer below them.
#13
02/21/2005 (7:02 pm)
@Erik - I think this is a DTS creation issue and not an engine issue. If the DTS is created so that the inner layers are rendered before the outer layes you wouldn't see this problem. I'm not sure about how Torque deals with this. Maybe you should post a new topic on it.
#14
02/22/2005 (2:42 am)
You're right. I had built a lot of new and complex shapes for my TSE playing, not following the rules I learned with TGE. Rebuilding a few test models using proper techniques showed that everything is working fine. Thanks.
Torque Owner Westy