Help! Strange fog problem...
by Josef Jahn · in Torque Game Engine · 01/11/2003 (12:56 pm) · 4 replies
What I'm trying to do is to just fog the cloud planes, or to be more exact, the edges. Usually, this is absolutely no problem. And in straight OpenGL simply enabling GL_FOG does the trick. However, in Torque I get this:

The strange thing is that the strange bar of transparency is always at the center of the view. This is extremely unpleasant and I wasn't able to remedy this by disabling fog coordinate extensions.
What I want to get is this (note how the sky becomes white at the horizon):

I have no idea what is interfering here. I'd be very grateful for anny suggestions as to what could be wrong.

The strange thing is that the strange bar of transparency is always at the center of the view. This is extremely unpleasant and I wasn't able to remedy this by disabling fog coordinate extensions.
What I want to get is this (note how the sky becomes white at the horizon):

I have no idea what is interfering here. I'd be very grateful for anny suggestions as to what could be wrong.
#2
01/14/2003 (12:43 pm)
That's a really nice screenshot... I like the architecture.
#3
01/14/2003 (1:06 pm)
that IS a nice screen. The waterfall is cool too
#4
I'd like to have transparency instead of fog for those cases, especially due to the backdrops my game uses (skyboxes with mountains on them).
01/15/2003 (1:37 am)
There's also a "noRenderBans" variable in the sky object that you can check (set to 1), which will turn the bans off. It sometimes gives good results, though most of the time the objects pop up as fog-shaded, then slowly fade in.I'd like to have transparency instead of fog for those cases, especially due to the backdrops my game uses (skyboxes with mountains on them).
Torque Owner Josef Jahn
I was tinkering with OpenGL fog while the renderBans code did exactly what I was looking for..
So, the solution for you non-DayNightFX users out there would be to increase the bans color by, say, 1.2f - or change the blending mode for the bans to "GL_SRC_ALPHA,GL_ONE" instead of "GL_SRC_ALPHA,GL_ONE_MINUS_ALPHA" (both in sky.cc)
If you have the dayNightFX stuff in your code, you can set the ban colors in the dayNight cc file, it's the last parameter of the AddColorTarget function...