Game Development Community

Transparent dif's + Torque1.3 + Lighting pack?

by Neil Marshall · in Torque Game Engine · 12/09/2004 (8:00 am) · 15 replies

I'm trying to get the transparent walls code snippit to work but I'm running into some compiling errors. Has anyone else managed to get this code working?

I've gone over it multiple times and I've compared it to the .rar that is available in that forum but I haven't done anything different that I can see.

This is what I'm seeing in VC++7

map2dif warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification

map2dif error LNK2019: unresolved external symbol "public: bool __thiscall InteriorTrans::Update(void)" (?Update@InteriorTrans@@QAE_NXZ) referenced in function "protected: virtual bool __thiscall InteriorInstance::onAdd(void)" (?onAdd@InteriorInstance@@MAE_NXZ)

map2dif error LNK2019: unresolved external symbol "public: __thiscall InteriorTrans::InteriorTrans(void)" (??0InteriorTrans@@QAE@XZ) referenced in function "protected: virtual bool __thiscall InteriorInstance::onAdd(void)" (?onAdd@InteriorInstance@@MAE_NXZ)

map2dif fatal error LNK1120: 2 unresolved externals

#1
12/09/2004 (11:03 am)
The Lighting pack *already* adds support for alpha-channels on interiors. Just compile map2dif with Lighting Pack installed and it'll work automagically.
#2
12/09/2004 (12:22 pm)
Really? When I try using the dif's made for the Transparency Code Snippit above then Torque just crashes when I just use the basic 1.3 engine with the 1.3 light pack.
#3
12/09/2004 (12:44 pm)
The Lighting Pack supports transparent texture on difs, but by default it's off because it interferes with dif environment mapping. To enable it you need to open the file 'engine/synapseGaming/contentPacks/lightingPack/sgLighting.h' and uncomment the following line:

#define SG_TRANSPARENT_INTERIORS
#4
12/09/2004 (12:46 pm)
Oh and recompile your difs with the Lighting Pack or a stock TGE map2dif.
#5
12/09/2004 (12:56 pm)
How does it conflict? Is it just that I can't put a reflection on a brush that is transparent or is it that I can't use reflections at all?

I'm just trying to make windows so maybe it would be better to just use a dts.
#6
12/09/2004 (1:06 pm)
It allows Torque to support transparencies or environment mapping (the reflection where you only see the sky), however true reflections (mirror brush) should still work.
#7
12/09/2004 (1:40 pm)
Quote:The Lighting Pack supports transparent texture on difs, but by default it's off because it interferes with dif environment mapping.

1. How does it interfere and what will not have environment mapping mean to the graphics?
2. Do I literally just copy over a png instead of a jpg for the texture?
3. If I use a png I assume the light is blocked but you can see through it?
#8
12/09/2004 (6:47 pm)
1 - The Lighting Pack supports both rendering methods, but not at the same time. The problem is that TGE is only being supplied with one piece of data, the alpha channel it has no way of knowing when to use the alpha for transparencies and when to use it for environment mapping (only affects difs).

2 Yes, I think TGE 1.3 also support TGA files.

3 Yes.
#9
12/09/2004 (6:51 pm)
To clarify; we're talking about dif surfaces if you're not using env mapping on difs then you won't notice a difference.
#10
12/10/2004 (2:24 am)
Thanks John :)
#11
12/10/2004 (8:51 am)
No problem :)
#12
06/15/2007 (8:33 am)
John I would greatly appreciate your response to the above statement
Quote:The Lighting Pack supports transparent texture on difs, but by default it's off because it interferes with dif environment mapping.
but for TGE 1.5.1 or 1.5.2 and Constructor.
How does this work in these versions.
Thanks
#13
06/15/2007 (12:08 pm)
The resource Alpha-Transparency support for Interiors was recommended for use with TLK 1.3.5 and up. TLK had built in hooks and support for the resource.

TGE 1.5.x changed a lot from the original TLK and the resource probably needs to be updated for the latest version (btw: I don't recommend using TGE 1.5.1, it was an intermediate release, TGE 1.5.2 is feature complete and fixes a few bugs that were 1.5.1).
#14
06/15/2007 (2:10 pm)
Thanks for the quick response John! I was actually referring to the #define SG_TRANSPARENT_INTERIORS flag.
It's not in 1.5.2. We are simply trying to get Windows in Constructor. Any ideas?
Quote:The Lighting Pack supports transparent texture on difs, but by default it's off because it interferes with dif environment mapping.
Does it still exist in TGE 1.5.2? And to ask stupid question! What does environment mapping mean?
#15
06/21/2007 (11:25 am)
That flag no longer exists, the code it altered changed a lot. Instead the resource should be updated for 1.5.x, ideally to include transparent static meshes too (that would be cool).

Environment mapping is when texture(s) that fake an object's surroundings are applied to its surfaces so the object looks reflective. TGE uses the sky's top texture to apply a reflective look to objects. This is available on dts and dif objects.