Niagara Q. I want the particles to be evenly distributed across the skeletal mesh

Hi, I want the particles to be evenly distributed across the skeletal mesh.

I tried the ‘initial mesh reproduction’ module and ‘skeletal mesh location’ modules. However, both are not created equally.

My guess is that there are a lot of particles where there are a lot of triangles in the mesh.

Is there some idea to fix this?

1 Like

I’m still learning myself, but I posted your question on real time vfx discord channel, and reached out to a few people with more extensive Niagara experience as well. I’m sure in addition to myself, and answer to this would be really handy for lots of other people, so I hope we can get you a response soon :slight_smile:

1 Like

Best method I’ve come across so far is to generate good UV’s for your source mesh.
Then in Niagara use the Position from UV method from the SkeletalMesh interface to spawn on uniformly distributed uv’s

I remember Epic presenting it in one of the showcases for the Matrix demo they did.

2 Likes

Does it try to base it off the texture density for each UV shell?

Apparently in skeletal meshes there’s a checkbox option for supporting Uniform Distribution, and is present in older versions as well as 5.0+

1 Like

Does it try to base it off the texture density for each UV shell?

The method itself just spawn on a UV coord, but if your UV’s are properly scaled by the area they represent, and the UV coords you generate are uniform, then the resulting distribution will also be uniform.

Apparently in skeletal meshes there’s a checkbox option for supporting Uniform Distribution

The “Support Uniformly Distributed Sampling” has worked is some cases, but it’s not super reliable unfortunately.
I have seen plenty of cases both professionally and in my free time where this did not produce significantly better results than spawning without the weight.
It’s worth checking though if it does improve it or not for the specific case you’re working with.

3 Likes

This is great to know, thank you! :slight_smile:

Hopefully this helps @gridaVFX as well, and if so, we can mark it as a solution for the thread.

2 Likes

I tested it. ‘Support Uniformly distributed Sampling’.

result looks same. maybe I will try UV solution.

unchecked

checked

While not perfect, there is a definite difference between uniform and default sampling.

You stll get outlines because there is more overlap in dense areas, but overall it gets more venly distributed. Seen better with opaque particles here:
image

However, if you need it more evenly distributed, mesh reproduction is available to you and it has all the math needed to calculate the triangle surface area you need to get the distribution you are after.

5 Likes

You also need to set Whole Mesh LOD in your Sample Skeletal Mesh module to 0 to make it work.