T3D - 2 issues - Fog and transparency
by Scottie Sirius · in Torque 3D Professional · 10/13/2009 (4:30 pm) · 3 replies
I have 2 issues that I'm wondering about.
One is when the ground cover/grass is between the camera and the open air you can see an outline of the png. When it's between the camera and the scattersky it appears black. I wonder if its a bug, the way I have the ground cover set-up or just the way it is? You can see the outline all along the hill in Pic 1.
The second is whenever I get the fog looking the way I want it (pic 1) if I exit and come back into the Editor or the Game it turns bluish. (pic 2) Any cure to get it to stay the way I set it?
Pic 1

Pic 2

One is when the ground cover/grass is between the camera and the open air you can see an outline of the png. When it's between the camera and the scattersky it appears black. I wonder if its a bug, the way I have the ground cover set-up or just the way it is? You can see the outline all along the hill in Pic 1.
The second is whenever I get the fog looking the way I want it (pic 1) if I exit and come back into the Editor or the Game it turns bluish. (pic 2) Any cure to get it to stay the way I set it?
Pic 1

Pic 2

About the author
Creating the AlterVerse! www.AlterVerse.com
#2
And yes, it appears to be the scattersky causing the problem with the colored fog. I don't see a fogScalar option but I think I got a close enough result messing with some of the other settings.
Thanks Ross!
10/13/2009 (8:25 pm)
Yes, it's AL. Good to hear a fix is coming.And yes, it appears to be the scattersky causing the problem with the colored fog. I don't see a fogScalar option but I think I got a close enough result messing with some of the other settings.
Thanks Ross!
#3
Ah, it appears there isn't a fogScale value. There are tweak scalars for the generated sun and ambient colors, but not the fog color. If you need more control you could easily set up a fogScale value on the ScatterSky by taking a look at mSunScale in scatterSky.cpp and doing the same stuff for the fog color. This would allow you to scale the whole color, or individual channels (so, if you wanted to turn that bluish color into a more gray color, you'd do something like 1 1 0.2 for the fogScale, which would minimize the influence of the blue channel on the generated fog color).
10/13/2009 (9:16 pm)
Glad that helped some :)Ah, it appears there isn't a fogScale value. There are tweak scalars for the generated sun and ambient colors, but not the fog color. If you need more control you could easily set up a fogScale value on the ScatterSky by taking a look at mSunScale in scatterSky.cpp and doing the same stuff for the fog color. This would allow you to scale the whole color, or individual channels (so, if you wanted to turn that bluish color into a more gray color, you'd do something like 1 1 0.2 for the fogScale, which would minimize the influence of the blue channel on the generated fog color).
Associate Ross Pawley
The other issue may be caused by the ScatterSky calculating the fog color (verify by changing the fog color to something specific, then changing the azimuth or elevation of the ScatterSky...if the fog color changes to the blueish you're seeing in pic 2, that's it). There should be a fogScalar value you can use to tweak the generated color, or if you're not planning on changing the time of day you could override the fog color via script after the mission loads.