Hit Point Cloud
Tool assist the creation of hit point LODs
Last updated
Tool assist the creation of hit point LODs
Last updated
Object Builder tab in the 3D viewport sidebar.
Source: mesh object to use as boundary geometry for point cloud creation
Target (optional): mesh object to update with generated point cloud (new object is created if not set)
Spacing X,Y,Z: space between the generated points in the three axis directions
Bevel:
Offset: offset value of the bevel applied to the source object during generation
Segments: number of segments of the bevel applied to the source object during generation
Triangulate:
Before: triangulate the mesh before applying the bevel
After: triangulate the mesh after applying the bevel
Selection: vertex group to add the generated points to
The algorithm used for filtering out the unneeded points is prone to create false positives on low poly models with sharp angles. To solve this issue, a bevel modifier and a triangulate modifier is temporarily applied to the source object. The applied bevel modifier can be slightly customised to avoid getting false negatives along edges due to a too large bevel offset.
To further decrease the probability of false positives, a triangulate modifier is also applied either before, or after the bevel modifier (the order of the modifiers is only significant when using a source mesh with greatly distorted ngon faces.
Reason for false positives:
On low poly meshes when the algorithm checks for the closest point on the mesh to the point being tested, it may produce a singular result when the closest point is on an edge, instead of a face.
2 characteristic points of the source object's bounding box are identified (most negative and most positive)
possible point count is calculated in the 3 axis directions based on the bounding box dimensions and the set spacing
grid row positions are generated in the 3 axis directions based on the calculated counts (when the resulting grid is smaller in one or more directions than the dimensions of the source object, the grid is centered with equal padding on all sides).
The grid coordinates are calculated in the local object coordinate system of the source object, so the object can be rotated and offset to any position in world space (the scaling is not taken into consideration, so the scale should be applied before generating the points).
Every point of the calculated grid is tested for being inside or outside of the preprocessed source mesh. The points outside are discarded, and the points inside are added to the resulting mesh data. The filtering is done by the algorithm proposed by Salai Vedha Viradhan. Since the algorithm is based on face normals, the source object should be manifold, and free of degenerate faces.
The algorithm supports any source shape (including ones with holes), as long as it's manifold.
The resulting mesh point data is placed into the traget object or if not set, into a newly created object. The result object inherits the position, rotation and scale of the source object.
Finally, if the selection property is set, a new vertex group is created and the points are assigned to it.