Game Development Community

Models not receiving fog

by N R Bharathae · in Torque Game Engine Advanced · 02/18/2008 (7:25 pm) · 5 replies

I've come across a problem with a model not receiving the fog effect in a TGEA mission. I've never seen this before and I'm stumped because I can't find anything different between all the other models that do take fog versus this one model that doesn't.

To clarify, when you detach the player camera and fly backwards away from the model all of the other models begin to grey out and eventually fade into the fog. But this one model, somehow different from the others, does not fade out. In fact it retains its color depth to such an extent that it stands out black against the grey background.

Can anyone tell me if there are settings that would affect the application of fog on a model anywhere in Torque? Is there something in a model's hierarchy that would determine how much fog it will receive? I'm grabbing at straws here of course but would appreciate some help.

#1
02/19/2008 (3:58 am)
*bump

No one has ever seen this?
#2
02/19/2008 (4:11 am)
Is your shader taking into account fog? I noticed a few shaders don't handle fog. For fog to affect a model in TGEA it must be processed in the shader. Check that your problematic model uses the same shaders as the others.
#3
02/19/2008 (5:40 am)
Thanks for answering, Gareth. None of the models I've built are using shaders that affect their rendering in fog. The materials.cs I'm using for all the models is pretty basic, just enough to get diffuse, normal and specularity going. That was a good suggest but I just came across this post about the scale of a model and how its rendered in fog- http://www.garagegames.com/mg/forums/result.thread.php?qt=67039. The model in question has been scaled x4 so I'm betting that's the problem.

I'm going to test this out and see if that's the problem. Thanks for your help.
#4
03/17/2008 (8:27 am)
Scaling is the problem. That thread has the fix, thought it was integrated into the new versions of TGEA already. Mine is fixed.
#5
03/17/2008 (8:31 am)
Yeah, our project is a heavily modified version of an older version of TGEA so we might have missed that fix. But you're right, its the scale of the model.