Game Development Community

Environment Mapping

by Luigi Rosso · in Technical Issues · 01/17/2002 (10:50 am) · 14 replies

I haven't been able to get environment mapping working. My PNGs do have alpha channels (where I've been told that white is not equivalent to transparent but to amount of reflection in this case).

I have set up all boolean values correctly, what more needs to be done?

Thanks

#1
01/17/2002 (10:57 am)
Are you talking about env mapping on models, water, ??
#2
01/17/2002 (11:02 am)
Sorry for not specifying, on dts shapes specifically.
#3
01/17/2002 (6:55 pm)
We actually just talked about this in the "DTS Exporter FAQ" thread. I will summize it here so that you don't have to go searching...

"For environmental reflections, activate the reflection channel and then use the spinner value to control how relfective the material is in the engine (will not work in the show tool). The Alpha from the diffuse channel can affect the reflection. You do not need to add a bitmap."

Logan
#4
01/20/2002 (8:24 am)
Thanks!

I have set that and still haven't gotten it to work. Should the dmp file say something about it?

Is there anyway to tell from the dump.dmp file if environment mapping has been added to the model or not? Because there's no mention of it in the dump file I'm getting and I have tried replacing my model with one of Dynamix's ones from T2 and it does have environment mapping! So it's obviously something wrong in my scene. Must the cfg file be set in any special way?

Thanks again.
#5
01/20/2002 (11:37 am)
Have you turned on Environmental Reflections in the engine itself?
#6
01/20/2002 (4:41 pm)
Yes. Like I said, it works with another model from Tribes 2. I just can't get it to work with my exported data, I'm confident it's a mistake in 3dsmax (which I've made) the game is setup correctly.

The map definitely has the alpha channels correct. It is in the diffuse map slot and my reflection map is set on (but with no actual material in there, I've tried with one and without) and the value is set to 100.

The model does not have environment mapping when ingame while others do (and I have tried just changing the filename to another one which I know works and indeed the emap worked).

Thanks for the help.
#7
01/26/2002 (4:17 pm)
I think i can help here, you got a little script problem (i know because i had it myself thanx to Joe for pointing me in the right direction).

What you need to do is add

emap = true;

to "your model".cs in the server/scripts folder that should take care of all your problems.
#8
01/26/2002 (6:36 pm)
To clarify, add that property to the shape's datablock.
#9
01/30/2002 (6:32 pm)
I actually did have that all setup right. That's what I meant by the boolean script values.

I'm thinking something may have been wrong with my texture perhaps (strangely as it worked with another model).

Thanks for all the replies though.
#10
05/21/2002 (12:43 pm)
Myself and a friend are also experiencing the same problem. We're using WorldCraft/Hammer to create our buildings, so Joe Maruschak's exporter tutorial is all but useless to us as it's set up for the Max2DTS exporter. Just to be sure that we haven't made an obvious mistake - what are the requirements for alpha channel textures for use on buildings (DIFs/BSPs)?
#11
06/22/2002 (11:44 pm)
Ditto, but correct me if I'm wrong, but doesn't Torque not require alpha channels to support reflection on textures used in Worldcraft? Where as for Tribes2 it seemingly does. But on top of it needing alpha channels in T2, it also needs other things, (perhaps scripts), implemented to make it work. Anyone able to explain it as if they were talking to a complete dummy for my sake?
#12
06/23/2002 (9:55 am)
I went through this as well, after much headbanging I was able to make enviroment mapping show up for objects created by me, i.e. by setting all the scripts etc, but only player and weapons - I have not been able to get static DTS objects to show environent maps at all.

Incidentally I found I had to put a bitmap in the reflection slot in Max beore exporting to get my objects to reflect - the bitmap itself was irrelevent, in-game the objects just display the map's skybox derived env-map.
#13
02/27/2003 (1:32 pm)
I am having this exact same problem. My 'chrome.png' texture works fine on the original torque player and vehicle models to emap. My script seems fine as I can use my script with the original player or vehicle models as a test and they still environment map ok. But I cannot get my own Max models to environment map after export. I have checked the reflect box in the Max material editor and made sure its set at 100%. I have also tried using a seperate texture map for reflectivity, or setting the bitmap to the same one as the diffuse map, but no matter how I set it my models are still not reflecting. Has anyone determined the common problem here? I use Max3 by the way, but I've looked at the plugin code for ver3 and ver4 Max2dts and they both look the same regarding exporting reflective materials. Anybody?
(yes, emaps work fine with all of my code if i use models that come with torque, so i know its my models)
#14
03/19/2003 (12:57 pm)
I figured out my problem and wanted to post it here so that others may find this resolution if they need it. I am using 3dMax Studio 3 and no multires plugin. Apparently for LOD and thus environmental effects to work properly on my models I still need to use the unmessdts.exe program which solved my problem. I may have set the Tribes2::autodetails parameter incorrectly somewhere or unmessdts may be required regardless, I'm not sure. However, it did solve my problem on my home computer. I have still witnessed a strange effect on another computer with my same model. The environment maps onto some strange transparent surface, perhaps the collision box or bounding box it seems. I will still have to resolve this problem for video cards other than my nvidia geforce2 gts...