Game Development Community

Transparency still doesn't work in 1.1.2?

by Adib Murad · in Torque Game Engine · 12/22/2002 (8:54 pm) · 16 replies

After a huge search and some hours trying to make transparent PNG work, I found this.

It's a 2001 thread!! The fact is: before I change interiorRender.cc code, I got no transparency at all.

My SDK version is Release_1_1_2 (not HEAD). Was this very old (Sep 2001) code change really necessary or am I missing something?

#1
12/22/2002 (9:08 pm)
transparency always worked for me, on every version, i actually update to the HEAD about once a month
#2
12/23/2002 (3:47 am)
I've always had an alpha layer without problems. This was with all versions. It depends on your paint program too.
#3
12/23/2002 (8:00 am)
Actually that's wrong, transparency in interiors doesn't work unless you modify the interior rendering code. Torque still didnt integrate any code for this, but there is some in the resources.
#4
12/23/2002 (10:08 am)
Xavier, not even the HEAD version??
#5
12/23/2002 (10:11 am)
The code in the resources is a hack; things get incorrectly sorted out and aren't seen behind the transparent objects (like players, interiors, etc.) I managed to fix that problem (check my .plans), but never got around to packaging it up and releasing it. I really need to do that. :P

And to the best of my knowledge, there's no interior transparency stuff in the HEAD. I haven't looked at it for quite a while, though.
#6
12/23/2002 (8:00 pm)
James, my mission has a wall with a translucent window. Having made that code change referred above, I can see through it correctly. Do you think I can still have problems?
#7
12/23/2002 (8:03 pm)
Wether it'll work or not depends on the order things are being drawn in. Some cases will be fine, other's will produce artifacts.

Most of the stuff I've seen fails to blend properly when a DTS shape is outside the blended window.
#8
12/23/2002 (8:45 pm)
Man! The brush behind the window... it's gone! Magic?

Mmmm... and the lumbers enclosing the window seemed to disappear where the glass touches it. I made the glass a detail brush, put a solid texture in the border faces, but it doesn't work. Having seen this before, where's the rest of the resource to fix it? Anyone knows?

James, can you explain why objects disappear behind transparent ones? If you do this, I can try to fix myself.
#9
12/23/2002 (9:10 pm)
The problem is because they're still marked as structural brushes in map2dif and in the engine, so objects behind them are getting culled out (because you shouldn't be able to see them). Fixing it entailed a few minor changes to interiorRender.cc and hacking up map2dif to create a 'trans' entity, which is treated the same as a detail brush (which doesn't occlude viewing).

BTW: I'll really try to remember to get the map2dif stuff up and posted (at least on the forums) tomorrow afternoon.
#10
12/24/2002 (1:34 am)
Cool, I was wondering about alpha in interiors the other day. Looks like it has to be hacked ATM. Too bad alot of features get put off for so long. Thanks for helping people out with your future resource though.
#11
12/24/2002 (5:35 am)
I think detail brushes occlude other brushes too. I made my window a detail brush and the block behind it still disappears.

So, don't you have to add the Trans entity to torque.fgd, the Torque configuration file for Worldcraft?

Man, it will be great to get it working. Thanks in advance, James.
#12
12/24/2002 (8:02 am)
I just started our first level using worldcraft for our interiors and ran into this thread while serching how to make windows and doors...are you releasing this as a resource?
#13
12/24/2002 (8:08 am)
Actually, yes, he added the entity to the .fgd file, just wait, he'll post it tomorrow :)
#14
12/24/2002 (8:41 am)
Hopefully. :)
#15
12/24/2002 (11:17 am)
Well... oh.... heh... well you will :)
#16
01/05/2003 (7:14 am)
And he made it!! Transparent interiors in Code Snipits.
Thanks a lot, James.