Rolling ground fog
Yamazaki
Join Date: 2002-01-24 Member: 21Members, NS1 Playtester, Contributor
<div class="IPBDescription">A little ambient effect</div>I was helping out Stupid Pinky in making some ground fog, but the solution I came up with didn't fit his exact requirements. However the solution works in other situations, so I'm posting it here.
Attached is a ZIP of a BMP for a mist texture. I made it in 10 seconds with Photoshop's Pattern Overlay blending option, with the Cloud overlay. Nothing fancy, but it looks quite nice.
Just save it in a WAD with the name 'scrollfog' (Or anything with the word scroll at the beginning). Set up 2-3 func_conveyors in your room, each one paper thin and no higher than 32 units (So at 8, 16 and 24, or 16 and 32, etc.). Texture the tops with 'scrollfog', and the other sides with 'null'. Set them to additive, with a render amount of 32-64. Set a different speed for each layer, with the lower layers going slower than the top. I suggest speeds between 0 and 16 (Non-moving fog looks fine too). Now you just adjust the direction as you see fit and you're done.
Just remember you can't actually enter this kind of fog. It has no internal fogging effect. It's only use is to add a nice effect to the floor if you have mist crawling on the ground. If you manage to crouch inside the fog you'll see how paper thin it is, so make sure the player can never enter it.
You can stretch the fog texture if r_speeds are an issue, but a 512x512 room with 3 layers of fog will only get an extra 54 wpoly from this effect, and 36 wpoly for 2 layers. Stretching it to 2x will give you 24 wpoly for 3 layers and 16 wpoly for 2 layers.
The real framerate impact is not from the extra wpoly, but from the transparencies being layered over each other. Keep this in mind. Avoid placing the fog over other transparent brushes if at all possible, and avoid using particle effects or sprites that are underneath the fog. If you heed this advice your framerate will not drop.
Attached is a ZIP of a BMP for a mist texture. I made it in 10 seconds with Photoshop's Pattern Overlay blending option, with the Cloud overlay. Nothing fancy, but it looks quite nice.
Just save it in a WAD with the name 'scrollfog' (Or anything with the word scroll at the beginning). Set up 2-3 func_conveyors in your room, each one paper thin and no higher than 32 units (So at 8, 16 and 24, or 16 and 32, etc.). Texture the tops with 'scrollfog', and the other sides with 'null'. Set them to additive, with a render amount of 32-64. Set a different speed for each layer, with the lower layers going slower than the top. I suggest speeds between 0 and 16 (Non-moving fog looks fine too). Now you just adjust the direction as you see fit and you're done.
Just remember you can't actually enter this kind of fog. It has no internal fogging effect. It's only use is to add a nice effect to the floor if you have mist crawling on the ground. If you manage to crouch inside the fog you'll see how paper thin it is, so make sure the player can never enter it.
You can stretch the fog texture if r_speeds are an issue, but a 512x512 room with 3 layers of fog will only get an extra 54 wpoly from this effect, and 36 wpoly for 2 layers. Stretching it to 2x will give you 24 wpoly for 3 layers and 16 wpoly for 2 layers.
The real framerate impact is not from the extra wpoly, but from the transparencies being layered over each other. Keep this in mind. Avoid placing the fog over other transparent brushes if at all possible, and avoid using particle effects or sprites that are underneath the fog. If you heed this advice your framerate will not drop.
Comments
If you don't its not a problem, but if you dont ask you already have no for an answer.
<a href="http://chal.basicbee.com/spiffy/fogtest.zip" target="_blank">TestMap</a>
like in resident evil you know?