Main Page Class List Class Members

# ApexImporter

ApexImporter is a tool for converting destructible assets from APEX Destruction format to Blast™ asset format. Whereas APEX Destruction only needs a list of connected chunks, Blast™ has a Bond structure to describe chunk connections. Each Bond describes the interface between two chunks, and needs the area, centroid, and average normal of this interface. ApexImporter computes this data automatically. Interface search can be done in several ways:

- Exact mode: Importer tries to find triangles from two chunks which lay in common surface. If such triangles are found, their intersections are considered as the interface. Such an interface may not exist.
- Forced mode: This mode is based on search for midplane between two chunks and intersecting them with offsetted midplane to find interface parameters. Creates bonds even if chunks have no common surface.

A bond is not created if the area of interface is zero. The interface centroid is computed as center of mass of all interface polygon points. The interface normal is computed as an average of normals of all planes comprising the interface surface.

Note - for Blast™ to operate with satisfactory fracturing behavior, it does not require exact area, centroid, and normal values for Bonds.

Along with creating a Blast™ asset (*.blast), ApexImporter creates an *.obj or *.fbx file with description of chunk render geometry. Optionally the *.fbx file can store the collision geometry.

Blast™ asset data can be saved in different ways:

1) LL-asset which is Low Level asset data (NvBlastAsset with --ll).

2) Tk-asset which is Toolkit asset data (Nv::Blast::TkAsset with --tk).

3) ExtPx-asset which incorporates Blast™ data and collision geometry for physics engine (Nv::Blast::ExtPxAsset with --px). Default mode.

ExtPxAsset assets or *.fbx files that contain collision geometry and can be used in SampleAssetViewer.

    USAGE:

       ApexImporter [--nonskinned] [--fbxcollision] [--jsoncollision]
                    [--fbx] [--obj] [--fbxascii] [--ll] [--tk] [--px] [-d]
                    [-m <0 - EXACT, 1 - FORCED, for detailed description see docs.>]
                    -n <output asset name> [-o <output directory>]
                    -f <infile> [--] [--version] [-h]

    Where:

       --nonskinned
         Output a non-skinned FBX file

       --fbxcollision
         Append collision geometry to FBX file

       --jsoncollision
         Save collision geometry to a json file

       --fbx
         Output a FBX mesh to the output directory

       --obj
         Output a OBJ mesh to the output directory

       --fbxascii
         Output FBX as an ascii file (defaults to binary output)

       --ll
         Output LL Blast asset to the output directory

       --tk
         Output TkAsset to the output directory

       --px
         Output ExtPxAsset to the output directory

       -d,  --debug
         Print debug output

       -m <0 - EXACT, 1 - FORCED, for detailed description see docs.>,  --mode
          <0 - EXACT, 1 - FORCED, for detailed description see docs.>
         Interface search mode

       -n <output asset name>,  --outAssetName <output asset name>
         (required)  Output asset name

       -o <output directory>,  --outputDir <output directory>
         Output directory

       -f <infile>,  --file <infile>
         (required)  File to load

       --,  --ignore_rest
         Ignores the rest of the labeled arguments following this flag.

       --version
         Displays version information and exits.

       -h,  --help
         Displays usage information and exits.

See Copyrights for license information regarding third-party software used by ApexImporter.