Waterfall fog effect [zscript]

Sprites, textures, sounds, code, and other resources belong here. Share and share-alike!
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
  • Is the resource ENTIRELY my own work?
  • If no to the previous one, do I have permission from the original author?
  • If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
If you answered no to all three, maybe you should consider taking your stuff somewhere other than the Resources forum.

Consult the Resource/Request Posting Guidelines for more information.

Please don't put requests here! They have their own forum --> here. Thank you!

Waterfall fog effect [zscript]

Postby Jekyll Grim Payne » Tue Jun 23, 2020 6:17 am

This contains ZScript code for waterfall fog spawner, meant to be placed at the bottom of waterfalls. Feel free to use this in your maps. Credits are appreciated but not required.

DOWNLOAD: https://github.com/jekyllgrim/Waterfall ... m/releases



Sprites are made from free resources available online. Feel free to replace them if you like.

How to use in your map:

- Place thing 20100 "WaterfallFogSpawner" at the edge of your waterfall (where the fall connects with the body of water underneath)

- Make sure WaterfallFogSpawner angle is set so that it's facing ALONGSIDE the waterfall line:


- Open WaterfallFogSpawner's properties in Doom Builder, navigate to 'Action / Tag/ Misc.' tab to access arguments. Changing the arguments will affect the fog's appearance in the following way:

  • Argument 1:Determines the length of the line along which the effects will spawn. Use the same value as your waterfall's linedef length. 0 (default) will make it spawn over a small area (useful for small water pillars and such).
  • Argument 2: Determines the color of the splashes:
    0: regular blue
    1: red
    2: green
    3: yellow
    4: purple
    5: dark-orange
    6: white
  • Argument 3: Scales the size of the splashes from x1 to x8 (higher values will look the same as x8). 0 (default) is interpreted as 1. Note that scale will affect visible size, so at high values you might want to reduce the value of Argument #1.
User avatar
Jekyll Grim Payne
 
Joined: 21 Jul 2008
Discord: Agent_Ash#4401
Github ID: jekyllgrim
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: Waterfall fog effect [zscript]

Postby Bratish » Tue Jun 23, 2020 8:55 am

Man, you're a genius! I am not a programmer, but in my opinion your mod is really very useful and I would love to take it to my TC, but, alas, it is only for GZdoom 2.0.03, where ZScript has not been yet, and therefore I can only look at your screenshots and sigh.

And so, I repeat, your mod is just wonderful! I wish you success in your work.
User avatar
Bratish
I have nothing to lose
 
Joined: 23 Jul 2019
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Legacy GZDoom)

Re: Waterfall fog effect [zscript]

Postby Jekyll Grim Payne » Wed Jun 24, 2020 5:29 am

Bratish wrote:I would love to take it to my TC, but, alas, it is only for GZdoom 2.0.03, where ZScript has not been yet, and therefore I can only look at your screenshots and sigh.


It would theoretically be possible to do this without zscript, but apart from being much more complicated and cumbersome, it would also have a greater performance impact (I've used some zscript-specific methods to make these objects as cheap as possible), so I probably won't be doing that. (I do kinda have to wonder why you're limited to a specific GZDoom version...)
User avatar
Jekyll Grim Payne
 
Joined: 21 Jul 2008
Discord: Agent_Ash#4401
Github ID: jekyllgrim
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: Waterfall fog effect [zscript]

Postby Enjay » Wed Jun 24, 2020 9:23 am

Works very nicely.

It would be cool if you included your test map with the distribution so that people could see it in action quickly, but it's easy enough to set up anyway.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Waterfall fog effect [zscript]

Postby Jekyll Grim Payne » Wed Jun 24, 2020 10:45 am

Enjay wrote:Works very nicely.

It would be cool if you included your test map with the distribution so that people could see it in action quickly, but it's easy enough to set up anyway.


Yes, I've thought about it, but I'm not sure how to best arrange that so that it doesn't interfere with people who just want the effect in their maps. Maybe just attach the wad file to the github release?
User avatar
Jekyll Grim Payne
 
Joined: 21 Jul 2008
Discord: Agent_Ash#4401
Github ID: jekyllgrim
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: Waterfall fog effect [zscript]

Postby Enjay » Wed Jun 24, 2020 10:50 am

Yes, I would think that would work just fine.

I don't think your concern is a big one anyway. If people want to incorporate it into their maps properly, they'll need to put the separate elements into their project PK3 and they could just leave the map WAD out.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Waterfall fog effect [zscript]

Postby Jekyll Grim Payne » Wed Jun 24, 2020 11:23 am

Did just that, attached a demomap.wad to the release.
User avatar
Jekyll Grim Payne
 
Joined: 21 Jul 2008
Discord: Agent_Ash#4401
Github ID: jekyllgrim
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: Waterfall fog effect [zscript]

Postby Enjay » Wed Jun 24, 2020 1:10 pm

Very nice - thank you. :)
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Waterfall fog effect [zscript]

Postby ramon.dexter » Wed May 19, 2021 2:43 am

While this effect is truly beautiful and looks real, it is highly demanding on system resources. When I put like 20 waterfall spawners around my map, the FPS dropped from average 25 (old i5 with intel integrated graphics) to something lower than 15 fps, sometimes like 5 fps. When I removed the waterfall actors from the map, it is back on 25.
Could you try to optimise this? The performance impact on my newer system is less than noticeable (ryzen 7 3750 and rtx 2060), but my second laptop is barely struggling to run it.
User avatar
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Resources

Who is online

Users browsing this forum: No registered users and 0 guests