Snow and Rain, fully working

Search, find and discuss about Mutators!

Snow and Rain, fully working

Postby JackGriffin » Sat Oct 14, 2017 2:14 am

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 127 times

SnowForUT.zip
(10.41 KiB) Downloaded 142 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 ;)
"You damn kids, back in my time we made the items, maps and games ourselves with an unwieldy engine using counter-intuitive crash-prone tools and we liked it so much we built communities around this which nowadays look like cults because they're quasi-parallel societies based on the same old games." -Hellkeeper
User avatar
JackGriffin
Godlike
 
Posts: 3723
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: Hack coder

Re: Snow and Rain, fully working

Postby ShaiHulud » Sat Oct 14, 2017 3:23 am

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.
ShaiHulud
Adept
 
Posts: 341
Joined: Sat Dec 22, 2012 6:37 am

Re: Snow and Rain, fully working

Postby JackGriffin » Sat Oct 14, 2017 3:31 am

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.
"You damn kids, back in my time we made the items, maps and games ourselves with an unwieldy engine using counter-intuitive crash-prone tools and we liked it so much we built communities around this which nowadays look like cults because they're quasi-parallel societies based on the same old games." -Hellkeeper
User avatar
JackGriffin
Godlike
 
Posts: 3723
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: Hack coder

Re: Snow and Rain, fully working

Postby Dr.Flay » Sat Oct 14, 2017 6:49 am

Very cool idea with the dragons (no pun intended).
Will these also work in Unreal ?
User avatar
Dr.Flay
Site Staff
 
Posts: 3155
Joined: Thu Aug 04, 2011 9:26 pm
Location: Kernow, UK
Personal rank: Chaos Evangelist

Re: Snow and Rain, fully working

Postby JackGriffin » Sat Oct 14, 2017 2:36 pm

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.
"You damn kids, back in my time we made the items, maps and games ourselves with an unwieldy engine using counter-intuitive crash-prone tools and we liked it so much we built communities around this which nowadays look like cults because they're quasi-parallel societies based on the same old games." -Hellkeeper
User avatar
JackGriffin
Godlike
 
Posts: 3723
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: Hack coder

Re: Snow and Rain, fully working

Postby SC]-[WARTZ_{HoF} » Sat Oct 14, 2017 5:08 pm

Damn you Kelly.... Now I'm gonna have to try this on some of my own maps. :gj:
Image
Image
Image
SC]-[WARTZ_{HoF}
Adept
 
Posts: 386
Joined: Tue Feb 21, 2012 7:29 pm

Re: Snow and Rain, fully working

Postby OjitroC » Sat Oct 14, 2017 7:34 pm

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
OjitroC
Godlike
 
Posts: 1012
Joined: Sat Sep 12, 2015 8:46 pm

Re: Snow and Rain, fully working

Postby UnrealGGecko » Sun Oct 15, 2017 7:33 pm

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!
"NHL Rock The Rink" (PS1) announcer wrote:...And there are no stunt doubles in this game, folks!

My work for UT99: Counter-Strike VP, MaleOne+ & FemaleOne+ voicepacks (NEW!), DM-XC-NaliTreeV2 (from the ut99.org Xmas Contest mappack), my small spec of files at Google Drive

List of console converted maps, models & more!
User avatar
UnrealGGecko
Site Staff
 
Posts: 2125
Joined: Wed Feb 01, 2012 11:26 am
Location: Kaunas, Lithuania
Personal rank: GEx the Gecko

Re: Snow and Rain, fully working

Postby ShaiHulud » Wed Oct 18, 2017 2:51 am

Just had an opportunity to try this out - gorgeous! Worked a treat with Trace (to the sky/ceiling) + mutate command and dynamic instantiation.
ShaiHulud
Adept
 
Posts: 341
Joined: Sat Dec 22, 2012 6:37 am

Re: Snow and Rain, fully working

Postby JackGriffin » Wed Oct 18, 2017 3:48 am

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.
"You damn kids, back in my time we made the items, maps and games ourselves with an unwieldy engine using counter-intuitive crash-prone tools and we liked it so much we built communities around this which nowadays look like cults because they're quasi-parallel societies based on the same old games." -Hellkeeper
User avatar
JackGriffin
Godlike
 
Posts: 3723
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: Hack coder

Re: Snow and Rain, fully working

Postby Carbon » Wed Oct 18, 2017 9:03 am

Pretty cool Jack! Maybe could be put to good use in the next mapping contest! "Snow / Rain themed". Well done mate. :tu:
User avatar
Carbon
Inhuman
 
Posts: 822
Joined: Thu Jan 17, 2013 1:52 pm
Personal rank: Hoarder.

Re: Snow and Rain, fully working

Postby darkbarrage99 » Sun Oct 29, 2017 12:00 am

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
User avatar
darkbarrage99
Average
 
Posts: 34
Joined: Fri Jan 02, 2009 12:41 am
Location: VA, USA

Re: Snow and Rain, fully working

Postby JackGriffin » Sun Oct 29, 2017 3:02 am

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.
"You damn kids, back in my time we made the items, maps and games ourselves with an unwieldy engine using counter-intuitive crash-prone tools and we liked it so much we built communities around this which nowadays look like cults because they're quasi-parallel societies based on the same old games." -Hellkeeper
User avatar
JackGriffin
Godlike
 
Posts: 3723
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: Hack coder

Re: Snow and Rain, fully working

Postby nogardilaref » Sun Oct 29, 2017 11:48 am

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.
nogardilaref
Masterful
 
Posts: 581
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

Re: Snow and Rain, fully working

Postby Terraniux » Sun Oct 29, 2017 12:24 pm

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:
Terraniux
Masterful
 
Posts: 623
Joined: Mon Jan 05, 2009 8:08 pm

Next

Return to Mutators

Who is online

Users browsing this forum: No registered users and 1 guest