Scattering PCG on mesh - how do you increase number of points per square meter?

I’m trying to build a PCG graph that scatters meshes on a mesh instead of a landscape. However, as far as I know at the moment surface sampler doesn’t work on meshes, only landscapes, and so far surface sampler is the only node I’ve been able to find in all the tutorials I’ve watched that controls the number of points per square meter. Does anyone know how to increase the number of points per square meter without a surface sampler? Or does anyone know how to get surface sampler to work when scattering PCG points on a mesh? Attached is a screenshot of the current PCG graph I have now.

Can’t help with your main question about points per square meter, but I could swear I saw surface sampling on a mesh at Unreal Fest Seattle. If nobody gets back to you here, keep an eye on the Unreal youtube channel in case they post that talk. I believe it was “Maxing the Potential of the Epic Ecosystem: From Environments to Characters” by Daryl Obert

Thanks a ton for the response, I appreciate it, I actually got it figured out though.

For anyone wondering about this, here’s the really simple solution:

Use a World Ray Hit Query node and plug that into surface sampler, and that’s it :rofl:

One issue I had was the points wouldn’t show up on the mesh I want to scatter them on. The solution to that was adding a collision with the collision complexity set to Use Complex Collision As Simple and then maxing out the hull count, max hull verts, and hull precision. It’s possible you don’t need to max out the settings as long as collision complexity is set correctly, but it’s what I went with.

EDIT: I just realized it works just fine without applying the hull count, max hull verts, and hull precision at all. So for my needs as long as collision complexity is set to Use Complex Collision As Simple then it works.

1 Like