Download

[Request] Rain and weather effects tutorial

Hey everyone,

Ive been playing around with a few basic environments that I created, and have been wanting to add a weather aspect to my work.
Would be absolutely amazing if someone could make a ‘Weather’ tutorial. Stormy clouds and hard rain through out the entire level.

Any help would be awesome, thanks guys!

Did you check out Epic’s “Effects Cave” demo? https://www.unrealengine.com/blog/new-release-effects-cave-showcase

Not exactly rain, but there’s lots of splashing water, and also snow. :slight_smile:

The first person shooter template along with the other templates have effects too, The FPS template has clouds and some other, While the Cave effects has the main idea behind weather effects such as rain / snow.

The reflections demo also has some weather effects in it.

Yup, Im actually using the effects cave at the moment, but those seem to be localized effects. Looking for large scale, huge emitters that cover the entire map.

I don’t know if a huge, map-covering emitter would be the way to go, it seems like a big performance hit. I think a more common way is to have the effect only playing near the player, sort of “attached” to him. You wouldn’t be able to see the rain at long distances anyway, so it’s a waste to have it there.

Yep, that is commonly used in games. Minecraft is a good example for that :smiley:

I think it is also better to use “rainplanes” instead of particle system -> it will save a little bit performance, but it wont look so good ^^

Jup. But here’s one problem I’m currently trying to solve.
It rains, so there’s a rain particle emitter attached to the player.
What happens if he goes into a cave? … and what happens if he then turns around and looks outside?
Any ideas how to approach these difficulties?

scripted events.

Well, that’s the hard part, right? :wink: You’d have to use a blueprint or something to check if he is under the sky. If he can’t see the sky, turn the PS off.

That’s the simple part… what really keeps me thinking… you may stand in a dry cave and watch the rain outside…
you might possibly even walk through an cave for an hour and then get to the exit. And as you come closer you see it rains outside.
Of course one could cheat… and one can realize all this functionality… but it’s not easy to make it work :stuck_out_tongue:

You could for example create Trigger Points inside and outside of the Cave to contorl the rain.

For Example. If you are 10 m in front of the Cave and the Rain Area is like 10m in all directions or whatever you can make it that as soon as the player enters that Trigger the Rain Stops following the Player.
And if you are going out somewhere else for instance you can as soon as the Player hits another Trigger change the Position of the Rain to the other loction so it rains when you are aproching the cave exit.
When you are out side you move through the Trigger Area which says it should stop follow you and into another one which again states that it should follow the player again and so on.

Quite complicated way with a lot of Triggers, but I don’t see any other way for you atm.

I am also trying to create a dynamic weather system and i have come up with an alternative solution which involves a sphere component attached to the player which checks for collision with particle components already placed in the level and activates and deactivates them based on the current weather.

https://youtube.com/watch?v=taAja7Sed8I
weather system with controls

Video does not exist?

Perhaps this could help: Either create a function inside the character BP or create a separate BP that casts to the player. Set it to attach to character with whatever offset you deem appropriate. Create a particle effect using rain planes like this one I made RainSheet_Moderate.png ( Realized you can’t see it on a white background, click after “made” and you’ll find it. use it if you like it I guess, increasing the size to X:5000 Y:5000 and setting offset to -10000,+10000 for x and Y tends to give a distant stormy effect) This will simply serve as what you’ll see when you’re inside a location. Set the emitter origin to be far above the player, making sure the emitter lifetime is sufficient to fall under the player no matter what, and set the emitter to die on collision, so you wont see them clipping through caves and stuff.

Then create a rain plane which will also cast to the player’s HUD (I’ve not touched this yet, but I assume this is how it works) and set it to pan -Z with whatever value you want. This should be set to turn off when a line trace from the player cannot touch the skysphere. As gregdumb mentioned.
m
I should mention that I’ve not tried all of this yet, but this is what I believe needs to be done for the results you want. In the end you’ll have a bulky rain emitter that activates whenever you trigger it, and a rain plane for the character that will activate with it UNLESS a line trace on Z (up) doesn’t end with the skysphere. Alternative to the higher detail rain plane is using a secondary emitter that emits individual rain drops that turns off when it can’t see the sky, but scaled out on x and y so that sprinting doesn’t break the illusion. Resulting in visible rain out of windows and caves, but none inside with you. No flooding the kitchen, dear.

I do agree with DisgruntledCow and also would like to know how to do this. Gregdumb, I have seen the Epic’s Effects Cave and found it interesting too. Problem is, are we to place down thousands of particle affects all over the full level to make it rain? I believe what DisgruntledCow is asking was how to add it in the blueprints on where it will give the rain just like you can with Fog, Lightning, Moon and Sun rises with night sky’s using particle effects. Question is, how can we make the rain fill the FULL level not just part of a level and with a time frame when it is to start and stop?

There’s no built-in rain functionality like there is with fog, you need to make it yourself. AFAIK the best way would be to have the particle systems only playing near the player, maybe even attached. For the “looking outside the cave” effect, I would have multiple particle systems at different distances, and turn off the ones that end up indoors. Like this (top view):
4bb7799e64e989f99a098e6eae8d5d171b13477c.png
I’m not 100% if it’s the way to go, but this is how I plan to do it.

Any tips on how to do that?

You have TrueSky which is awezome for this. Its $15/month until you have payed up to $100 and then you own the plugin.