Scatter points on surface

This will automatically scatter new points onto an incoming polygonal SOP. It works similar to the Scatter SOP in Houdini if anyone is used to that.

Just hook up a SOP and choose how many points per polygon you want. Make sure the incoming geo is polygons, not a mesh or something else.

You can also scale the density of where points get created by using the red color attribute on your incoming geometry. See attached .toe file as an example

Update: 21-05-19
I’ve now updated this to include a C++ plugin which works much faster than the tox, and also has more features like transferring position, color, and normals from the input geo onto the newly created points.

Update: 10-06-19
The c++ plugin has been improved to work with some bug fixes in the latest version of Touch
You can now use a custom attribute to control the density of points (opposed to only the color red in previous versions)

There are also 3 methods to control how the scattering works:

Quick: Simply scatters on every primitive. This is the fastest method, and works best when all triangle in the mesh are around the same size

The next two methods scatter try and give a uniform covering of points regardless of the size of the primitives. They both have pros and cons depending on your geometry.

Bin: The slowest method in most circumstances, but will give a consistent speed no matter the difference in size between the primitives.
If you have mostly large primitives, with only a few small ones, you may see a lack of points in the smaller primitives

Simple: Normally the fastest method, but will be much slower if your mesh has relatively small primitives with only a few large ones.

You can find the plugin file along with a sample toe inside of the C++ Plugin zip file below
ScatterPlugin.zip (17 KB)
scatter_density_example.toe (6.48 KB)
scatter-v4.tox (3.04 KB)

This has been updated to remove a bit of the bias in how the points are scattered. They should be less biased towards the center of the primitives now.

Updating again to more randomness in point placement. The tox will now automatically convert your input into a mesh which helps with the randomness

Thanks for sharing! This is a great tool.

Glad you like it!

Nice, very handy!

Thanks!!great work! is there a way to get the normals of the points(if they have)?

It would hopefully be possible, although I haven’t been able to find a way to sample the incoming geo’s normals to place them on the newly created points. I’ll have to take another look into that

This has been updated to having varying density of the created points based on the red color attribute of the incoming geometry. See first pose for an example file