[Updated for 4.20.1] Let it rain! (But not indoors!)

That is exactly what I’m trying to do, just explained it a bit different in my previous post.

I was thinking that the splashes could be spawned on the x,y plane around the player at z height zero, with a very short life time. Then just sample the scene depth capture texture to adjust the world position offset up/down to match the value in the render target texture. It is this bit I’m not quite sure about. Since the splash is an actual 3D mesh, you don’t want all it’s pixels to be rendered at the same height, which will flatten it. So each pixel needs to take into account the height and is z value of the mesh, so the splash mesh retains its shape.

Well I gave it a try. Forgot that the World Position Offset, is exactly that, an offset. So my previous concern about the mesh being flattened is of no concern. Ran into another problem though with splashes stretching along edges, where part of the splash reads one height and the rest reads a different height, so the whole splash mesh get stretched vertically.

I found a work around by using Particle Position instead of Absolute World Position. This way only a single depth is read for the entire particle. But for this to work right, the render target resolution has to be much higher, basically 1:1 with the capture size. Obviously not the best for performance.

The only other way I could think to get around this would be to take multiple depth samples around the particle’s position and use the lowest value. Should allow a lower resolution render target, but would result in a more expensive material, so bit of a toss up there for performance.

Unless you have some other ideas on how to solve this?

Hm, that would indeed be an issue… The only thing I can think of is to make the particles smaller but that’s not really a solution. It might be possible with Niagara, maybe… I’ll try and think of something as well.

I think you posted this in the wrong thread.

Indeed I did!

Hi and Team

Firstly I would like to thank you for this excellent rain solution, it is exactly what I was after.

My problem is that I cannot figure out how to make the splashes work even with the advice given in the last few posts.
I have tried to copy in the particle splash from SoulCave and SoulCity but it doesn’t work as expected (due to my inexperience I figured that would be the case).

I don’t suppose a kind soul could give some “noob” advice on how to get the splashes to work.

Thanks in advance.

Hi Guys

I don’t suppose anyone managed to get a working “splash” system working with this solution.
Everything is working well and I have managed to change the look of the rain etc, but still cannot figure out how to stop the splashes from happening inside buildings and under overhangs.

Does anyone have an example of a working solution they would be kind enough to share?

Thanks in advance.

Thanks for this excellent write up and sample files.

I hope it’s still something you’re contemplating. I found the original approach fascinating, and I would very much like to hear about more optimized and advanced ways of doing this.

I’ve updated it and posted the project link just after that post.

First of all, thanks for sharing this!

Quick (hopefully) question: I have a slightly different setup because it relates to snow, which is obviously way slower. For this reason, the particle emitter is actually at the player level, and it spawns anywhere from 0 to 500 (axis Z), and -2000 + 2000 (axis X and Y). This allows me to have the correct amount of snow when the player moves around.

I’ve noticed that for this BP to work, unless I’m mistaken, you need to have its position be above anything that it must stop, so for instance if you put is inside a house, it will rain in the house.

Do you have a pointer for me on where to look to adjust parameters so that even if the emitter is under a roof, the whole system still works? I’ve tried setting the emitter at Z=0 and the scenecapture component at Z 2000 but didn’t work.

Any pointers welcome :slight_smile:

Hm, off the top of my head what you might want to do is to keep all the components in their place, but particle system emitters have a offset parameter which allows you to shift it in world space, which you could use to move the emitter down to your player’s level. Again, this is without even opening the engine so I might be wrong.

This is excellent, thank you for your help!

I’m running into a weird thing here… This is how it looks into a ski gondola on my test level:

And this into the same gondola on a real level:

You can see that it works perfectly on the first one, while it does not on the second one.

I’ve tried setting the same landscape material of the first one on the second one, to no avail. Do you have any idea on what could be causing this difference?

Ok, solved. For anyone wondering: your Z axis cannot be negative. So if your level goes into the negatives, just raise it up.

@ - Does your new approach allow for angled rain, or is there a simple way to get it to work? Am trying to get rain that is falling on an angle to come in through an open window.

Sadly I don’t see any download links. Could you please repost those?

@

I’m trying to do this setup, for a dynamic weather system, myself and I’m having some issues. I’m new to RT, masks, etc. and I don’t see the downloadable files. I don’t want to do a straight copy of your work but I would love to look over and dissect it since I feel like this will be helpful to me in the future for various other things.

if you could put them back in the post or reach out to me I would appreciate it. thank you

I am interested in this as well…

SkyCreator to the rescue !