Precipitation is a bit of a mess.

Status
Not open for further replies.

gregory_house

Also known as TemporaryAl
So, multiple things here... (2.1.17, srb2win.exe, recent NVIDIA card)

-I'll just start with the variables (probably not everything is gonna be OGL-specific here, nor really introduced with 2.1.17)
EDIT:Scratch that, nothing is apparently:
precipdensity does absolutely nothing apparent, and why does it only take 1, or even numbers from 0-8 as correct values?

drawdist_precip
interprets zero as infinite, and only takes a few possible values anyway, making it not really console-friendly
Both of these variables reject numbers over their maximum value instead of just setting themselves to the maximum, same for the minimum. Also, for some reason they accept decimals starting with a possible value?

Wouldn't it be better if precipdensity accepted 0-5 and drawdist_precip 0-11 (or the whole range from 0 to 8192), and both simply corrected lower values to zero and higher values to their respective maximum? And if terms such as 'V.Thick' or 'Infinite' were removed from the variables themselves and kept for the menu only?

-That said, a high draw distance and density for precipitation means that not only many map objects, but also a lot of the precipitation itself, ends up disappearing. Can't more memory be dedicated to that?


EDIT:Density does work, but the weather has to be reloaded. Still, can anything be done about this? Since it's not set by the map but rather by the player, you should be able to change it at will, especially if you want it off.
 
Last edited:
Density does work, but the weather has to be reloaded. Still, can anything be done about this? Since it's not set by the map but rather by the player, you should be able to change it at will, especially if you want it off.
This is because of how it works. You may notice that loading maps with precipitation takes longer than loading maps without. This is because precipitation works by generating a very large array of positions on map load. If it let you change the density mid-stage, it would need to generate that table again mid-stage, and this would cause a freeze and netgame desynch for something that's supposed to be client-only.

Now, it should probably say that changing the density requires a map reload, but there's nothing that can be done about that without completely changing how precipitation works.
 
Mystic, the freeze hasn't happened since 2.1 released. The precipitation code was totally rewritten so it *wouldn't* just dumbly try to spawn literal millions of rain or snow objects in random locations all over the map, and pray that they were actually inbounds. It works through the blockmap instead, which is vastly faster and also provides a result that looks much better (while still random, there's no possibility of seeing a large gaping hole somewhere).

That's why preloaded precipitation is mostly an antiquated thing now; generation is fast enough that it wouldn't even cause a single frame to drop unless you were in a large map with density set high. It's also why the console variables all changed from 2.1.0 onward.



But that's beside the point. Stuff like this is set up the way it is for the benefit of the menus. If you ever tried fiddling with the precipitation visibility distance in older versions, you'd see exactly what I'm talking about; it was excruciating trying to change that in the menu, advancing just by ones.

Changing density not causing a reload is part laziness, part not wanting to delete and respawn all precipitation if someone falls asleep holding the right arrow in the menu.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top