Rain Effects

I’ve started replacing the placeholder rain effects now that I’ve got some nice overcast lighting in.

I started off by extending the location, but found that getting an appropriate rate with that size was going to run incredibly slow. Luckily, I found that GPU particles could handle very large rates, as they only render if the player is looking at them. I started off with loads of particles, as can be seen here, and then tried to turn this into something a bit more sensible…



My original material was emissive, but an issue with emissiveness is that it can be seen nicley in the foregound, but its way too prominent in the background. I found the solution here was to divide the emissive colour by the pixel depth, so emisiveness was based on how close the material is to the player.

rain3 rain4

At this point it was looking a bit bare though – seems like I was either getting lots and lots of too obvious rain, or barley anything at all. I tried using the pixelDepth divded by the opacity, but this just made all the particles impossible to see.  There was also an issue with the GPU particles not using velocity over life. I thought that maybe a better solution here would be to attach the rain to the player, and have a radius from the player that it goes to. This would allow me to use CPU particles and render less of them.

I created a version of the effect with a small inital location and attached it to the player, but it wouldn’t render during play. Attaching a different effect to the character had the same effect.


It turned out the issue was that I had hide actor ticked in the defaults, so everything apart from the light was being hidden from the components of the MyCharacter blueprint. This meant I had to then go back in and delete the default mesh.


I experimented with different location sizes here, trying to get something that was efficient but didn’t make it obvious to the player that the rain is derived from them and not from the sky.

rain7 rain8

I eventually settled on a rectangular shape that was longer in the Y axis (unreal is Z up) so that the player would never see the edge of the effect.


Once this was in, I started looking at the rain from a more artistic direction, using real rain and in game rain as reference. I looked at rain in Heavy Rain and Minecraft, two very different styled games. Their similarity however was in how opaque their rain is compared to real life. Its pretty clear that its impossible to use a refractive material on thousands of particles, so these games tend to use a colour with their rain.

1da8baefscreenshot 1-2

2da10a38b29561b21691a91636a23f19 OLYMPUS DIGITAL CAMERA

I also had a video of GTA V’s rain and some real rain.

One of the first issues I had to fix here was that the rain was much brighter when the player is walking into it. This is because of my pixel depth emissive shader. I had a go using scene depth instead, but this was not the solution at all!


Taking away any kind of depth based rendering gave me so much more rain…I think I had forgotten about the material earlier!


I took away the emissive colour and just created a white base colour. This looked a lot better.



I then started to look into why there was more rain when still rather than when moving. The PSA velocity that I was using was part of this, so I changed it to square.


I then went back to the particle system and started editing. I added a very small amount of rotation and made the particles longer. I then wanted to add motion blur, as this is prominent in the GTA V video. Adding motion blur to the GPU particles didn’t achive the results I was looking for however.


As I couldn’t find a technical solution, I decided to change my texture so that it faked motion blur. I then went in and streched the particles to add to this effect. Unfortunately I had to go back to PSA velocity to use non uniform scale, which has made the amount of particles a bit weird again, but the effect I’m getting here is worth it!




As I was happy with the falling rain at this point, I moved on to the splashes on the ground. These are really important in increasing ambience and making it clear that the rain is part of the world. The idea here was to use per particle events to check for collision and spawn mesh particles at said collision. I had an issue here however, as it turned out that GPU particles can’t have event generators. My solution was to copy the emitter, but take its rate down to about 100, as having tens of thousands of splashes would look pretty silly anyway. I added the event generator to this and then created the second emitter with the receiver in it. These were small mesh particles that spawned, didn’t move, and died quickly.

rain19 rain20

I had some issues here, with particles dissapearing. I thought initially that it was a problem with the rain being part of the MyCharacter blueprint, but the answerhub revealed that I had an option on that stopped particle collision when the frame rate drops below 30. I unticked this, and it worked well! (The frame rate drop is due to lighting, not fx, and is a known issue)


I played around with the position of these particles – putting them in the same location as the main rain emitter made most of it spawn below the player, where they wouldn’t really be looking – as the particles don’t need to be seen when the player looks up I was able to start them just where the player’s feet would be and fan them out from there.


I then created a quick mesh in maya, just a wee splash shape made from a cylinder. This possibly could have been lower poly, and is something to think about if I still have a low fps after looking at lighting problems.


These looked ok to start, but were much too opaque and were very obviously spawning models. I played with alpha over life to get a nice fade in and out, which gave off the impression that the water was moving slightly.


After that, I created a texture with a strip of white at the bottom, to pan up the model. This worked really nicely, and gave a subtle movement to the mesh.


The last thing I created for the rain was a ripple for the water. This isn’t ideal – it doesn’t animate in the way I would like – but I need to move on! I copied the splash emitter and replaced the mesh with a circular plane with a ring texture. I wanted this to ripple out, but scaling isn’t supported within materials, so this would need to be animated by hand and made as a flip book, and I just don’t have that sort of time right now. I used a mesh rather than a particle here to ensure that there was no movement to the particles and they keep sitting on top of the water. I changed the sort importance of this so that it comes between the water and the rain.


Quite happy with my rain – couple of places that could be improved, the ripples and maybe the main rain movement, but moving on for now.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s