Game Development Community

Enviroment Map don't work... why?

by Outline Interactive · in Artist Corner · 03/02/2005 (6:56 am) · 8 replies

I'm trying to make a glass, with transparency and some reflections to put in a window.
I follow the steps of Max2DTSExporter Guide and I've read many threads in this forum about emap, but nothing works for me.

So, I made a model and put a material *.png with alpha channel in the diffuse slot and I checked the opacity and reflection and adjusted the reflection value to 50. I used 3DS MAX 7 and export to DTS with MAS2DTS Exporter. I've changed the prefs.cs file in line $pref::environmentMaps = "0"; to 1 and I've created a cs file called window.cs with these lines:

datablock StaticShapeData(window)
{
category = "Misc";
emap=true;
shapeFile = "~/data/shapes/windows/window.dts";
};

function window::onAdd(%this,%obj)
{
%obj.playThread(0,"rotate");
}

function StaticShapeData::create(%block)
{
%obj = new StaticShape()
{
dataBlock = %block;
};
return(%obj);
}


In game.cs I put this line:
exec("./window.cs");

I place the DTS as an object in my map.

The result is this:

sylker.250free.com/downloads/problema6.jpg
The gray box floating near the gate should be reflective. In this image the opacity is off to better visualization.

Any help, thanks in advance.

Sylker.

#1
03/02/2005 (7:55 am)
I dont know how others do.
But i do like this and it works like a charm.
First you dont need a texture with a alpha channel.
In the material editor
add same texture that you have on diffuse at opacity
set opacity to 60 or so.
mark reflection and set it to around 70

-Billy
#2
03/02/2005 (9:59 am)
Thanks Billy, but still don't work :(

Is any restriction about use of interiors? Reflections in models work in interiors? 'Cause I make this map only with interiors from CShop.
#3
03/02/2005 (10:00 am)
Thanks Billy, but still don't work :(

Is any restriction about use of interiors? Reflections in models work in interiors? 'Cause I make this map only with interiors from CShop.
#4
03/02/2005 (7:05 pm)
Environment maps ONLY work on DTS models. Emaps do not actually reflect; they are simulated reflections.

Mirrors only work on DIF models. Here's a little something you should know, though. Unless you have TSE, you cannot assign all the faces of a convex shape to be mirrors. So, one visible mirrored surface per brush.
#5
03/03/2005 (12:43 am)
Enviromentmaps work on interiors if you set the material map right.
Make the window a dts object not an interior .
And try to place that model as a static model and see whats happening.
If this not working check your client/prefs file maybe it got messed up !
#6
03/03/2005 (5:41 am)
@David, I'm using DTS. What I mean with interior is if has some problem to use DTS with emap into interiors. But thanks for your explanation about mirrors.

@Billy, I have put the model as a static DTS and don't work. I have changed the file prefs.cs, and still don't work. I have put the DTS as an animated shape, but don't work too. I don't know what I'm doing wrong.

I'll continue trying...
#7
03/03/2005 (6:00 am)
Can you send me the file ?
So i can look at it .
#8
03/04/2005 (12:39 pm)
I haven't been able to get environment maps working either. I have the reflection slot checked, emap is set to true in my .cs file, and I've got the reflection cranked up to 100. How do the detail nodes relate to environemnt mapping? I ask becasue when I zoomed out form the DemoBuggy, the e-mapping disappears gradually and I'm assuming thats becuase of the incremental detail levels. But can't I get e-mapping to work on a vehicle that has only one detail node ( detail1 )? It doesn't seem to show up for me when I do that.Thanks