Snow and Rain, fully working

Search, find and discuss about Mutators!
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Snow and Rain, fully working

Post by JackGriffin »

Now that the contest is closed I'm going to start sharing some of the things that are both part of paper and I's entry as well as some of the things I learned as I was trying to accomplish what's in the map proper.

One of the missing things in UT was good, working, fixed, online ready snow and rain. I looked at all the released weather mods and all of them had some sort of issue(s). Some looked great but didn't work online. Some worked online but were made in a way that wasted resources and the longer they ran the more it impacted the server. I wanted effects that could be specifically placed (not zone weather) that looked right but also was coded correctly. Well, here you go:
RainForUT.zip
(81.97 KiB) Downloaded 236 times
SnowForUT.zip
(10.41 KiB) Downloaded 249 times
To use just open the mod in editor and place the SnowActor or RainActor wherever you want the weather effect. Once placed you'll see configurations that will allow you to tweak to your desired level. The actors can be map placed like normal but they are also capable of being tied to something that moves. I fully plan on using these with my Ice and Nature Dragons to give a roaming weather effect that moves along with the monsters as they do their thing.

Enjoy!

(Developer talk from here on. If you are a mapper you can skip it)
The source code is included, please feel free to recycle as you wish. A VERY large part of this was done by MasterKent at OU because I was having serious problems getting the particles to recycle properly. A key (but missing) thing for weather is to properly recycle your snow flakes or rain drops. If you don't it becomes a hit to the server over time as all those actors are destroyed without a proper garbage collection (more on that in another post). These new weather emitters are done so that the server gets as minimum a hit as possible, considering you are spawning a couple hundred actors in a very short time. I'm interested in testing this further online, I want to see how dense the storms can be before the server starts to show strain from it. The mod is defaulted to an area of 512uu and 150 drops. This gives a solid effect of precipitation without trying to do too much.
Anyways I hope you guys get good use from these. There's a lot of work in there trying to get them right and I'm really proud they are correct. If you do use these please credit MasterKent in your code. He's a fantastic dude and deserves recognition. I don't care about my work, I'll know it when I see it ;)
So long, and thanks for all the fish
ShaiHulud
Adept
Posts: 459
Joined: Sat Dec 22, 2012 6:37 am

Re: Snow and Rain, fully working

Post by ShaiHulud »

This sounds very cool. For giggles I was hoping to be able to generate a snow effect that I could call up "on demand" with a mutate command for any given map. I tried modifying an existing example, but I was rushing it and didn't investigate too deeply.
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Snow and Rain, fully working

Post by JackGriffin »

This would work but you'd need to give the actor a spawn coordinate.

You could maybe use this code and trace upwards to find the "roof" and spawn it where desired. It wouldn't be hard to side trace once it found a spot and then let it self-configure given the amount of "sky" it had to work with. That's all kinda hacky though. You need a per-zone effect really.
So long, and thanks for all the fish
User avatar
Dr.Flay
Godlike
Posts: 3347
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: Snow and Rain, fully working

Post by Dr.Flay »

Very cool idea with the dragons (no pun intended).
Will these also work in Unreal ?
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Snow and Rain, fully working

Post by JackGriffin »

Yes, this code will work in Unreal but I'm going to make a specific version for 227. The improved emitter classes allow me to make more realistic effects. The snow will look better. I plan on giving the falling flakes the slightest trail so visually they look more like they are falling than just dropping (if that makes sense). I'm also going to melt the snow when it hits the ground and even have it create a small wet drip that will run down the sides of inclined surfaces. Now that there is a good working base the time spent on all this little stuff is really worth it.
So long, and thanks for all the fish
SC]-[WARTZ_{HoF}
Adept
Posts: 426
Joined: Tue Feb 21, 2012 7:29 pm

Re: Snow and Rain, fully working

Post by SC]-[WARTZ_{HoF} »

Damn you Kelly.... Now I'm gonna have to try this on some of my own maps. :gj:
Image
Image
Image
User avatar
OjitroC
Godlike
Posts: 3601
Joined: Sat Sep 12, 2015 8:46 pm

Re: Snow and Rain, fully working

Post by OjitroC »

Loved the effects in MansionOfChaos so tried out the Snow effect (off-line) in a converted WOT map (not made or converted by me) and it's really nice - just a couple of dumb questions about the SnowActor properties
- Is there a recommended maximum for MaxDrops? Can one have a dense blizzard, for example?
- really dumb here, not sure what the Height property refers to? Not the height of the actor in the map obviously - in the map the snow falls from where the actor is placed and the Height property is set at the default 0.

Tried out the RainActor in another map but it didn't work, probably due to the map so will give it a go in this map.
User avatar
UnrealGGecko
Godlike
Posts: 2894
Joined: Wed Feb 01, 2012 11:26 am
Personal rank: GEx the Gecko
Location: Kaunas, Lithuania
Contact:

Re: Snow and Rain, fully working

Post by UnrealGGecko »

Topic split as it got derailed really quick there. :noidea

Anyways. Really looking forward to trying these out. Big succer for properly done weather effects, and the MansionOfChaos ones were top notch. Well done!
ShaiHulud
Adept
Posts: 459
Joined: Sat Dec 22, 2012 6:37 am

Re: Snow and Rain, fully working

Post by ShaiHulud »

Just had an opportunity to try this out - gorgeous! Worked a treat with Trace (to the sky/ceiling) + mutate command and dynamic instantiation.
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Snow and Rain, fully working

Post by JackGriffin »

You have no idea how good that makes me feel :rock: My original idea was to make clouds that floated around in the sky but paper felt it was too cartoonish (and he was right). Still, it's a valid idea because you could place this under an ice ledge and it would look like dripping runoff, add it to a waterfall, make a very damp and drippy cavern roof, etc. It's not *just* rain, really it's any number of wet environmental enhancements.
So long, and thanks for all the fish
User avatar
Carbon
Inhuman
Posts: 855
Joined: Thu Jan 17, 2013 1:52 pm
Personal rank: Hoarder.

Re: Snow and Rain, fully working

Post by Carbon »

Pretty cool Jack! Maybe could be put to good use in the next mapping contest! "Snow / Rain themed". Well done mate. :tu:
User avatar
darkbarrage99
Skilled
Posts: 179
Joined: Fri Jan 02, 2009 12:41 am
Personal rank: Barron O' Beefdip
Location: VA, USA

Re: Snow and Rain, fully working

Post by darkbarrage99 »

great job! i love it. :mrgreen:

i threw the rain and snow on a map i tossed together years ago just to see how it all worked and it looks awesome falling in. just one thing, as you can see in the attached image i have a ring of water surrounding the udamage. as the rain drops hit solid surfaces they form splashes, but as they hit the water there is no effect. if anything in this instance i'd like to have the opposite happen, where there are splashes on the water, and no splashes / less pronounced splashes on the solid spots. naturally the same thing happens with the snow, which at least makes sense in a situation like this since snow melts into water without a splash while slowly melting into ground.

I am just a simple lurker who by no means is an expert on mapping or coding, so i don't know if this has anything to do with zoning or not, but I thought it would be a good thing to bring up if you're still interested in improving this effect and adding additional options.

Image
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Snow and Rain, fully working

Post by JackGriffin »

The problem is there is no definitive way to define "water" or "lava" or "ice". It's most likely a textured sheet but it may or may not also have a zone portal. I could code checks for sheets/zone portals but it could easily make many more problems than it fixes since there is no sure way to define if a sheet is the top of a body of water or the edge of a fog zone.

If you are a mapper and you want to use these and you are in some situation like this *please* don't hesitate to drop me an email. I'd be happy to customize the rain/snow so it works like you need it to in your specific map. If I were going to fix dark's map I'd add a check for that particular sheet and spawn proper effects if it is hit. That's very easy to do, it's just that you almost have to deal with this on a case-by-case basis.

Edit: damn that got me thinking..having rain spawn a puff of steam when it hits lava would be a very cool effect. I'll have to think about this and maybe figure some way to make it configurable.
So long, and thanks for all the fish
nogardilaref
Masterful
Posts: 577
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

Re: Snow and Rain, fully working

Post by nogardilaref »

Water to be water, and lava to be lava, generally has a WaterZone and LavaZone respectively, so I guess all you need to do is on zone change to check if the new zone is one of those.
It won't be definitive as you mentioned, since one could use a normal or even custom ZoneInfo to replicate what the water and lava zones do, but it's generally not the case so it should work in 98% of the cases.

And then, instead of spawning whichever effect on the current location of the particle, you can spawn it at its OldLocation (the location in the previous tick).

This will be tick dependent though, depending on the tick rate (frame rate of the client to be more exact) and the speed of the particle itself, and its offset from the sheet in the previous tick, this location might be noticeably higher than where the sheet resides for some particles.
But there is a fairly fast way to detect where the sheet is exactly with whichever precision you need, up to the point you could spawn a ripple right on top of the sheet, but this would be only something to look into if the tick rate and particle speed actually become a noticeable problem in the first place.
Terraniux
Masterful
Posts: 717
Joined: Mon Jan 05, 2009 8:08 pm
Personal rank: Banished member

Re: Snow and Rain, fully working

Post by Terraniux »

Can this be used in a reversed way? Instead of falling down, they go up? If so , YES!!!. This will give my crystals in future maps extra sparkling and shinynes. :mrgreen: :loool:
This member can only post when permitted.
Post Reply