aboutsummaryrefslogtreecommitdiff
path: root/docs/_source/ext_authoring.txt
blob: aeae4e8f209ad4a6d7558236710c161ae7185eac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*! \page pageextauthoring Asset Authoring (NvBlastExtAuthoring)

The Authoring extension provides tools for creation of a Blast&tm; asset from a provided mesh.

There are three tools for creation Blast asset.

First one is FractureTool (see NvBlastExtAuthoringFractureTool.h) which is used to fracture an input mesh. It supports Voronoi fracturing and also
simple slicing.  Internal surfaces of output chunks can be tesselated and noise can be applied to them.  The slicing method supports slicing with
a noisy slicing surface, which allows the creation of a jagged slicing line.  Noisy slicing is switched on by setting a non-zero noise amplitude
in slicing parameters (Nv::Blast::SlicingConfiguration).

<br>
\section fracturetool FractureTool

Nv::Blast::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 - tool fills provided array with vertices, and another array of arrays with indices. Indices form triplets of vertices of triangle.

<br>
\section convexmeshbuilder ConvexMeshBuilder

Nv::Blast::ConvexMeshBuilder is tool for creation collision geometry for physics engine. It recieves mesh vertices, and returns convex hull of that vertices. If creation of convex hull fails,
tool creates collision geometry as a bounding box of provided vertices.

Tool provides method to trim convex hulls against each other. It can be used along with noisy slicing to avoid "explosive" behavior due to penetration of neighboor collision hulls into each other.
As a drawback penetration of render meshes into each other is possible due to trimmed collision geometry. 

<br>
\section bondgenerator BondGenerator

Nv::Blast::BlastBondGenerator tool for creation Blast Bond descriptors from provided geometry data. 
It has separate method which is optimized for working FractureTool. 
\code
int32_t Nv::Blast::BlastBondGenerator::buildDescFromInternalFracture(FractureTool* tool, const std::vector<bool>& chunkIsSupport, std::vector<NvBlastBondDesc>& resultBondDescs, std::vector<NvBlastChunkDesc>& resultChunkDescriptors);
\endcode

Other methods can work with prefractured mesh created in Third party tool, 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 interface, and can be used for gathering NvBlastBond data for assets, where chunks penetrate each other, e.g. chunks with noise.

<br>
\section meshcleaner MeshCleaner

Nv::Blast::MeshCleaner can be used to remove self intersections and open edges in interior of mesh, making it more likely to fracture well.

To use it, create a MeshCleaner using

\code
Nv::Blast::MeshCleaner* cleaner = NvBlastExtAuthoringCreateMeshCleaner();
\endcode

Given an Nv::Blast::Mesh called "mesh," simply call

\code
Nv::Blast::Mesh* newMesh = cleaner->cleanMesh(mesh);
\endcode

If successful, newMesh will be a valid pointer to the cleaned mesh.  Otherwise, newMesh will be NULL.

When done, release using
\code
cleaner->release();
\endcode

<br>
*/