A better way to keep rain outdoors?

Background: In-game player built buildings can be put up on the fly, in different sizes, shapes, mesh collider, non-mesh collider, almost no restrictions.

What we want: Rain that collides! When something is over your head it doesn’t fall onto you, that’s it. That means, a particle system that follows the player around in an open world.

Problem 1: particle collision needs to be set to high quality in order to collide with mesh colliders. This causes a massive CPU expense during a storm.

Possible solution: Create a separate physics layer specifically for rain, give each building piece/anything else that needs to collide a simple bounding box that only interacts with rain collisions. I just thought this up typing this, and am looking forward to trying this.

Problem 2: moving indoor and outdoor is of course open and is not statically defined. Either there is something over you or there isn’t. But what if the building is higher than the particle spawner. Too high and you can outrun the rain, this is in fact already a problem with my snow. Too low and your 9m+ high roof doesn’t stop the rain, now it’s raining indoors, discouraging players from building larger buildings and limiting me from designing larger PoIs with high ceilings.

Possible solution: create an array of smaller particle systems, for example 5x5 10m instead of 1x1 50m, that raycast upward to see if the sky is actually above them or they turn off.

Any other ideas? The simple method of high quality collision detection is just too limiting.

Bump, I have the same problems with rain particles, have you found a better solution?

The problem is usually one of two things for me: 1. The ceiling is so high that the rain spawner is inside the building. 2. A non-convex mesh collider is having trouble catching the raindrops.

I think a weather stopping specific collision layer would be the easiest/reliable solution for number 2, ie: putting a simple box collider on a weatherStopping specific layer for objects that are using a non-convex mesh.

But number 1 is still a much more complicated problem. I wonder if Minecraft calculates the rainfall per cube column within a chunk. Something box casting upwards per 3x3m to generate a simple mesh for the weather spawner to use would work and really not use up much power at all, maybe queueing up new positions to cast as the player moves, or using RaycastCommand to thread a bunch.

But ultimately that’s all still too complicated for me to be worrying about right now. Too much on my plate as is. I’ve been able to keep things under control with just a particle system on medium collision detection following the player around at a decent height. Snow took some extra tweaking as it falls a lot slower, and can still look pretty bad if you’re running fast down a steep hill, but it doesn’t detract from fun so much that I’m fussing with it until I get 900 other things finished =D