Hi! I would like to create rain and snow particles in my game. I need them to have some kind of occlusion under roofs. What is the most efficient way to do this? Is it better to use large textures with few drops, or to use one drop per one particle? Or maybe there is a better way that is not based on particles? Thanks!
What kind of rain is it going to be? A fine mist, from a downpour, sprinkling, moderate rain…
If it’s larger, heavier droplets, then it’d probably be more efficient overall to use a large texture for most of it. But I think a texture would be difficult to make interactive or make it appear at least that it’s affecting surfaces accurately. Particles can have physics, and animation constraints are probably easier to develop with an emitter or a set of emitters (what I suggest for variation). For the occlusion part, it’s more practical to place some atmospheric fog (not height fog which is for highly visible fog) in the local area to be rained on and occluded, and use the particle emitter(s) for the rain. That way the fog can affect the rain, and the rain can affect the fog via ambient lighting and shadowing, such as bits of reflectivity and rain hitting the roofs without appearing too bright / shiny. Look at the example level of a cavern inside a snowy mountain for the water dripping down at certain parts in the cavern. Click on one of the particle assets that creates the dripping or the waterfalls, and check some of the settings to see how it was created. Also look at the sprite(s) used in those because as far as I know, it’s not easy to simply pick a sprite to start with and know what’s best to create rain.
There’s a collision module in the Effects editor that has built-in collision for things like rain and water, so there’s much less creation of all the different collision parameters and surfaces of existing objects. Read about it in the doc page on effects and particles, whether in Cascade or Niagara I’m not sure.