Download

Niagara : Spawn Particles By Material Map

Hi, I’ve been looking for a way to spawn particles in a region on a mesh defined by a material or texture map. The closest thing I’ve found was this solution by @wyeth

Granted this is an old post, and one could probably do something similar in Niagara, but given the post suggests ‘this kind of thing will be worlds better in Niagara’, I’m wondering what the latest greatest approach for this is in Niagara.

I’m currently hacking around in a scratch module to see what I can get away with, and I’m sure I might be overlooking something as I am relatively new to UE, but
scattering points by attribute (say on a colored region of a model) is a Houdini 101 technique I 'm sorely missing out of the box here. I suppose I could do a Houdini-Niagara roundtrip, but there must be a way to only spawn particles in a defined region in UE rather than everywhere on the mesh. I would certainly prefer to do everything in UE if I can.

I’m thinking a spawn and cull by some color threshold might do the trick, but it would be ideal to only spawn particles where they are actually being used/needed/specified.

What also comes to mind is how an additional UV map/set, texture channel, or ‘hidden’ material comes into play as you would need to define a region (color mask) but don’t want that to be present in the visible materials/textures of the mesh.

Any pointers would be very welcome. thanks!

P.S. why isn’t there a Niagara category or Niagara Tags on this forum to facilitate search and browsing?

Just had a closer look at the Niagara Texture Sampling Content Example,
sourcing gpu particles from a texture map on particle spawn and then killing
then according to the alpha channel. Mostly what I’m looking for.

That is ‘worlds better’! More impressive by the day!

I’m assuming if I promote the texture to a user parameter, then from the outside world I should be able to feed a secondary channel (hidden) Texture Map from a character to defines some localized spawn regions.