Author Topic: Most simplistic way to achieve rain effect?  (Read 4121 times)

Offline Since5

  • Commonus
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 18
Most simplistic way to achieve rain effect?
« on: June 05, 2016, 08:29:19 PM »
I've spent the better part of this afternoon searching through various doom modding websites and forums to no avail-- does anyone know of a simplistic way to achieve a rain effect in chex maps? I know I very, very technically pulled it off once before by making an animated texture on a grid, but I'm talking about a way to do it more convincingly through DECORATE and/or a map's ACS script. The few options I've found have either been too outdated (e.g. Rain Simple: http://realm667.com/index.php/en/sfx-shoppe-mainmenu-139-58855/weather-generators-mainmenu-144-68253) or too a bit too complex to integrate for just a rain effect. (e.g. https://www.youtube.com/watch?v=OrUu9gy4V8o, which I'm not even sure is compatible with Zandronum.)

Anyone have any ideas?

Chex Quest Fan Forums

Most simplistic way to achieve rain effect?
« on: June 05, 2016, 08:29:19 PM »

Offline Boingo the Clown

  • Global Moderator
  • Flembrane
  • *****
  • Thank You
  • -Given: 6
  • -Receive: 63
  • Posts: 2462
  • Losing my grip on reality since 1973.
    • DooM Legends
Re: Most simplistic way to achieve rain effect?
« Reply #1 on: June 06, 2016, 02:26:08 AM »
Forgive me if this sounds lame, but I get a strong impression in *Minecraft* that snow is just a scrolling transparent texture.  I suppose it could be done in DooM/CQ, but it would require an absurd number of lines in the map, and would likely slow the game to a crawl.

The video below shows snow in Minecraft starting at 3:20

<a href="http://www.youtube.com/watch?v=iGFZ5anQ6AM" target="_blank">http://www.youtube.com/watch?v=iGFZ5anQ6AM</a>

And here is another video showing snow.

<a href="http://www.youtube.com/watch?v=Go-KXFR0Zbo" target="_blank">http://www.youtube.com/watch?v=Go-KXFR0Zbo</a>

Instead of an absurd number of lines for snow, I would like to suggest using some form of model with an animated transparent texture, and have it follow the player around.

As for rain, Heretic has an upgraded version of the Hellstaff using the tome of power that that generates a rain of energy.  As far as I know, it just moves the projectile to the ceiling and spawns the rain.

Here is an example of it here at 1:10.

<a href="http://www.youtube.com/watch?v=o8cePomOyFA" target="_blank">http://www.youtube.com/watch?v=o8cePomOyFA</a>

http://zdoom.org/wiki/Classes:HornRodFX2 for more information.

I am certain rain can be similated by creating an object that follows the player around spawning rain drops.

I hope this helps.

Offline darkstone

  • Modding... modding... pulling hair out... modding...
  • Cycloptis
  • **
  • Thank You
  • -Given: 5
  • -Receive: 3
  • Posts: 337
Re: Most simplistic way to achieve rain effect?
« Reply #2 on: June 06, 2016, 10:52:42 AM »
I can confirm that weather effects in Minecraft are just textures, 16 wide each of them and displaying perfectly above each block in the player's range. In fact, if the player gets far enough from the rain and is under shelter, they can no longer see it 'cause it stops rendering. Snow same.
The rain itself also spawns particles on the ground, splash particles, which are in fact responsible for the rain sound - if you turn of particles, the entities don't spawn and POOF silent rain.

I tried to achieve rain in CQ once by spawning masses of falling actors from everywhere there was sky, but this only worked in Caverns of Bazoik without incredible lag.

An idea: ACS might be used to display rain/snow in the GUI

Offline Boingo the Clown

  • Global Moderator
  • Flembrane
  • *****
  • Thank You
  • -Given: 6
  • -Receive: 63
  • Posts: 2462
  • Losing my grip on reality since 1973.
    • DooM Legends
Re: Most simplistic way to achieve rain effect?
« Reply #3 on: June 06, 2016, 11:17:44 AM »
I wouldn't have particles falling everywhere in the sky.  I would just have them within a limited range of the player, like a 256 unit radius.

Offline ChexMaster2109

  • Self-Proclaimed ACS Grandmaster
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 18
  • -Receive: 29
  • Posts: 4307
  • If life gives you lemons, give its lemons back!
    • Chex Quest: Reflections
Re: Most simplistic way to achieve rain effect?
« Reply #4 on: June 06, 2016, 07:07:10 PM »
TBH, I don't know why the first one you linked (The Rain Spawner from Realm667) wouldn't work. It would probably require some tweaking, but that general concept should work just fine.


It should be fairly easy to setup two DECORATE actors, one for the raindrop, and one for the spawner. I don't see why you think the Realm667 one is 'outdated'.
Shh!  I'm taking a break from reality.

John 3:16
For God so loved the world, that he gave his only son, that whoever believes in him shall not perish, but have eternal life!

Give God your life; You won't regret it!

Offline TrueDude

  • Cycloptis
  • **
  • Thank You
  • -Given: 6
  • -Receive: 6
  • Posts: 478
Re: Most simplistic way to achieve rain effect?
« Reply #5 on: June 07, 2016, 06:57:15 PM »
If you want to see how the minecraft way looks in doom, look up Sonic Doom 2. It's... Not great.

Offline Since5

  • Commonus
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 18
Re: Most simplistic way to achieve rain effect?
« Reply #6 on: June 08, 2016, 09:03:35 PM »
Hmm. As per the videos/suggestions, a sort of drifting set of textures following the player could work, I suppose. It would take a bit of decent artwork to make it look convincing, but that's not impossible. A GUI layer is an interesting idea as well. In regard to the moving textures, I actually didn't know how that's how the precipitation system in Minecraft works... that's actually pretty interesting and I want to play around with that to see how it's made to look so good.

One concern I have when it comes to making an object which follows the player is that something like that might be tricky to control when it comes to going back and forth between indoor and outdoor places...but maybe i'm overthinking that aspect. 

ChexMaster-- "Outdated" was the wrong term, for sure, as it implies that the Realm667 method is obsolete, which it isn't. What I meant was, in a much more literal sense, it's just older (very, very relatively speaking) when compared to the many different iterations, upgrades, and changes to source ports over the years. I did attempt to implement it but it looked very strange.  It was probably unfair of me to give it one shot, through one source port (Zandronum) without tinkering with various visual settings and playing with the actual decorate variables some more to try to get a better result.

I will play with the decorate file some more and try to maybe implement a few different strategies based on what I've seen here and possibly post some results. Thank you all for the input so far!
« Last Edit: June 08, 2016, 09:07:49 PM by Since5 »

Offline Boingo the Clown

  • Global Moderator
  • Flembrane
  • *****
  • Thank You
  • -Given: 6
  • -Receive: 63
  • Posts: 2462
  • Losing my grip on reality since 1973.
    • DooM Legends
Re: Most simplistic way to achieve rain effect?
« Reply #7 on: June 08, 2016, 10:42:39 PM »
One concern I have when it comes to making an object which follows the player is that something like that might be tricky to control when it comes to going back and forth between indoor and outdoor places...but maybe i'm overthinking that aspect. 

There are two ways to keep such a thing restricted to where you want it to be.

1. Define it as a monster and place lines with the "Block monsters" attribute. (This may be troublesome, because the lines will block all monsters, and the object will cause the player to get less than 100% at the end of the level.)

2. Include the flag +CANTLEAVEFLOORPIC in the thing's DECORATE definition.  This will prevent the thing from crossing over from one floor texture to another, so it will be stuck in whatever area you place it in.  If you have it in a courtyard with grass, it will not be able to cross into a sector with a concrete floor.

Offline ChexMaster2109

  • Self-Proclaimed ACS Grandmaster
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 18
  • -Receive: 29
  • Posts: 4307
  • If life gives you lemons, give its lemons back!
    • Chex Quest: Reflections
Re: Most simplistic way to achieve rain effect?
« Reply #8 on: June 09, 2016, 12:06:26 AM »
I would modify the one on Realm667 to your specifications, then include something in the DECORATE such that it only spawns rain if your within a certain distance from it, so that your not spamming rain all over the map. Then stick them in your outdoor areas.
Shh!  I'm taking a break from reality.

John 3:16
For God so loved the world, that he gave his only son, that whoever believes in him shall not perish, but have eternal life!

Give God your life; You won't regret it!

Offline Since5

  • Commonus
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 18
Re: Most simplistic way to achieve rain effect?
« Reply #9 on: June 09, 2016, 10:03:11 PM »
I would modify the one on Realm667 to your specifications, then include something in the DECORATE such that it only spawns rain if your within a certain distance from it, so that your not spamming rain all over the map. Then stick them in your outdoor areas.

This is essentially what I've been screwing around with for the past hour and it's actually starting to come out decently. I'll have to post a little demo once I get it to a point I like.

Offline 75

  • [IFOC] Server Admin
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 29
  • -Receive: 26
  • Posts: 4232
    • IFOCSERV
Re: Most simplistic way to achieve rain effect?
« Reply #10 on: June 11, 2016, 02:37:57 PM »
I would strongly recommend that you not use the R667 rain spawner; QG and I tried using it for Chex Pack and we found out that individually spawning hundreds of single drop actors can definitely cause some lag. The R667 drip spawner is quite nice for a small amount of drips, though, e.g., if you want the roof of a cave or a pipe to drip; IMO you shouldn't have more than 20 R667 drip spawners in a map.

I've used a relatively small scrolling snow texture with the "wrap midtexture" flag set, it works good and looks realistic, if you look up it looks like it goes all the way up into the clouds. I think this could work for you, though it might be better to have a very tall animated texture instead,  if you would like to show rain splashes on the ground.

When I did the snow scrolling texture I think I only needed to divide up the area into 128 x 128 squares; note that if you use the scrolling textures method the optimization problem is *how many linedefs you can see*, you can work around this by having relatively small outdoor areas connected by doors/walls that go all the way up to the sky; if you can see every rain texture on the map at once you will probably have a problem; if you want an example of what this limit is, take a look at S9DM03 of SpaceDM9 ( https://www.doomworld.com/idgames/deathmatch/skulltag/spacedm9 ) , even on my core i5 / GTX 470 / 16 GB of RAM computer on software I get lag if I look in a certain direction where I can see all of the bridge linedefs.

If you would like another example of how you could do rain , take a look at Ghostbusters Doom MAP05. Ghostbusters Doom used an animated sprite to make the rain splash on the ground. If you make the sprite very, very tall, it should look pretty good, even with freelook. Remember that if you don't like the pixelated rain look, you can use TEXTURES to make a high resolution rain sprite animation.

The advantage of the ghostbusters animation is, rather than having one actor per raindrop, you have many raindrops per actor. You can get away with putting 10 or 20 sprites in a room rather than having hundreds of single drip sprites.

Link to ghostbusters doom: http://www.doomworld.com/gbd2/files/gbd2.zip
« Last Edit: June 11, 2016, 03:17:08 PM by 75 »
"Give us those nice bright colors, give us the greens of summer, makes you think all the world's a sunny day."

Want a place to talk about Chex Pack, or Chex Quest in general? Join #IFOC: irc://irc.zandronum.net/IFOC

Offline ChexMaster2109

  • Self-Proclaimed ACS Grandmaster
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 18
  • -Receive: 29
  • Posts: 4307
  • If life gives you lemons, give its lemons back!
    • Chex Quest: Reflections
Re: Most simplistic way to achieve rain effect?
« Reply #11 on: June 12, 2016, 03:49:17 AM »
The ghostbusters one is probably a good idea, but side note:

We've already covered how having so many small actors can cause lag; look earlier in the topic. Hence, it has been discussed to only have it activate when the players nearby; also look a few posts earlier (IE three posts ago). (No offense 75, but you might want to read more thoroughly :P)
Shh!  I'm taking a break from reality.

John 3:16
For God so loved the world, that he gave his only son, that whoever believes in him shall not perish, but have eternal life!

Give God your life; You won't regret it!

Offline darkstone

  • Modding... modding... pulling hair out... modding...
  • Cycloptis
  • **
  • Thank You
  • -Given: 5
  • -Receive: 3
  • Posts: 337
Re: Most simplistic way to achieve rain effect?
« Reply #12 on: June 12, 2016, 05:03:33 AM »
The ghostbusters one is probably a good idea, but side note:

We've already covered how having so many small actors can cause lag; look earlier in the topic. Hence, it has been discussed to only have it activate when the players nearby; also look a few posts earlier (IE three posts ago). (No offense 75, but you might want to read more thoroughly :P)
In addition, depending on size/shape of the sectors, it might be very slightly more efficient to have an actor that randomly spawns its rain over an area, achieving the same effect but with a smaller number of actors. (shrugs) It'd be up to the mapper to decide that.

Offline 75

  • [IFOC] Server Admin
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 29
  • -Receive: 26
  • Posts: 4232
    • IFOCSERV
Re: Most simplistic way to achieve rain effect?
« Reply #13 on: June 13, 2016, 06:37:35 PM »
We've already covered how having so many small actors can cause lag; look earlier in the topic. Hence, it has been discussed to only have it activate when the players nearby; also look a few posts earlier (IE three posts ago). (No offense 75, but you might want to read more thoroughly :P)

Ah, ok, sorry about that, I only had a few minutes to skim the topic -- I guess I missed that.

In addition, depending on size/shape of the sectors, it might be very slightly more efficient to have an actor that randomly spawns its rain over an area, achieving the same effect but with a smaller number of actors. (shrugs) It'd be up to the mapper to decide that.

That could work, instead of spawning a hundred single drops, spawn 10 "multidrop" actors with a sprite containing 10 drips, for example.
"Give us those nice bright colors, give us the greens of summer, makes you think all the world's a sunny day."

Want a place to talk about Chex Pack, or Chex Quest in general? Join #IFOC: irc://irc.zandronum.net/IFOC

Offline ChexMaster2109

  • Self-Proclaimed ACS Grandmaster
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 18
  • -Receive: 29
  • Posts: 4307
  • If life gives you lemons, give its lemons back!
    • Chex Quest: Reflections
Re: Most simplistic way to achieve rain effect?
« Reply #14 on: June 14, 2016, 12:50:06 AM »
If you get this working, it would be nice if you could share it :P I've been interested in a weather spawner for a while, but never quite found one to my taste. (The Realm667 one works just fine for me, but like we've covered, laggy)
Shh!  I'm taking a break from reality.

John 3:16
For God so loved the world, that he gave his only son, that whoever believes in him shall not perish, but have eternal life!

Give God your life; You won't regret it!

 


Web Hosting by InMotion Hosting