geometry nodes Distribute Points in Volume (3.0+)
2 node groups to distribute points inside mesh. One for distribute in a random order with the option to delete points which are to close together. And one for distribute in a grid order. both work with open meshs as well although its not most recommended and can lead to un expected results in some situations.
instructions:
download the ".blend" file.
append the node group "Distribute Points in Volume HN V3_3 {append this}" and or "Distribute Grid Points in Volume HN V3_3 {append this}"
plug to the node group the mesh you want to distribute points inside and enjoy!
Parameters:
Inputs:
"Geometry" Input the mesh you want to distribute points inside.
"Selection" Selection of the faces to emit from.(only in the random node. the grid node doesn't use a face based method)
"Density" Density or amount of the points in the mesh. The higher the value, the more points will be created.
"Seed" Seed for the random distribute node.
"Use Normal Cast" should be used to help prevent problems with different joined meshs and parallel normalled meshs. more crucial in the grid node.
"Use Inverse Cast" does similar thing to the normal cast although it's much more aggressive, it can delete much more points and delete some wanted points. Should be used if the normal cast doesn't get the job done.
"Point Radius" the radius/size of the visual points.
"Ray Length" the ray length of the ray cast node used by the node. Increase the value incase some points are deleted for no reason, it might be it(It is likely to cause problems only if the side of the mesh is larger than the ray length).
"Use Distance Delete" enable the option for delete points that are too close to each other.
"Delete Distance" the minimum distance 2 points can be from each other. If a point is closer to another point then the given distance it will be deleted. Allow for perfect spacing of points.
"Distance Delete Accuracy" allow you to change the accuracy for the range of points. should the value should be increase if the node cant delete all the points. 2 - 3 is good for almost all cases.
Outputs:
"Points" The points geometry output.
"Normal" Normal of the points.
"Rotation" Rotation of the points.
Tips & Important Information:
Recalculate the Normals! If the normals are fliped the nodes will not work properly.
For the grid distribute node I recommend to add it to different meshs separately. It will prevent making the domain huge for no reason and it might help with some problems caused by open meshs and so on.
How to check how many levels of "Distance Delete Accuracy" to use: bump the "Delete Distance" to a very high value, if there are still points that are not disappearing increase the value a level until they all disappear. In 95% of the cases no need for more than 2 - 3.
In most cases there is no need for the inverse case. It meant to help with extreme problems with different joined objects and open meshs.
2 node groups to distribute points in volume in random/grid method.