I’m trying to have a snow but prevent particle indoor (a bit like rain, but as snow is much much slower than rain, it’s a bit harder).
I’ve tryed various techniques, read many post, and right now, no one of the solutions works well.
The most thing i used was GPU sim with Distant mesh field, but… it’s kinda working with some downside.
I’ve drop the question on unreal slacker and i’ve got this mysterious answer :
I’m trying to have more info by this user, unfortunally look like his not here anymore.
I would like to understood, what is the occlusion map is refeering ? how i can do that ? is there some paper to start ?
If you don’t have any answer, how you will proceed to achieve this effect ? how other game achieve to have snow indoor ? Thanks !
Snow is pretty slow, i need to drop it from a suffisant height to be sure that it will collide with roof of building, i also got issue, as more is the height of the emitter, larger is the area he need to cover (to be sure when the player is moving, the snow have the time to drop at his height).
Also, a lot of wall i use are plane, and it look like it mess with distant mesh field as snow go trough them sometime.
The perfect, and light system for me would be to have some way to exclude snow from some area, like a volume who kill particle, or a way to make particle opacity at 0% when there are in some defined area. So i don’t need to spawn particle for a high height.
I try also try to have invisible mesh, it work well as it prevent snow to drop in this area, and being generated inside, BUT it mess with DFAO as we can’t exclude an object from DFAO (i try to modify the engine source code but… dfao system look like a bit complexe for me)
If you have a heightmap texture of your map you can use it to sample the valid height for a given particle position and kill particles that are spawned below the valid height.
If you don’t have such a texture because your level is generated procedurally you can still do something simple like sample the distance field and only spawn a particle if its distance to the nearest surface is bigger than your largest interior space.
As a gameplay programmer, i’m not very use with all of this. And to be sure i’m understanding correctly what you said :
Can i generate a heightmap with RVT and kill particle when they are below this heightmap ? would it work ? (or i can even just change the opacity of the particle to 0 if this is below ? it would use the material and should be even better, no ? (and is it possible ? or i misunderstand how it work)
There are many ways to create a heightmap, I’m sure if you search the forums or youtube you will find plenty of help.
You should kill the particles in the spawn script if they are below the desired height, not set their opacity to 0. Otherwise you will pay a lot of perf cost to update invisible particles.