infestation with fog
Racer1
Join Date: 2002-11-22 Member: 9615Members
It would be great to see a heavy fog, perhaps 2 feet high -- high enough for skulks to sneak around in (perhaps with crouch?), but low enough that they couldn't just run around and not be seen. I don't know if the game engine would support it, though.
For balance, here are a few options:
- so not present initially - maybe available at second hive as an upgrade
- require a gorge to replenish the fog
- tied to a specific structure
For balance, here are a few options:
- so not present initially - maybe available at second hive as an upgrade
- require a gorge to replenish the fog
- tied to a specific structure
Comments
Not sure if you could practically get it to work on a placeable structure, because nothing stops you placing tonnes of it and melting the GPU.
Better as a location specific effect I think.
Linear, constant density fog volumes shouldn't be that terribly expensive unless you have massive overdraw(think crepuscular rays streaming from a grating in the ceiling. so that many slices of fog, each covering much of the screen, gets drawn).
There may be precision issues(which I believe could be worked around quite easily if they occur), but I think you could just render the fog volume to a floating point buffer(lets call it the "fog buffer") in two steps. First step is to have z-writes off, z-culling on, backface culling on; backfaces don't get rendered. Second pass you have z-writes off, z-culling on and front-face culling on so only back-faces get drawn. The first pass adds fog that extends from the front faces all the way back to the z-value in the z-buffer, the second pass takes fog away. Since the back-faces are always further away on any model in which normals face the correct direction you always get the correct sign on fog; in any closed mesh there are as many backfaces covering any given pixel as there are front faces(any ray that goes into the model must come out, if it goes into the model twice it must come out twice).
There is a corner case you have to deal with, being inside the fog volume. If the entire fog volume is completely behind you you don't have to render it; but if you could be inside it you should render faces even if they are behind you, using the z-value of the near clip plane or the z-value of the of the fragment, whichever is bigger.
If you can see all the way to the far z-clip, then the cancellation error might cause unacceptable banding for thin fog volumes. In that case, find a z-value that is just behind the fog volume being rendered; when rendering, select the smallest value between the z-buffer and your z-max value in the pixel shader.
Since it's linear, you can render the fog volumes in any order you wish and with any fog density or colour you wish without conflict.
Each infestation patch could then use 1 or 2 fog volumes. 2 fog volumes probably looks a bit nicer. These fog volumes could simply be low-poly oblate spheroids centered on the middle of the infestation patch; the bigger fog volume being less dense and the smaller fog volume being more dense.
<!--quoteo(post=1840653:date=Apr 12 2011, 06:58 AM:name=Chris0132)--><div class='quotetop'>QUOTE (Chris0132 @ Apr 12 2011, 06:58 AM) <a href="index.php?act=findpost&pid=1840653"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Not sure if you could practically get it to work on a placeable structure, because nothing stops you placing tonnes of it and melting the GPU.<!--QuoteEnd--></div><!--QuoteEEnd-->
The game prevents you from placing infestation patches ontop of one-another. Distant fog volumes cover less pixels and should require much less bandwidth.
DI exhausts flammable fog, problem solved!
Hives exude fog, as the hive grows (upgrades) the fog becomes denser and can be upgraded to act as a flame-retardant that extinguished aliens on fire or cuts the burn damage/time in half.
Perhaps as an alternative upgrade, the fog could have umbra-esque qualities but far less. 1 in 10 perhaps.