There are four tools for creation of Blast™ assets.
FractureTool supports two types of output:
1) Array of triangles - the tool fills provided array with triangles of chunk, ID of chunk should be provided.
2) Buffered output - the tool fills provided array with vertices, and another array of arrays with indices. Indices form triplets of vertices of triangle.
Input meshes
Failure to meet the constraints (first three items) above will lead to unpredictable fracturing results.
The tool provides a method to trim convex hulls against each other. It can be used along with noisy slicing to avoid "explosive" behavior due to penetration of neighboring collision hulls into each other. As a drawback, penetration of render meshes into each other is possible due to trimmed collision geometry.
int32_t Nv::Blast::BlastBondGenerator::buildDescFromInternalFracture(FractureTool* tool, const std::vector<bool>& chunkIsSupport, std::vector<NvBlastBondDesc>& resultBondDescs, std::vector<NvBlastChunkDesc>& resultChunkDescriptors);
Other methods can work with prefractured meshes created in Third party tools, and can be used for converting prefractured models to Blast™ assets.
Nv::Blast::BlastBondGenerator supports two modes of NvBlastBond data generation:
1) Exact - in this mode exact common surface between chunks is found and considered as interface between them. Exact normal, area and centroid are computed.
2) Average - this mode uses approximations of the interface, and can be used for gathering NvBlastBond data for assets, where chunks penetrate each other, e.g. chunks with noise.
To use it, create a MeshCleaner using
Nv::Blast::MeshCleaner* cleaner = NvBlastExtAuthoringCreateMeshCleaner();
Given an Nv::Blast::Mesh called "mesh", simply call
Nv::Blast::Mesh* newMesh = cleaner->cleanMesh(mesh);
If successful, newMesh will be a valid pointer to the cleaned mesh. Otherwise, newMesh will be NULL.
When done, release using
cleaner->release();