Fog Visibility Range

Moderators: GSH, VSMIT, Red Devil, Commando

User avatar
Zax
Attila
Posts: 1388
Joined: Sat Feb 19, 2011 6:56 am

Re: Fog Visibility Range

Post by Zax »

The RTS side of the game demands fog of war, which is achieved through distance fog and radar range.
User avatar
jaydenbz2
Thunderbolt
Posts: 128
Joined: Mon Feb 21, 2011 6:19 am

Re: Fog Visibility Range

Post by jaydenbz2 »

You can also set the fogrange and visibilityrange to negative values, one of slaors posts said that if you do say fogrange -250 800, that gives a good gloomy feel to the map as the fog is denser, the visibilityrange should always be above the fogrange or ugliness will occur.
User avatar
Zero Angel
Attila
Posts: 1536
Joined: Mon Feb 21, 2011 12:54 am
Contact:

Re: Fog Visibility Range

Post by Zero Angel »

Negative fogrange would work better if the fogbreak command was fixed (fogbreak originally controlled how gradually the fog levels ramped up from the start of the fog range to the end of the fog range instead of in the linear way it does now)
Regulators
Regulate any stealin' of this biometal pool, we're damn good, too
But you can't be any geek off the street
Gotta be handy with the chains if you know what I mean
Earn your keep
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Fog Visibility Range

Post by Nielk1 »

One main issue was no one could effectively describe WTF fog break did. Does it ramp from 0 to 50 at the break and 50 to 100 after? Or does it work some other way?
User avatar
GSH
Patch Creator
Posts: 2486
Joined: Fri Feb 18, 2011 4:55 pm
Location: USA
Contact:

Re: Fog Visibility Range

Post by GSH »

I've got (effectively) a code branch at 1.3pb4a sitting on my HD at home. I can quickly load it up, search that code, and see how things worked. However, the old graphics code is so confusing, it takes a while to figure out. The programmer who did it sometimes seems to abide by the philosophy of "if it was hard to write this code, it should be hard to read, too."

-- GSH
APCs r Evil
Sabre
Posts: 299
Joined: Sat Feb 19, 2011 4:13 am

Re: Fog Visibility Range

Post by APCs r Evil »

jaydenbz2 wrote:one of slaors posts said that if you do say fogrange -250 800, that gives a good gloomy feel to the map as the fog is denser
:shock: Brilliant!
"It is not only his right, but his duty...to find the verdict according to his own best understanding, judgment and conscience, though in direct opposition to the direction of the court." - John Adams
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Fog Visibility Range

Post by MrTwosheds »

In pb6 onwards I find it best to always set the max fogrange and the visibility distance to the same value, seems to be the best way to blend the terrain and sky with fog.

I have also used alpha channel faded skydomes to reduce sudden looming by terrain coming into the visibility range, good for foggy maps, not much good for those who like horizons.
Last edited by MrTwosheds on Tue Jun 26, 2012 4:54 pm, edited 1 time in total.
The Silence continues. The War Of Lies has no end.
User avatar
Red Devil
Recycler
Posts: 4398
Joined: Fri Feb 18, 2011 5:10 pm
Location: High in the Rocky Mountains

Re: Fog Visibility Range

Post by Red Devil »

i started doing that after Slaor posted about that; works great ::thumbsup::
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln

Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV

Lifetime member of JBS and NRA
User avatar
Zero Angel
Attila
Posts: 1536
Joined: Mon Feb 21, 2011 12:54 am
Contact:

Re: Fog Visibility Range

Post by Zero Angel »

The way I understood fogbreak is that it acted somewhat like the 'curves' control on photoshop -- and made adjustments to the fog density based on distance let's assume that if the fogbreak is set at 0.5 so that fog values ramped up in a linear fashion from the start of the fogrange to the end of the fogrange. And the fog range was set from 100 to 500.

Code: Select all

Distance     100m 200m 300m 400m 500m
Fog Density  0%   25%  50%  75%  100%
Using a fogbreak of, say 0.35 would change the fog values to something like this

Code: Select all

Distance     100m 200m 300m 400m 500m
Fog Density  0%   12%  35%  60%  100%
Allowing the fog to ramp up more gradually.

I don't know exactly whether fogbreak moved the midpoint of the fog or whether it affected some kind of algorithm that affected the 'curve' of the fog density but it did allow mapmakers to create interesting looking effects using fog (like having a very subtle pervading fog on the map which then faded out more suddenly near the end of the range) or to simply create a nicer transition towards the end of the visibility range.
Regulators
Regulate any stealin' of this biometal pool, we're damn good, too
But you can't be any geek off the street
Gotta be handy with the chains if you know what I mean
Earn your keep
User avatar
jaydenbz2
Thunderbolt
Posts: 128
Joined: Mon Feb 21, 2011 6:19 am

Re: Fog Visibility Range

Post by jaydenbz2 »

@Red DEvil, me too, it was such a good idea.
And we REALLY should have some kind of fix if possible, to allow the fogbreak thing, maps could be so much nicer with it I think, instead of the sometimes ugly default fogbreak.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Fog Visibility Range

Post by Nielk1 »

Would be nice if we could make terrain fade in from 0 alpha instead of just BOOM there at visual range too.
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Fog Visibility Range

Post by MrTwosheds »

Have discussed that, fading terrain is a very process intensive way to go, fading the sky is much more efficient. Maybe there is another process cheap solution we haven't thought of.
The Silence continues. The War Of Lies has no end.
User avatar
jaydenbz2
Thunderbolt
Posts: 128
Joined: Mon Feb 21, 2011 6:19 am

Re: Fog Visibility Range

Post by jaydenbz2 »

There is a sky.renderbeforeterrain feature in the console, this can be nice with some maps and it closely follows what 1.2 done.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Fog Visibility Range

Post by Nielk1 »

jaydenbz2 wrote:There is a sky.renderbeforeterrain feature in the console, this can be nice with some maps and it closely follows what 1.2 done.
This was added with the comment it probably wouldst do what we think, and really it doesn't. It looks quite ugly most of the time and would only work in a very select few situations.
User avatar
Zero Angel
Attila
Posts: 1536
Joined: Mon Feb 21, 2011 12:54 am
Contact:

Re: Fog Visibility Range

Post by Zero Angel »

sky.renderbeforeterrain sort of allows terrain to fade out similar to pre-1.3 but it's glitchy and not practical for normal usage.
Regulators
Regulate any stealin' of this biometal pool, we're damn good, too
But you can't be any geek off the street
Gotta be handy with the chains if you know what I mean
Earn your keep
Post Reply