Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Adding fog to level with sprite images

Recommended Posts

So I managed to create a foggy ground with my own warping texture on multiple 3d floor layers. I also want to create fog above it. Ive tried to look at some sfx especially one called FOG_Generater. But for the life of me I cant get it to show up in GZDoom Builder. How do I go about making one myself. Ive tried reading up on the decorate thing on wiki but dont understand it to well. Im basically wanting to place a fog sprite down that may have a few frames of animation.


Any ideas. Thanks.

Share this post

Link to post

If I understand you properly (I may not, but I hope I am), the fog generator you're referring to is that from Realm667. That works based on the values you assign in its arguments, which means it only works while testing in-game.


But! Let's say we didn't want to use that. Fuck that shit, let's make our own fog that we can apply anywhere we please and don't have to write those stupid arguments for.

I'm actually really jovial about this, not sarcastic, because I like writing DECORATE things.

So, lets get started, yes?

I'm going to write up a sample DECORATE actor and explain as much as possible through comments.

actor MyCoolFog 10000 //This number, 10000, is the DoomEdNum, which allows us to place this in the editor. The 10000 makes sure there are no conflicts with existing actors.
 Alpha 0.35 //I forgot to add this at first, but this will make the fog render at 35% opacity, instead of 100%, so it is about 2/3 translucent.
 Radius 32 		//This fog will be 64 units across.
 Height 16 		//It will be 16 units high.
 ProjectilePassHeight -16 		//This is pointless because the fog is unblocking, but this dictates the height at which projectiles can pass over the thing.
 		//If you omit this property, then the actor's height, here 16, would be used.
 -SOLID 		//We obviously don't want our fog to be blocking. You don't have to write this, but I did so you know how to apply flags to actors.
 				//To make this solid, you would write +SOLID instead of -SOLID, which makes it not block the player and monsters.
 //Now let's write the states.
 { 			//You need opening and closing braces for states like anything else you're coding in ACS.
  Spawn: 		//This state is automatically called when the actor is placed and the map begins.
  FOG1 ABCDCB 8 	//This will cause the fog sprites, here FOG1, to cycle across FOG1A0, FOG1B0, FOG1C0, FOG1D0, and back, taking eight tics for each frame.
  loop 			//This is obivous. The state will loop, causing this fog to animate like this perpetually.
 } //In the states, you could append Bright to the end of the FOG1 ABCDCB 8 line to make it full-bright, if you wanted.

Hope that helps.

Share this post

Link to post

Thank you so much. After a tinker and loading in a seperate pk3 with my sprites folder and fog sprites worked a treat. Will be reworking the fog sprites better because they look abit crap at the moment. But seriously thank you so much. I will post a video of it once I set it up.



Share this post

Link to post

this effect is incredible.  Any chance you could make a standalone mod that would put appropriately colored fog above lava, water, toxic stuff?  

Share this post

Link to post

I know this is a bit of a necrothread, but I've been tinkering a fair bit with fog effects recently for use in a Dark Episode map of Elementalism.  I realized static sprites used for fog (such as in the above video) look fine, but there are a couple of major limitations.  1)  It's clear the sprites are just static images, when real fog drifts around.  2) As you walk through the sprites, they fill the screen and then disappears abruptly as you pass through them.  Real fog has thickness, so smoothly fades from view as you pass through it.  


The solutions were firstly to use the Animdef's WARP function to make the sprite lazily drift around in the air (full credit to Batandy for this idea), and secondly to write a script that dynamically increased the transparency of the sprite the closer the player gets, to the extent it turns completely invisible as the player passes through before fading back in as the player leaves.


The final result looks like this:




Share this post

Link to post
15 hours ago, Empyre said:

But what if another player is watching you move around that room?


Then they'll see the fog gently fade from view and reappear behind the player? That or it doesn't work at all in co-op.  I didn't design it with co-op in mind so to be honest I didn't really think about it!

Edited by Bauul

Share this post

Link to post

I make maps and mods to put them on my Zandronum coop server, so I am always thinking about coop. Doom is even more fun when shared with other players, at least ones who are not jerks.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now