Fog is backwards?
by Mitovo · in Torque 3D Beginner · 01/29/2015 (5:42 pm) · 6 replies
Hello,
So, I've run into an odd issue with the latest T3D while setting up fog. I've tried looking up tutorials, and can't find anything explaining how this works.
Here's a picture of what I'm seeing.
Shouldn't the fog be increasing as it gets farther from the character, and not decreasing?
I've messed with the settings, and I can't make heads or tails of what is going on. I'm trying to get the standard, normal look of a thin fog that gets thicker off into the distance, and can not achieve it with the settings.
Also, were the fog settings changed out for something new? I remember having settings for the fog color, the "start" distance (0%), the "end" distance (100%), and then maybe a setting for type (linear or exponential), and perhaps a height setting. Or at least something that worked the way I'd expect it to when changing settings.
This new method makes no sense at all, and seems to be completely backwards.
So... is this a bug, or is there some new, strange way of setting fog?
So, I've run into an odd issue with the latest T3D while setting up fog. I've tried looking up tutorials, and can't find anything explaining how this works.
Here's a picture of what I'm seeing.
Shouldn't the fog be increasing as it gets farther from the character, and not decreasing?
I've messed with the settings, and I can't make heads or tails of what is going on. I'm trying to get the standard, normal look of a thin fog that gets thicker off into the distance, and can not achieve it with the settings.
Also, were the fog settings changed out for something new? I remember having settings for the fog color, the "start" distance (0%), the "end" distance (100%), and then maybe a setting for type (linear or exponential), and perhaps a height setting. Or at least something that worked the way I'd expect it to when changing settings.
This new method makes no sense at all, and seems to be completely backwards.
So... is this a bug, or is there some new, strange way of setting fog?
About the author
#2
This should help you with a quick solution, note the Atmosphere and Offset are at 0, I've never gotten satisfactory results from either of those two at any other value imo.
01/29/2015 (11:21 pm)
Here is referance code from my LevelInfo:fogColor = "0.0431373 0.0431373 0.0431373 1"; //grey/dark fog
fogDensity = "0.0015"; //not very dense
fogDensityOffset = "0";
fogAtmosphereHeight = "0";This should help you with a quick solution, note the Atmosphere and Offset are at 0, I've never gotten satisfactory results from either of those two at any other value imo.
#3
For fogDensityOffset you can give him a few meters, something between 1-20, it will remove the fog around the player, it is nicer to look at, but if you want very dense fog you can use 0 or negative values.
01/30/2015 (4:09 am)
You can also look into this pull request and add back in what was removed, so you have the old fog back, which I like better, the fogAtmosphereHeight does not give nice results yet: github.com/GarageGames/Torque3D/pull/362/filesFor fogDensityOffset you can give him a few meters, something between 1-20, it will remove the fog around the player, it is nicer to look at, but if you want very dense fog you can use 0 or negative values.
#4
I've gotten it to look more like what I'm after, though I can't say I completely understand what's going on, or how the numbers are working.
For the Height value, for example, is that height based on the height starting from the character's/camera's position? Or is it starting from "0" in the world?
Also, there's a very odd effect to the fog when I set it for a height where I'm "in it", but can still see "the top", where it fades off to nothing. As I'm looking up and around, there's an almost "bulletin board image" effect. Like the cross-section of the fog I'm looking at is rotating around to match my view, up to a point. Very odd.
Also, is setting the height value to "0" pretty much the same as telling the engine "just fill fog everywhere"? That's the effect it seems to have.
Sorry for all the questions. Just trying to understand how it all works.
Thanks :)
01/30/2015 (5:03 am)
Thanks everyone for your help.I've gotten it to look more like what I'm after, though I can't say I completely understand what's going on, or how the numbers are working.
For the Height value, for example, is that height based on the height starting from the character's/camera's position? Or is it starting from "0" in the world?
Also, there's a very odd effect to the fog when I set it for a height where I'm "in it", but can still see "the top", where it fades off to nothing. As I'm looking up and around, there's an almost "bulletin board image" effect. Like the cross-section of the fog I'm looking at is rotating around to match my view, up to a point. Very odd.
Also, is setting the height value to "0" pretty much the same as telling the engine "just fill fog everywhere"? That's the effect it seems to have.
Sorry for all the questions. Just trying to understand how it all works.
Thanks :)
#5
01/30/2015 (7:28 am)
The atmosphere height is a total number, 100 means fog stops at 100 meter height, will give you an ugly obvious fog border in the sky, this is why I deactivated it and returned it to the good old fog, Ron broke it with his commit, maybe it gets reverted in the next Torque or the atmosphere height gets fixed.
#6
There's clearly interplay between the settings, and I'm still trying to work that out. I think I'll keep the "height" set to 0, and just have the "fog everywhere" effect, relying on the other settings to take care of the thickness, etc.
01/30/2015 (9:42 am)
Yeah, I saw that harsh cut-off. Didn't like it. There's clearly interplay between the settings, and I'm still trying to work that out. I think I'll keep the "height" set to 0, and just have the "fog everywhere" effect, relying on the other settings to take care of the thickness, etc.
Jason Campbell
The Offset is how near the fog is to you. Setting it to negative will make it even more thick around you. The Height is just that. If you set it to something like 30 you can have only your valleys filled with fog. It's not a bad effect. Density is pretty touchy so fiddle with that till you get the right mood.
I want to get Volumetric fog working. Having trouble compiling. You should check it out.
richardsgamestudio.com/downloadVolFog.html