Download

Niagara - Spawn particles on static mesh surface based on mask texture

Hi,

Is it possible to spawn particles on the surface of a static mesh based on a mask texture? I have been able to spawn particles on the surface of a static mesh but I am having trouble only spawning them within the white areas of a mask texture (or killing the particles in the black areas). Does anyone know how to go about doing this?

Thank you

Is the mesh in niagara or external to it?
there can’t be a link between the 2 systems without a render target or something similar.

The mesh is in niagara

If its in niagara, why not use something like vertex paint? A little easier to create stuff around it.

as far as regions there’s this.
https://answers.unrealengine.com/questions/943250/how-do-i-use-sampling-regions.html

To sample the color you would still need to write your own code that reads the texture information.

I believe the reason this doesn’t just exist is that reading pixels from a texture is expensive.

Unfortunately, I cannot use vertex paint because the meshes I would paint on are HLODs spawned from a blueprint and vertex painting does not to work on those.

I think the sampling regions section is only for skeletal meshes since I cannot find it in the static mesh editor.

I am trying to get moss on top of the rocks that I spawn in the blueprint. I think I will try to spawn moss clumps when I spawn the rock in the blueprint.

Thank you for your help

You can do that, just need to create Niagara Module Script for that.

I’ve been attempting to work on this as well, this tutorial does something similar to what you describe with a skeletal mesh, but the Sample Texture module is showing up blank for me in UE5.

Any luck resolving your issue?