FogVolume?
by Xavier "eXoDuS" Amado · in Torque Game Engine · 01/24/2002 (8:38 am) · 13 replies
can anyone explain what the 3 fogvolume parameters in the sky are for?
About the author
#2
stream->read(&mFogVolumes[i].visibleDistance);
stream->read(&mFogVolumes[i].minHeight);
stream->read(&mFogVolumes[i].maxHeight);
Color (R,G,B,Intensity) is set by fogColor?
fogColor = "0.820000 0.828000 0.844000 1.000000";
But what does fogVolumeColor do then? And what does the large intensity number at the end mean?
fogVolumeColor1 = "128.000000 128.000000 128.000000 -222768174765569860000000000000000000000.000000";
01/24/2002 (8:57 am)
I think these set the view distance, min and max height off the terrain; this is from sky.cc:stream->read(&mFogVolumes[i].visibleDistance);
stream->read(&mFogVolumes[i].minHeight);
stream->read(&mFogVolumes[i].maxHeight);
Color (R,G,B,Intensity) is set by fogColor?
fogColor = "0.820000 0.828000 0.844000 1.000000";
But what does fogVolumeColor do then? And what does the large intensity number at the end mean?
fogVolumeColor1 = "128.000000 128.000000 128.000000 -222768174765569860000000000000000000000.000000";
#3
"Color (R,G,B,Intensity) is set by fogColor?"
Yes.
"But what does fogVolumeColor do then?"
In T2 these did nothing. I think the original intention was to allow each fogVolume to have it's own fog color, but then it never got implemented.
"And what does the large intensity number at the end mean?"
Beats me. I've asked a lot of people about this and no one has a clue. I can't see any difference when I change the value.
01/24/2002 (12:13 pm)
Assuming that these are the same since T2, you are correct about the fogVolume numbers."Color (R,G,B,Intensity) is set by fogColor?"
Yes.
"But what does fogVolumeColor do then?"
In T2 these did nothing. I think the original intention was to allow each fogVolume to have it's own fog color, but then it never got implemented.
"And what does the large intensity number at the end mean?"
Beats me. I've asked a lot of people about this and no one has a clue. I can't see any difference when I change the value.
#4
Like Zear says, though, this information is never used in the current codebase.
As for why that alpha value is some wacky large number... the Sky constructor initializes the RGB values of the color field of each mFogVolumes element to be the same as the RGB values from fogColor, but it doesn't initialize the alpha values to anything. So unless you explicitly set an alpha value to something yourself, it's just going to be a random number. (Also, the alpha value is not sent to the client in pack/unpackUpdate.)
01/24/2002 (12:37 pm)
For a Sky object, the script field fogVolumeColor1 is tied to the field mFogVolumes[0].color in the engine code; similarly for fogVolumeColor2 and fogVolumeColor3. The color field is type ColorF, so the four values are red, green, blue, and alpha (transparency).Like Zear says, though, this information is never used in the current codebase.
As for why that alpha value is some wacky large number... the Sky constructor initializes the RGB values of the color field of each mFogVolumes element to be the same as the RGB values from fogColor, but it doesn't initialize the alpha values to anything. So unless you explicitly set an alpha value to something yourself, it's just going to be a random number. (Also, the alpha value is not sent to the client in pack/unpackUpdate.)
#5
Same thing for the extraneous parameters in the waterblock.
01/24/2002 (1:07 pm)
Well, does this really mean that we should remove the fogVolume and fogVolumeColor items from the ObjectBuilderGui.gui so that they are not added to the mission file?Same thing for the extraneous parameters in the waterblock.
#6
(BTW, I didn't say that fogVolume1-3 were unused, just that fogVolumeColor1-3 were unused.)
01/24/2002 (1:53 pm)
There's several metric tons of unused stuff in the TGE SDK. Personally, I haven't gone on a mission to eliminate it all from our codebase yet, as that will be a major undertaking. But yeah, eventually the dead weight should be culled.(BTW, I didn't say that fogVolume1-3 were unused, just that fogVolumeColor1-3 were unused.)
#7
what's the difference beetween having 1 2 or 3 fogVolumes?
01/24/2002 (4:18 pm)
ok, but can anyone explain me what a fogVolume is actually? :)what's the difference beetween having 1 2 or 3 fogVolumes?
#8
You can have 3 differnet layers of fog
eg.
you could have one between heights 100 and 110 that has a density of 0.9
and another between 50 and 200 that has a density of 0.10
kinda like "blanket" fog
is this right guys?
01/24/2002 (5:17 pm)
To my mind these are the fog "layers" (this is my guess...someone can confirm)You can have 3 differnet layers of fog
eg.
you could have one between heights 100 and 110 that has a density of 0.9
and another between 50 and 200 that has a density of 0.10
kinda like "blanket" fog
is this right guys?
#9
[edit]
fogDistance: Objects beyond this distance will begin to be lost in the fog.
fogColor: Determines the color of both the distance fog and of the fog volumes.
fogVolume1, 2, and 3: There can be up to 3 fog layers. These are very useful - create a fog layer for snow to fall from, then allow clear skies above that, or use a fog layer to make underwater areas murky. Layer 1 should always be the lowest and 3 always the highest, and they should never overlap (although one can start exactly where another ends). Values are 'd b t', where d = distance you will be able to see while in the fog, b = the elevation of the bottom of the layer, and t = the elevation of the top of the layer.
[/edit]
01/25/2002 (7:56 am)
That's right.[edit]
fogDistance: Objects beyond this distance will begin to be lost in the fog.
fogColor: Determines the color of both the distance fog and of the fog volumes.
fogVolume1, 2, and 3: There can be up to 3 fog layers. These are very useful - create a fog layer for snow to fall from, then allow clear skies above that, or use a fog layer to make underwater areas murky. Layer 1 should always be the lowest and 3 always the highest, and they should never overlap (although one can start exactly where another ends). Values are 'd b t', where d = distance you will be able to see while in the fog, b = the elevation of the bottom of the layer, and t = the elevation of the top of the layer.
[/edit]
#10
01/25/2002 (8:20 am)
Thanks Tim
#12
01/25/2002 (12:47 pm)
No problem. I basically ripped this out of my T2 Mission Editor doc. The interface is different now, but AFAIK the objects that work in Torque still work the same, settings wise.
#13
01/25/2002 (4:48 pm)
Wow!!
Associate Anthony Rosenbaum