public class Assimp
extends java.lang.Object
COMMON INTERCHANGE FORMATS (An asterisk indicates limited support)
MOTION CAPTURE FORMATS
GRAPHICS ENGINE FORMATS
GAME FILE FORMATS
OTHER FILE FORMATS
COMMON INTERCHANGE FORMATS
REAL TIME RENDERING
VERTEX DATA
SCENEGRAPH
OTHER
| Modifier and Type | Class and Description |
|---|---|
static class |
Assimp.Functions
Contains the function pointers loaded from the assimp
SharedLibrary. |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
_AI_MATKEY_MAPPING_BASE
Material keys
|
static java.lang.String |
_AI_MATKEY_MAPPINGMODE_U_BASE
Material keys
|
static java.lang.String |
_AI_MATKEY_MAPPINGMODE_V_BASE
Material keys
|
static java.lang.String |
_AI_MATKEY_TEXBLEND_BASE
Material keys
|
static java.lang.String |
_AI_MATKEY_TEXFLAGS_BASE
Material keys
|
static java.lang.String |
_AI_MATKEY_TEXMAP_AXIS_BASE
Material keys
|
static java.lang.String |
_AI_MATKEY_TEXOP_BASE
Material keys
|
static java.lang.String |
_AI_MATKEY_TEXTURE_BASE
Material keys
|
static java.lang.String |
_AI_MATKEY_UVTRANSFORM_BASE
Material keys
|
static java.lang.String |
_AI_MATKEY_UVWSRC_BASE
Material keys
|
static java.lang.String |
ai_AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE
PBR Material keys
|
static java.lang.String |
ai_AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE
PBR Material keys
|
static java.lang.String |
ai_AI_MATKEY_GLTF_MAPPINGID_BASE
PBR Material keys
|
static java.lang.String |
ai_AI_MATKEY_GLTF_MAPPINGNAME_BASE
PBR Material keys
|
static java.lang.String |
ai_AI_MATKEY_GLTF_SCALE_BASE
PBR Material keys
|
static java.lang.String |
ai_AI_MATKEY_GLTF_STRENGTH_BASE
PBR Material keys
|
static java.lang.String |
ai_AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE
PBR Material keys
|
static int |
AI_AISTRING
Enum used to distinguish data types.
|
static int |
AI_AIVECTOR3D
Enum used to distinguish data types.
|
static int |
AI_BOOL
Enum used to distinguish data types.
|
static java.lang.String |
AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT
Specifies whether the Android JNI asset extraction is supported.
|
static float |
AI_CONFIG_APP_SCALE_DEFAULT
Default value for configuration properties.
|
static java.lang.String |
AI_CONFIG_APP_SCALE_KEY
Specifies an application key factor for scale.
|
static java.lang.String |
AI_CONFIG_EXPORT_POINT_CLOUDS
Specifies whether the assimp export shall be able to export point clouds.
|
static java.lang.String |
AI_CONFIG_EXPORT_XFILE_64BIT
Specifies the xfile use double for real values of float.
|
static java.lang.String |
AI_CONFIG_FAVOUR_SPEED
A hint to assimp to favour speed against import quality.
|
static java.lang.String |
AI_CONFIG_FBX_CONVERT_TO_M
Set whether the FBX importer shall convert the unit from cm to m.
|
static java.lang.String |
AI_CONFIG_GLOB_MEASURE_TIME
Enables time measurements.
|
static float |
AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT
Default value for configuration properties.
|
static java.lang.String |
AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY
Specifies a global key factor for scale.
|
static java.lang.String |
AI_CONFIG_IMPORT_AC_EVAL_SUBDIVISION
Configures whether the AC loader evaluates subdivision surfaces (indicated by the presence of the 'subdiv' attribute in the file).
|
static java.lang.String |
AI_CONFIG_IMPORT_AC_SEPARATE_BFCULL
Configures the AC loader to collect all surfaces which have the "Backface cull" flag set in separate meshes.
|
static java.lang.String |
AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS
Configures the ASE loader to always reconstruct normal vectors basing on the smoothing groups loaded from the file.
|
static java.lang.String |
AI_CONFIG_IMPORT_COLLADA_IGNORE_UP_DIRECTION
Specifies whether the Collada loader will ignore the provided up direction.
|
static java.lang.String |
AI_CONFIG_IMPORT_COLLADA_USE_COLLADA_NAMES
Specifies whether the Collada loader should use Collada names as node names.
|
static java.lang.String |
AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING
Set whether the fbx importer will use the legacy embedded texture naming.
|
static java.lang.String |
AI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES
Specifies whether the importer will drop empty animation curves or animation curves which match the bind pose transformation over their entire defined
range.
|
static java.lang.String |
AI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTS
Set whether the fbx importer will preserve pivot points for transformations (as extra nodes).
|
static java.lang.String |
AI_CONFIG_IMPORT_FBX_READ_ALL_GEOMETRY_LAYERS
Set whether the fbx importer will merge all geometry layers present in the source file or take only the first.
|
static java.lang.String |
AI_CONFIG_IMPORT_FBX_READ_ALL_MATERIALS
Set whether the fbx importer will read all materials present in the source file or take only the referenced materials.
|
static java.lang.String |
AI_CONFIG_IMPORT_FBX_READ_ANIMATIONS
Set whether the fbx importer will read animations.
|
static java.lang.String |
AI_CONFIG_IMPORT_FBX_READ_CAMERAS
Set whether the fbx importer will read cameras.
|
static java.lang.String |
AI_CONFIG_IMPORT_FBX_READ_LIGHTS
Set whether the fbx importer will read light sources.
|
static java.lang.String |
AI_CONFIG_IMPORT_FBX_READ_MATERIALS
Set whether the fbx importer will read materials.
|
static java.lang.String |
AI_CONFIG_IMPORT_FBX_READ_TEXTURES
Set whether the fbx importer will read embedded textures.
|
static java.lang.String |
AI_CONFIG_IMPORT_FBX_STRICT_MODE
Set whether the fbx importer will act in strict mode in which only FBX 2013 is supported and any other sub formats are rejected.
|
static java.lang.String |
AI_CONFIG_IMPORT_GLOBAL_KEYFRAME
Set the vertex animation keyframe to be imported.
|
static java.lang.String |
AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION
Specifies whether the IFC loader will use its own, custom triangulation algorithm to triangulate wall and floor meshes.
|
static java.lang.String |
AI_CONFIG_IMPORT_IFC_CYLINDRICAL_TESSELLATION
Set the tessellation for IFC cylindrical shapes.
|
static java.lang.String |
AI_CONFIG_IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS
Specifies whether the IFC loader skips over shape representations of type 'Curve2D'.
|
static java.lang.String |
AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS
Specifies whether the IFC loader skips over IfcSpace elements.
|
static java.lang.String |
AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE
Sets the tessellation conic angle for IFC smoothing curves.
|
static java.lang.String |
AI_CONFIG_IMPORT_IRR_ANIM_FPS
Defines the output frame rate of the IRR loader.
|
static java.lang.String |
AI_CONFIG_IMPORT_LWO_ONE_LAYER_ONLY
Configures the LWO loader to load just one layer from the model.
|
static java.lang.String |
AI_CONFIG_IMPORT_LWS_ANIM_END
End of the imported time range.
|
static java.lang.String |
AI_CONFIG_IMPORT_LWS_ANIM_START
Defines the begin of the time range for which the LWS loader evaluates animations and computes
AINodeAnim's. |
static java.lang.String |
AI_CONFIG_IMPORT_MD2_KEYFRAME |
static java.lang.String |
AI_CONFIG_IMPORT_MD3_HANDLE_MULTIPART
Configures the M3D loader to detect and process multi-part Quake player models.
|
static java.lang.String |
AI_CONFIG_IMPORT_MD3_KEYFRAME |
static java.lang.String |
AI_CONFIG_IMPORT_MD3_SHADER_SRC
Specify the Quake 3 shader file to be used for a particular MD3 file.
|
static java.lang.String |
AI_CONFIG_IMPORT_MD3_SKIN_NAME
Tells the MD3 loader which skin files to load.
|
static java.lang.String |
AI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOAD
Configures the MD5 loader to not load the MD5ANIM file for a MD5MESH file automatically.
|
static java.lang.String |
AI_CONFIG_IMPORT_MDC_KEYFRAME |
static java.lang.String |
AI_CONFIG_IMPORT_MDL_COLORMAP
Sets the colormap (= palette) to be used to decode embedded textures in MDL (Quake or 3DGS) files.
|
static java.lang.String |
AI_CONFIG_IMPORT_MDL_KEYFRAME |
static java.lang.String |
AI_CONFIG_IMPORT_NO_SKELETON_MESHES
Global setting to disable generation of skeleton dummy meshes
|
static java.lang.String |
AI_CONFIG_IMPORT_OGRE_MATERIAL_FILE
Ogre Importer will try to find referenced materials from this file.
|
static java.lang.String |
AI_CONFIG_IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME
Ogre Importer detect the texture usage from its filename.
|
static java.lang.String |
AI_CONFIG_IMPORT_REMOVE_EMPTY_BONES
Set whether the importer shall not remove empty bones.
|
static java.lang.String |
AI_CONFIG_IMPORT_SMD_KEYFRAME |
static java.lang.String |
AI_CONFIG_IMPORT_SMD_LOAD_ANIMATION_LIST
Smd load multiple animations.
|
static java.lang.String |
AI_CONFIG_IMPORT_TER_MAKE_UVS
Configures the terragen import plugin to compute uv's for terrains, if not given.
|
static java.lang.String |
AI_CONFIG_IMPORT_UNREAL_KEYFRAME |
static java.lang.String |
AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE
Specifies the maximum angle that may be between two vertex tangents that their tangents and bi-tangents are smoothed.
|
static java.lang.String |
AI_CONFIG_PP_CT_TEXTURE_CHANNEL_INDEX
Source UV channel for tangent space computation.
|
static java.lang.String |
AI_CONFIG_PP_DB_ALL_OR_NONE
Require all bones qualify for deboning before removing any.
|
static java.lang.String |
AI_CONFIG_PP_DB_THRESHOLD
Lower the deboning threshold in order to remove more bones.
|
static java.lang.String |
AI_CONFIG_PP_FD_CHECKAREA
Configures the
Process_FindDegenerates to check the area of a triangle to be greater than e-6. |
static java.lang.String |
AI_CONFIG_PP_FD_REMOVE
Configures the
Process_FindDegenerates step to remove degenerated primitives from the import - immediately. |
static java.lang.String |
AI_CONFIG_PP_FID_ANIM_ACCURACY
Input parameter to the
Process_FindInvalidData step: Specifies the floating-point accuracy for animation values. |
static java.lang.String |
AI_CONFIG_PP_FID_IGNORE_TEXTURECOORDS
Input parameter to the
Process_FindInvalidData step: Set to true to ignore texture coordinates. |
static java.lang.String |
AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE
Specifies the maximum angle that may be between two face normals at the same vertex position that their are smoothed together.
|
static java.lang.String |
AI_CONFIG_PP_ICL_PTCACHE_SIZE
Set the size of the post-transform vertex cache to optimize the vertices for.
|
static java.lang.String |
AI_CONFIG_PP_LBW_MAX_WEIGHTS
Set the maximum number of bones affecting a single vertex.
|
static java.lang.String |
AI_CONFIG_PP_OG_EXCLUDE_LIST
Configures the
Process_OptimizeGraph step to preserve nodes matching a name in a given list. |
static java.lang.String |
AI_CONFIG_PP_PTV_ADD_ROOT_TRANSFORMATION
Configures the
Process_PreTransformVertices step to use a users defined matrix as the scene root node transformation before transforming vertices. |
static java.lang.String |
AI_CONFIG_PP_PTV_KEEP_HIERARCHY
Configures the
Process_PreTransformVertices step to keep the scene hierarchy. |
static java.lang.String |
AI_CONFIG_PP_PTV_NORMALIZE
Configures the
Process_PreTransformVertices step to normalize all vertex components into the [-1,1] range. |
static java.lang.String |
AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION
Configures the
Process_PreTransformVertices step to use a users defined matrix as the scene root node transformation before transforming vertices. |
static java.lang.String |
AI_CONFIG_PP_RRM_EXCLUDE_LIST
Configures the
Process_RemoveRedundantMaterials step to keep materials matching a name in a given list. |
static java.lang.String |
AI_CONFIG_PP_RVC_FLAGS
Input parameter to the
Process_RemoveComponent step: Specifies the parts of the data structure to be removed. |
static java.lang.String |
AI_CONFIG_PP_SBBC_MAX_BONES
Maximum bone count per mesh for the
Process_SplitByBoneCount step. |
static java.lang.String |
AI_CONFIG_PP_SBP_REMOVE
Input parameter to the
Process_SortByPType step: Specifies which primitive types are removed by the step. |
static java.lang.String |
AI_CONFIG_PP_SLM_TRIANGLE_LIMIT
Set the maximum number of triangles in a mesh.
|
static java.lang.String |
AI_CONFIG_PP_SLM_VERTEX_LIMIT
Set the maximum number of vertices in a mesh.
|
static java.lang.String |
AI_CONFIG_PP_TUV_EVALUATE
Input parameter to the
Process_TransformUVCoords step: Specifies which UV transformations are evaluated. |
static java.lang.String |
AI_CONFIG_UNREAL_HANDLE_FLAGS
Configures the UNREAL 3D loader to separate faces with different surface flags (e.g.
|
static float |
AI_DEBONE_THRESHOLD
Default value for configuration properties.
|
static java.lang.String |
AI_DEFAULT_MATERIAL_NAME
Name for default materials (2nd is used if meshes have UV coords)
|
static int |
AI_DOUBLE
Enum used to distinguish data types.
|
static float |
ai_epsilon
Numerical limits.
|
static int |
AI_FALSE
Boolean constants
|
static int |
AI_FLOAT
Enum used to distinguish data types.
|
static int |
AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION
Default values for configuration properties.
|
static float |
AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE
Default value for configuration properties.
|
static int |
AI_INT32
Enum used to distinguish data types.
|
static int |
AI_LBW_MAX_WEIGHTS
Default values for configuration properties.
|
static double |
AI_MATH_HALF_PI
This is PI.
|
static float |
AI_MATH_HALF_PI_F
This is PI.
|
static double |
AI_MATH_PI
This is PI.
|
static float |
AI_MATH_PI_F
This is PI.
|
static double |
AI_MATH_TWO_PI
This is PI.
|
static float |
AI_MATH_TWO_PI_F
This is PI.
|
static java.lang.String |
AI_MATKEY_BLEND_FUNC
Material keys
|
static java.lang.String |
AI_MATKEY_BUMPSCALING
Material keys
|
static java.lang.String |
AI_MATKEY_COLOR_AMBIENT
Material keys
|
static java.lang.String |
AI_MATKEY_COLOR_DIFFUSE
Material keys
|
static java.lang.String |
AI_MATKEY_COLOR_EMISSIVE
Material keys
|
static java.lang.String |
AI_MATKEY_COLOR_REFLECTIVE
Material keys
|
static java.lang.String |
AI_MATKEY_COLOR_SPECULAR
Material keys
|
static java.lang.String |
AI_MATKEY_COLOR_TRANSPARENT
Material keys
|
static java.lang.String |
AI_MATKEY_ENABLE_WIREFRAME
Material keys
|
static java.lang.String |
AI_MATKEY_GLOBAL_BACKGROUND_IMAGE
Material keys
|
static java.lang.String |
AI_MATKEY_GLOBAL_SHADERLANG
Material keys
|
static int |
AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE |
static int |
AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLICROUGHNESS_TEXTURE |
static java.lang.String |
AI_MATKEY_NAME
Material keys
|
static java.lang.String |
AI_MATKEY_OPACITY
Material keys
|
static java.lang.String |
AI_MATKEY_REFLECTIVITY
Material keys
|
static java.lang.String |
AI_MATKEY_REFRACTI
Material keys
|
static java.lang.String |
AI_MATKEY_SHADER_COMPUTE
Material keys
|
static java.lang.String |
AI_MATKEY_SHADER_FRAGMENT
Material keys
|
static java.lang.String |
AI_MATKEY_SHADER_GEO
Material keys
|
static java.lang.String |
AI_MATKEY_SHADER_PRIMITIVE
Material keys
|
static java.lang.String |
AI_MATKEY_SHADER_TESSELATION
Material keys
|
static java.lang.String |
AI_MATKEY_SHADER_VERTEX
Material keys
|
static java.lang.String |
AI_MATKEY_SHADING_MODEL
Material keys
|
static java.lang.String |
AI_MATKEY_SHININESS
Material keys
|
static java.lang.String |
AI_MATKEY_SHININESS_STRENGTH
Material keys
|
static java.lang.String |
AI_MATKEY_TRANSPARENCYFACTOR
Material keys
|
static java.lang.String |
AI_MATKEY_TWOSIDED
Material keys
|
static int |
AI_MAX_BONE_WEIGHTS
Maximum number of indices per face (polygon).
|
static int |
AI_MAX_FACE_INDICES
Maximum number of indices per face (polygon).
|
static int |
AI_MAX_FACES
Maximum number of faces per mesh.
|
static int |
AI_MAX_NUMBER_OF_COLOR_SETS
Supported number of vertex color sets per mesh.
|
static int |
AI_MAX_NUMBER_OF_TEXTURECOORDS
Supported number of texture coord sets (UV(W) channels) per mesh.
|
static int |
AI_MAX_VERTICES
Maximum number of vertices per mesh.
|
static int |
AI_META_MAX
Enum used to distinguish data types.
|
static java.lang.String |
AI_METADATA_SOURCE_FORMAT
Scene metadata holding the name of the importer which loaded the source asset.
|
static java.lang.String |
AI_METADATA_SOURCE_FORMAT_VERSION
Scene metadata holding the version of the source asset as a string, if available.
|
static java.lang.String |
AI_METADATA_SOURCE_GENERATOR
Scene metadata holding the name of the software which generated the source asset, if available.
|
static int |
AI_SBBC_DEFAULT_MAX_BONES
Default values for configuration properties.
|
static int |
AI_SCENE_FLAGS_INCOMPLETE
Specifies that the scene data structure that was imported is not complete.
|
static int |
AI_SCENE_FLAGS_NON_VERBOSE_FORMAT
This flag is currently only set by the aiProcess_JoinIdenticalVertices step.
|
static int |
AI_SCENE_FLAGS_TERRAIN
Denotes pure height-map terrain data.
|
static int |
AI_SCENE_FLAGS_VALIDATED
This flag is set by the validation postprocess-step (aiPostProcess_ValidateDS)
if the validation is successful.
|
static int |
AI_SCENE_FLAGS_VALIDATION_WARNING
This flag is set by the validation postprocess-step (aiPostProcess_ValidateDS)
if the validation is successful but some issues have been found.
|
static int |
AI_SLM_DEFAULT_MAX_TRIANGLES
Default values for configuration properties.
|
static int |
AI_SLM_DEFAULT_MAX_VERTICES
Default values for configuration properties.
|
static int |
AI_TRUE
Boolean constants
|
static int |
AI_UINT64
Enum used to distinguish data types.
|
static int |
AI_UVTRAFO_ALL
UVCoord Transforms
|
static int |
AI_UVTRAFO_ROTATION
UVCoord Transforms
|
static int |
AI_UVTRAFO_SCALING
UVCoord Transforms
|
static int |
AI_UVTRAFO_TRANSLATION
UVCoord Transforms
|
static java.lang.String |
aiAI_MATKEY_GLTF_ALPHACUTOFF
PBR Material keys
|
static java.lang.String |
aiAI_MATKEY_GLTF_ALPHAMODE
PBR Material keys
|
static java.lang.String |
aiAI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR
PBR Material keys
|
static java.lang.String |
aiAI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR
PBR Material keys
|
static java.lang.String |
aiAI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR
PBR Material keys
|
static java.lang.String |
aiAI_MATKEY_GLTF_PBRSPECULARGLOSSINESS
PBR Material keys
|
static java.lang.String |
aiAI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR
PBR Material keys
|
static java.lang.String |
aiAI_MATKEY_GLTF_UNLIT
PBR Material keys
|
static int |
aiAnimBehaviour_CONSTANT
Defines how an animation channel behaves outside the defined time range.
|
static int |
aiAnimBehaviour_DEFAULT
Defines how an animation channel behaves outside the defined time range.
|
static int |
aiAnimBehaviour_LINEAR
Defines how an animation channel behaves outside the defined time range.
|
static int |
aiAnimBehaviour_REPEAT
Defines how an animation channel behaves outside the defined time range.
|
static int |
aiBlendMode_Additive
Defines alpha-blend flags.
|
static int |
aiBlendMode_Default
Defines alpha-blend flags.
|
static int |
aiComponent_ANIMATIONS
Enumerates components of the
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step. |
static int |
aiComponent_BONEWEIGHTS
Enumerates components of the
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step. |
static int |
aiComponent_CAMERAS
Enumerates components of the
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step. |
static int |
aiComponent_COLORS
Enumerates components of the
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step. |
static int |
aiComponent_LIGHTS
Enumerates components of the
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step. |
static int |
aiComponent_MATERIALS
Enumerates components of the
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step. |
static int |
aiComponent_MESHES
Enumerates components of the
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step. |
static int |
aiComponent_NORMALS
Enumerates components of the
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step. |
static int |
aiComponent_TANGENTS_AND_BITANGENTS
Enumerates components of the
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step. |
static int |
aiComponent_TEXCOORDS
Enumerates components of the
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step. |
static int |
aiComponent_TEXTURES
Enumerates components of the
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step. |
static int |
aiDefaultLogStream_DEBUGGER
Enumerates predefined log streaming destinations.
|
static int |
aiDefaultLogStream_FILE
Enumerates predefined log streaming destinations.
|
static int |
aiDefaultLogStream_STDERR
Enumerates predefined log streaming destinations.
|
static int |
aiDefaultLogStream_STDOUT
Enumerates predefined log streaming destinations.
|
static int |
aiImporterFlags_Experimental
Mixed set of flags for
AIImporterDesc, indicating some features common to many importers. |
static int |
aiImporterFlags_LimitedSupport
Mixed set of flags for
AIImporterDesc, indicating some features common to many importers. |
static int |
aiImporterFlags_SupportBinaryFlavour
Mixed set of flags for
AIImporterDesc, indicating some features common to many importers. |
static int |
aiImporterFlags_SupportCompressedFlavour
Mixed set of flags for
AIImporterDesc, indicating some features common to many importers. |
static int |
aiImporterFlags_SupportTextFlavour
Mixed set of flags for
AIImporterDesc, indicating some features common to many importers. |
static int |
aiLightSource_AMBIENT
Enumerates all supported types of light sources.
|
static int |
aiLightSource_AREA
Enumerates all supported types of light sources.
|
static int |
aiLightSource_DIRECTIONAL
Enumerates all supported types of light sources.
|
static int |
aiLightSource_POINT
Enumerates all supported types of light sources.
|
static int |
aiLightSource_SPOT
Enumerates all supported types of light sources.
|
static int |
aiLightSource_UNDEFINED
Enumerates all supported types of light sources.
|
static int |
aiMorphingMethod_MORPH_NORMALIZED
Enumerates the methods of mesh morphing supported by Assimp.
|
static int |
aiMorphingMethod_MORPH_RELATIVE
Enumerates the methods of mesh morphing supported by Assimp.
|
static int |
aiMorphingMethod_VERTEX_BLEND
Enumerates the methods of mesh morphing supported by Assimp.
|
static int |
aiOrigin_CUR
Seek origins (for the virtual file system API).
|
static int |
aiOrigin_END
Seek origins (for the virtual file system API).
|
static int |
aiOrigin_SET
Seek origins (for the virtual file system API).
|
static int |
aiPrimitiveType_LINE
Enumerates the types of geometric primitives supported by Assimp.
|
static int |
aiPrimitiveType_POINT
Enumerates the types of geometric primitives supported by Assimp.
|
static int |
aiPrimitiveType_POLYGON
Enumerates the types of geometric primitives supported by Assimp.
|
static int |
aiPrimitiveType_TRIANGLE
Enumerates the types of geometric primitives supported by Assimp.
|
static int |
aiProcess_CalcTangentSpace
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_ConvertToLeftHanded
Process Presets
|
static int |
aiProcess_Debone
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_DropNormals
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_EmbedTextures
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_FindDegenerates
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_FindInstances
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_FindInvalidData
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_FixInfacingNormals
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_FlipUVs
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_FlipWindingOrder
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_ForceGenNormals
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_GenBoundingBoxes
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_GenNormals
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_GenSmoothNormals
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_GenUVCoords
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_GlobalScale
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_ImproveCacheLocality
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_JoinIdenticalVertices
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_LimitBoneWeights
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_MakeLeftHanded
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_OptimizeGraph
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_OptimizeMeshes
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_PopulateArmatureData
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_PreTransformVertices
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_RemoveComponent
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_RemoveRedundantMaterials
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_SortByPType
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_SplitByBoneCount
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_SplitLargeMeshes
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_TransformUVCoords
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_Triangulate
Defines the flags for all possible post processing steps.
|
static int |
aiProcess_ValidateDataStructure
Defines the flags for all possible post processing steps.
|
static int |
aiProcessPreset_TargetRealtime_Fast
Process Presets
|
static int |
aiProcessPreset_TargetRealtime_MaxQuality
Process Presets
|
static int |
aiProcessPreset_TargetRealtime_Quality
Process Presets
|
static int |
aiPTI_Buffer
A very primitive RTTI system for the contents of material properties.
|
static int |
aiPTI_Double
A very primitive RTTI system for the contents of material properties.
|
static int |
aiPTI_Float
A very primitive RTTI system for the contents of material properties.
|
static int |
aiPTI_Integer
A very primitive RTTI system for the contents of material properties.
|
static int |
aiPTI_String
A very primitive RTTI system for the contents of material properties.
|
static int |
aiReturn_FAILURE
Standard return type for some library functions.
|
static int |
aiReturn_OUTOFMEMORY
Standard return type for some library functions.
|
static int |
aiReturn_SUCCESS
Standard return type for some library functions.
|
static int |
aiShadingMode_Blinn
Defines all shading models supported by the library.
|
static int |
aiShadingMode_CookTorrance
Defines all shading models supported by the library.
|
static int |
aiShadingMode_Flat
Defines all shading models supported by the library.
|
static int |
aiShadingMode_Fresnel
Defines all shading models supported by the library.
|
static int |
aiShadingMode_Gouraud
Defines all shading models supported by the library.
|
static int |
aiShadingMode_Minnaert
Defines all shading models supported by the library.
|
static int |
aiShadingMode_NoShading
Defines all shading models supported by the library.
|
static int |
aiShadingMode_OrenNayar
Defines all shading models supported by the library.
|
static int |
aiShadingMode_Phong
Defines all shading models supported by the library.
|
static int |
aiShadingMode_Toon
Defines all shading models supported by the library.
|
static int |
aiTextureFlags_IgnoreAlpha
Defines some mixed flags for a particular texture.
|
static int |
aiTextureFlags_Invert
Defines some mixed flags for a particular texture.
|
static int |
aiTextureFlags_UseAlpha
Defines some mixed flags for a particular texture.
|
static int |
aiTextureMapMode_Clamp
Defines how UV coordinates outside the [0...1] range are handled.
|
static int |
aiTextureMapMode_Decal
Defines how UV coordinates outside the [0...1] range are handled.
|
static int |
aiTextureMapMode_Mirror
Defines how UV coordinates outside the [0...1] range are handled.
|
static int |
aiTextureMapMode_Wrap
Defines how UV coordinates outside the [0...1] range are handled.
|
static int |
aiTextureMapping_BOX
Defines how the mapping coords for a texture are generated.
|
static int |
aiTextureMapping_CYLINDER
Defines how the mapping coords for a texture are generated.
|
static int |
aiTextureMapping_OTHER
Defines how the mapping coords for a texture are generated.
|
static int |
aiTextureMapping_PLANE
Defines how the mapping coords for a texture are generated.
|
static int |
aiTextureMapping_SPHERE
Defines how the mapping coords for a texture are generated.
|
static int |
aiTextureMapping_UV
Defines how the mapping coords for a texture are generated.
|
static int |
aiTextureOp_Add
Defines how the Nth texture of a specific type is combined with
the result of all previous layers.
|
static int |
aiTextureOp_Divide
Defines how the Nth texture of a specific type is combined with
the result of all previous layers.
|
static int |
aiTextureOp_Multiply
Defines how the Nth texture of a specific type is combined with
the result of all previous layers.
|
static int |
aiTextureOp_SignedAdd
Defines how the Nth texture of a specific type is combined with
the result of all previous layers.
|
static int |
aiTextureOp_SmoothAdd
Defines how the Nth texture of a specific type is combined with
the result of all previous layers.
|
static int |
aiTextureOp_Subtract
Defines how the Nth texture of a specific type is combined with
the result of all previous layers.
|
static int |
aiTextureType_AMBIENT
Defines the purpose of a texture.
|
static int |
aiTextureType_AMBIENT_OCCLUSION
Defines the purpose of a texture.
|
static int |
aiTextureType_BASE_COLOR
Defines the purpose of a texture.
|
static int |
aiTextureType_DIFFUSE
Defines the purpose of a texture.
|
static int |
aiTextureType_DIFFUSE_ROUGHNESS
Defines the purpose of a texture.
|
static int |
aiTextureType_DISPLACEMENT
Defines the purpose of a texture.
|
static int |
aiTextureType_EMISSION_COLOR
Defines the purpose of a texture.
|
static int |
aiTextureType_EMISSIVE
Defines the purpose of a texture.
|
static int |
aiTextureType_HEIGHT
Defines the purpose of a texture.
|
static int |
aiTextureType_LIGHTMAP
Defines the purpose of a texture.
|
static int |
aiTextureType_METALNESS
Defines the purpose of a texture.
|
static int |
aiTextureType_NONE
Defines the purpose of a texture.
|
static int |
aiTextureType_NORMAL_CAMERA
Defines the purpose of a texture.
|
static int |
aiTextureType_NORMALS
Defines the purpose of a texture.
|
static int |
aiTextureType_OPACITY
Defines the purpose of a texture.
|
static int |
aiTextureType_REFLECTION
Defines the purpose of a texture.
|
static int |
aiTextureType_SHININESS
Defines the purpose of a texture.
|
static int |
aiTextureType_SPECULAR
Defines the purpose of a texture.
|
static int |
aiTextureType_UNKNOWN
Defines the purpose of a texture.
|
static int |
ASSIMP_CFLAGS_DEBUG
Assimp was compiled as a debug build
|
static int |
ASSIMP_CFLAGS_NOBOOST
Assimp was compiled with
ASSIMP_BUILD_BOOST_WORKAROUND defined |
static int |
ASSIMP_CFLAGS_SHARED
Assimp was compiled as a shared object (Windows: DLL)
|
static int |
ASSIMP_CFLAGS_SINGLETHREADED
Assimp was compiled with
ASSIMP_BUILD_SINGLETHREADED defined |
static int |
ASSIMP_CFLAGS_STLPORT
Assimp was compiled against STLport
|
static int |
MAXLEN
Maximum dimension for strings, ASSIMP strings are zero terminated.
|
static int |
PP_ICL_PTCACHE_SIZE
Default values for configuration properties.
|
| Modifier and Type | Method and Description |
|---|---|
static float |
AI_DEG_TO_RAD(float x)
Tiny macro to convert from degrees to radians
|
static float |
AI_RAD_TO_DEG(float x)
Tiny macro to convert from radians to degrees
|
static AIScene |
aiApplyPostProcessing(AIScene pScene,
int pFlags)
Apply post-processing to an already-imported scene.
|
static void |
aiAttachLogStream(AILogStream stream)
Attach a custom log stream to the libraries' logging system.
|
static int |
aiComponent_COLORSn(int n)
Remove a specific color channel 'n'
|
static int |
aiComponent_TEXCOORDSn(int n)
Remove a specific UV channel 'n'
|
static AIScene |
aiCopyScene(AIScene pIn)
Create a modifiable copy of a scene.
|
static void |
aiCopyScene(AIScene pIn,
org.lwjgl.PointerBuffer pOut)
Create a modifiable copy of a scene.
|
static AIPropertyStore |
aiCreatePropertyStore()
Create an empty property store.
|
static void |
aiCreateQuaternionFromMatrix(AIQuaternion quat,
AIMatrix3x3 mat)
Construct a quaternion from a 3x3 rotation matrix.
|
static void |
aiDecomposeMatrix(AIMatrix4x4 mat,
AIVector3D scaling,
AIQuaternion rotation,
AIVector3D position)
Decompose a transformation matrix into its rotational, translational and scaling components.
|
static void |
aiDetachAllLogStreams()
Detach all active log streams from the libraries' logging system.
|
static int |
aiDetachLogStream(AILogStream stream)
Detach a custom log stream from the libraries' logging system.
|
static void |
aiEnableVerboseLogging(boolean d)
Enable verbose logging.
|
static int |
aiExportScene(AIScene pScene,
java.nio.ByteBuffer pFormatId,
java.nio.ByteBuffer pFileName,
int pPreProcessing)
Exports the given scene to a chosen file format and writes the result file(s) to disk.
|
static int |
aiExportScene(AIScene pScene,
java.lang.CharSequence pFormatId,
java.lang.CharSequence pFileName,
int pPreProcessing)
Exports the given scene to a chosen file format and writes the result file(s) to disk.
|
static int |
aiExportSceneEx(AIScene pScene,
java.nio.ByteBuffer pFormatId,
java.nio.ByteBuffer pFileName,
AIFileIO pIO,
int pPreProcessing)
Exports the given scene to a chosen file format using custom IO logic supplied by you.
|
static int |
aiExportSceneEx(AIScene pScene,
java.lang.CharSequence pFormatId,
java.lang.CharSequence pFileName,
AIFileIO pIO,
int pPreProcessing)
Exports the given scene to a chosen file format using custom IO logic supplied by you.
|
static AIExportDataBlob |
aiExportSceneToBlob(AIScene pScene,
java.nio.ByteBuffer pFormatId,
int pPreProcessing)
Exports the given scene to a chosen file format.
|
static AIExportDataBlob |
aiExportSceneToBlob(AIScene pScene,
java.lang.CharSequence pFormatId,
int pPreProcessing)
Exports the given scene to a chosen file format.
|
static void |
aiFreeScene(AIScene pIn)
Frees a scene copy created using
CopyScene |
static java.lang.String |
aiGetBranchName()
Returns the branch name of the Assimp runtime.
|
static int |
aiGetCompileFlags()
Returns assimp's compile flags.
|
static java.lang.String |
aiGetErrorString()
Returns the error text of the last failed import process.
|
static long |
aiGetExportFormatCount()
Returns the number of export file formats available in the current Assimp build.
|
static AIExportFormatDesc |
aiGetExportFormatDescription(long pIndex)
Returns a description of the nth export file format.
|
static void |
aiGetExtensionList(AIString szOut)
Get a list of all file extensions supported by ASSIMP.
|
static AIImporterDesc |
aiGetImporterDesc(java.nio.ByteBuffer extension)
Returns the Importer description for a given extension.
|
static AIImporterDesc |
aiGetImporterDesc(java.lang.CharSequence extension)
Returns the Importer description for a given extension.
|
static long |
aiGetImportFormatCount()
Returns the number of import file formats available in the current Assimp build.
|
static AIImporterDesc |
aiGetImportFormatDescription(long pIndex)
Returns a description of the nth import file format.
|
static java.lang.String |
aiGetLegalString()
Returns a string with legal copyright and licensing information about Assimp.
|
static int |
aiGetMaterialColor(AIMaterial pMat,
java.nio.ByteBuffer pKey,
int type,
int index,
AIColor4D pOut)
Retrieve a color value with a specific key from a material.
|
static int |
aiGetMaterialColor(AIMaterial pMat,
java.lang.CharSequence pKey,
int type,
int index,
AIColor4D pOut)
Retrieve a color value with a specific key from a material.
|
static int |
aiGetMaterialFloatArray(AIMaterial pMat,
java.nio.ByteBuffer pKey,
int type,
int index,
float[] pOut,
int[] pMax)
Array version of:
GetMaterialFloatArray |
static int |
aiGetMaterialFloatArray(AIMaterial pMat,
java.nio.ByteBuffer pKey,
int type,
int index,
java.nio.FloatBuffer pOut,
java.nio.IntBuffer pMax)
Retrieve an array of float values with a specific key from the material.
|
static int |
aiGetMaterialFloatArray(AIMaterial pMat,
java.lang.CharSequence pKey,
int type,
int index,
float[] pOut,
int[] pMax)
Array version of:
GetMaterialFloatArray |
static int |
aiGetMaterialFloatArray(AIMaterial pMat,
java.lang.CharSequence pKey,
int type,
int index,
java.nio.FloatBuffer pOut,
java.nio.IntBuffer pMax)
Retrieve an array of float values with a specific key from the material.
|
static int |
aiGetMaterialIntegerArray(AIMaterial pMat,
java.nio.ByteBuffer pKey,
int type,
int index,
int[] pOut,
int[] pMax)
Array version of:
GetMaterialIntegerArray |
static int |
aiGetMaterialIntegerArray(AIMaterial pMat,
java.nio.ByteBuffer pKey,
int type,
int index,
java.nio.IntBuffer pOut,
java.nio.IntBuffer pMax)
Retrieve an array of integer values with a specific key from a material.
|
static int |
aiGetMaterialIntegerArray(AIMaterial pMat,
java.lang.CharSequence pKey,
int type,
int index,
int[] pOut,
int[] pMax)
Array version of:
GetMaterialIntegerArray |
static int |
aiGetMaterialIntegerArray(AIMaterial pMat,
java.lang.CharSequence pKey,
int type,
int index,
java.nio.IntBuffer pOut,
java.nio.IntBuffer pMax)
Retrieve an array of integer values with a specific key from a material.
|
static int |
aiGetMaterialProperty(AIMaterial pMat,
java.nio.ByteBuffer pKey,
int type,
int index,
org.lwjgl.PointerBuffer mPropOut)
Retrieve a material property with a specific key from the material.
|
static int |
aiGetMaterialProperty(AIMaterial pMat,
java.nio.ByteBuffer pKey,
org.lwjgl.PointerBuffer mPropOut)
Retrieve a material property with a specific key from the material.
|
static int |
aiGetMaterialProperty(AIMaterial pMat,
java.lang.CharSequence pKey,
int type,
int index,
org.lwjgl.PointerBuffer mPropOut)
Retrieve a material property with a specific key from the material.
|
static int |
aiGetMaterialProperty(AIMaterial pMat,
java.lang.CharSequence pKey,
org.lwjgl.PointerBuffer mPropOut)
Retrieve a material property with a specific key from the material.
|
static int |
aiGetMaterialString(AIMaterial pMat,
java.nio.ByteBuffer pKey,
int type,
int index,
AIString pOut)
Retrieve a string value with a specific key from a material.
|
static int |
aiGetMaterialString(AIMaterial pMat,
java.lang.CharSequence pKey,
int type,
int index,
AIString pOut)
Retrieve a string value with a specific key from a material.
|
static int |
aiGetMaterialTexture(AIMaterial pMat,
int type,
int index,
AIString path,
int[] mapping,
int[] uvindex,
float[] blend,
int[] op,
int[] mapmode,
int[] flags)
Array version of:
GetMaterialTexture |
static int |
aiGetMaterialTexture(AIMaterial pMat,
int type,
int index,
AIString path,
java.nio.IntBuffer mapping,
java.nio.IntBuffer uvindex,
java.nio.FloatBuffer blend,
java.nio.IntBuffer op,
java.nio.IntBuffer mapmode,
java.nio.IntBuffer flags)
Helper function to get all values pertaining to a particular
texture slot from a material structure.
|
static int |
aiGetMaterialTextureCount(AIMaterial pMat,
int type)
Get the number of textures for a particular texture type.
|
static int |
aiGetMaterialUVTransform(AIMaterial pMat,
java.nio.ByteBuffer pKey,
int type,
int index,
AIUVTransform pOut)
Retrieve a UVTransform value with a specific key from a material.
|
static int |
aiGetMaterialUVTransform(AIMaterial pMat,
java.lang.CharSequence pKey,
int type,
int index,
AIUVTransform pOut)
Retrieve a UVTransform value with a specific key from a material.
|
static void |
aiGetMemoryRequirements(AIScene pIn,
AIMemoryInfo in)
Get the approximated storage required by an imported asset.
|
static int |
aiGetVersionMajor()
Returns the current major version number of Assimp.
|
static int |
aiGetVersionMinor()
Returns the current minor version number of Assimp.
|
static int |
aiGetVersionPatch()
Returns the current patch version number of Assimp.
|
static int |
aiGetVersionRevision()
Returns the repository revision of the Assimp runtime.
|
static void |
aiIdentityMatrix3(AIMatrix3x3 mat)
Get a 3x3 identity matrix.
|
static void |
aiIdentityMatrix4(AIMatrix4x4 mat)
Get a 4x4 identity matrix.
|
static AIScene |
aiImportFile(java.nio.ByteBuffer pFile,
int pFlags)
Reads the given file and returns its content.
|
static AIScene |
aiImportFile(java.lang.CharSequence pFile,
int pFlags)
Reads the given file and returns its content.
|
static AIScene |
aiImportFileEx(java.nio.ByteBuffer pFile,
int pFlags,
AIFileIO pFS)
Reads the given file using user-defined I/O functions and returns its content.
|
static AIScene |
aiImportFileEx(java.lang.CharSequence pFile,
int pFlags,
AIFileIO pFS)
Reads the given file using user-defined I/O functions and returns its content.
|
static AIScene |
aiImportFileExWithProperties(java.nio.ByteBuffer pFile,
int pFlags,
AIFileIO pFS,
AIPropertyStore pProps)
Same as
ImportFileEx, but adds an extra parameter containing importer settings. |
static AIScene |
aiImportFileExWithProperties(java.lang.CharSequence pFile,
int pFlags,
AIFileIO pFS,
AIPropertyStore pProps)
Same as
ImportFileEx, but adds an extra parameter containing importer settings. |
static AIScene |
aiImportFileFromMemory(java.nio.ByteBuffer pBuffer,
int pFlags,
java.nio.ByteBuffer pHint)
Reads the given file from a given memory buffer.
|
static AIScene |
aiImportFileFromMemory(java.nio.ByteBuffer pBuffer,
int pFlags,
java.lang.CharSequence pHint)
Reads the given file from a given memory buffer.
|
static AIScene |
aiImportFileFromMemoryWithProperties(java.nio.ByteBuffer pBuffer,
int pFlags,
java.nio.ByteBuffer pHint,
AIPropertyStore pProps)
Same as
ImportFileFromMemory, but adds an extra parameter containing importer settings. |
static AIScene |
aiImportFileFromMemoryWithProperties(java.nio.ByteBuffer pBuffer,
int pFlags,
java.lang.CharSequence pHint,
AIPropertyStore pProps)
Same as
ImportFileFromMemory, but adds an extra parameter containing importer settings. |
static boolean |
aiIsExtensionSupported(java.nio.ByteBuffer szExtension)
Returns whether a given file extension is supported by ASSIMP.
|
static boolean |
aiIsExtensionSupported(java.lang.CharSequence szExtension)
Returns whether a given file extension is supported by ASSIMP.
|
static void |
aiMultiplyMatrix3(AIMatrix3x3 dst,
AIMatrix3x3 src)
Multiply two 3x3 matrices.
|
static void |
aiMultiplyMatrix4(AIMatrix4x4 dst,
AIMatrix4x4 src)
Multiply two 4x4 matrices.
|
static void |
aiReleaseExportBlob(AIExportDataBlob pData)
Releases the memory associated with the given exported data.
|
static void |
aiReleaseExportFormatDescription(AIExportFormatDesc desc)
Release a description of the nth export file format.
|
static void |
aiReleaseImport(AIScene pScene)
Releases all resources associated with the given import process.
|
static void |
aiReleasePropertyStore(AIPropertyStore p)
Delete a property store.
|
static void |
aiSetImportPropertyFloat(AIPropertyStore store,
java.nio.ByteBuffer szName,
float value)
Set an floating-point property.
|
static void |
aiSetImportPropertyFloat(AIPropertyStore store,
java.lang.CharSequence szName,
float value)
Set an floating-point property.
|
static void |
aiSetImportPropertyInteger(AIPropertyStore store,
java.nio.ByteBuffer szName,
int value)
Set an integer property.
|
static void |
aiSetImportPropertyInteger(AIPropertyStore store,
java.lang.CharSequence szName,
int value)
Set an integer property.
|
static void |
aiSetImportPropertyMatrix(AIPropertyStore store,
java.nio.ByteBuffer szName,
AIMatrix4x4 value)
Set a matrix property.
|
static void |
aiSetImportPropertyMatrix(AIPropertyStore store,
java.lang.CharSequence szName,
AIMatrix4x4 value)
Set a matrix property.
|
static void |
aiSetImportPropertyString(AIPropertyStore store,
java.nio.ByteBuffer szName,
AIString value)
Set a string property.
|
static void |
aiSetImportPropertyString(AIPropertyStore store,
java.lang.CharSequence szName,
AIString value)
Set a string property.
|
static void |
aiTransformVecByMatrix3(AIVector3D vec,
AIMatrix3x3 mat)
Transform a vector by a 3x3 matrix
|
static void |
aiTransformVecByMatrix4(AIVector3D vec,
AIMatrix4x4 mat)
Transform a vector by a 4x4 matrix
|
static void |
aiTransposeMatrix3(AIMatrix3x3 mat)
Transpose a 3x3 matrix.
|
static void |
aiTransposeMatrix4(AIMatrix4x4 mat)
Transpose a 4x4 matrix.
|
static org.lwjgl.system.SharedLibrary |
getLibrary()
Returns the assimp
SharedLibrary. |
static long |
naiApplyPostProcessing(long pScene,
int pFlags)
Unsafe version of:
ApplyPostProcessing |
static void |
naiAttachLogStream(long stream)
Unsafe version of:
AttachLogStream |
static void |
naiCopyScene(long pIn,
long pOut)
Unsafe version of:
CopyScene |
static long |
naiCreatePropertyStore()
Unsafe version of:
CreatePropertyStore |
static void |
naiCreateQuaternionFromMatrix(long quat,
long mat)
Unsafe version of:
CreateQuaternionFromMatrix |
static void |
naiDecomposeMatrix(long mat,
long scaling,
long rotation,
long position)
Unsafe version of:
DecomposeMatrix |
static int |
naiDetachLogStream(long stream)
Unsafe version of:
DetachLogStream |
static int |
naiExportScene(long pScene,
long pFormatId,
long pFileName,
int pPreProcessing)
Unsafe version of:
ExportScene |
static int |
naiExportSceneEx(long pScene,
long pFormatId,
long pFileName,
long pIO,
int pPreProcessing)
Unsafe version of:
ExportSceneEx |
static long |
naiExportSceneToBlob(long pScene,
long pFormatId,
int pPreProcessing)
Unsafe version of:
ExportSceneToBlob |
static void |
naiFreeScene(long pIn)
Unsafe version of:
FreeScene |
static long |
naiGetBranchName()
Unsafe version of:
GetBranchName |
static long |
naiGetErrorString()
Unsafe version of:
GetErrorString |
static long |
naiGetExportFormatDescription(long pIndex)
Unsafe version of:
GetExportFormatDescription |
static void |
naiGetExtensionList(long szOut)
Unsafe version of:
GetExtensionList |
static long |
naiGetImporterDesc(long extension)
Unsafe version of:
GetImporterDesc |
static long |
naiGetImportFormatDescription(long pIndex)
Unsafe version of:
GetImportFormatDescription |
static long |
naiGetLegalString()
Unsafe version of:
GetLegalString |
static int |
naiGetMaterialColor(long pMat,
long pKey,
int type,
int index,
long pOut)
Unsafe version of:
GetMaterialColor |
static int |
naiGetMaterialFloatArray(long pMat,
long pKey,
int type,
int index,
long pOut,
long pMax)
Unsafe version of:
GetMaterialFloatArray |
static int |
naiGetMaterialIntegerArray(long pMat,
long pKey,
int type,
int index,
long pOut,
long pMax)
Unsafe version of:
GetMaterialIntegerArray |
static int |
naiGetMaterialProperty(long pMat,
long pKey,
int type,
int index,
long mPropOut)
Unsafe version of:
GetMaterialProperty |
static int |
naiGetMaterialString(long pMat,
long pKey,
int type,
int index,
long pOut)
Unsafe version of:
GetMaterialString |
static int |
naiGetMaterialTexture(long pMat,
int type,
int index,
long path,
long mapping,
long uvindex,
long blend,
long op,
long mapmode,
long flags)
Unsafe version of:
GetMaterialTexture |
static int |
naiGetMaterialTextureCount(long pMat,
int type)
Unsafe version of:
GetMaterialTextureCount |
static int |
naiGetMaterialUVTransform(long pMat,
long pKey,
int type,
int index,
long pOut)
Unsafe version of:
GetMaterialUVTransform |
static void |
naiGetMemoryRequirements(long pIn,
long in)
Unsafe version of:
GetMemoryRequirements |
static void |
naiIdentityMatrix3(long mat)
Unsafe version of:
IdentityMatrix3 |
static void |
naiIdentityMatrix4(long mat)
Unsafe version of:
IdentityMatrix4 |
static long |
naiImportFile(long pFile,
int pFlags)
Unsafe version of:
ImportFile |
static long |
naiImportFileEx(long pFile,
int pFlags,
long pFS)
Unsafe version of:
ImportFileEx |
static long |
naiImportFileExWithProperties(long pFile,
int pFlags,
long pFS,
long pProps)
Unsafe version of:
ImportFileExWithProperties |
static long |
naiImportFileFromMemory(long pBuffer,
int pLength,
int pFlags,
long pHint)
Unsafe version of:
ImportFileFromMemory |
static long |
naiImportFileFromMemoryWithProperties(long pBuffer,
int pLength,
int pFlags,
long pHint,
long pProps)
Unsafe version of:
ImportFileFromMemoryWithProperties |
static int |
naiIsExtensionSupported(long szExtension)
Unsafe version of:
IsExtensionSupported |
static void |
naiMultiplyMatrix3(long dst,
long src)
Unsafe version of:
MultiplyMatrix3 |
static void |
naiMultiplyMatrix4(long dst,
long src)
Unsafe version of:
MultiplyMatrix4 |
static void |
naiReleaseExportBlob(long pData)
Unsafe version of:
ReleaseExportBlob |
static void |
naiReleaseExportFormatDescription(long desc)
Unsafe version of:
ReleaseExportFormatDescription |
static void |
naiReleaseImport(long pScene)
Unsafe version of:
ReleaseImport |
static void |
naiReleasePropertyStore(long p)
Unsafe version of:
ReleasePropertyStore |
static void |
naiSetImportPropertyFloat(long store,
long szName,
float value)
Unsafe version of:
SetImportPropertyFloat |
static void |
naiSetImportPropertyInteger(long store,
long szName,
int value)
Unsafe version of:
SetImportPropertyInteger |
static void |
naiSetImportPropertyMatrix(long store,
long szName,
long value)
Unsafe version of:
SetImportPropertyMatrix |
static void |
naiSetImportPropertyString(long store,
long szName,
long value)
Unsafe version of:
SetImportPropertyString |
static void |
naiTransformVecByMatrix3(long vec,
long mat)
Unsafe version of:
TransformVecByMatrix3 |
static void |
naiTransformVecByMatrix4(long vec,
long mat)
Unsafe version of:
TransformVecByMatrix4 |
static void |
naiTransposeMatrix3(long mat)
Unsafe version of:
TransposeMatrix3 |
static void |
naiTransposeMatrix4(long mat)
Unsafe version of:
TransposeMatrix4 |
public static final java.lang.String AI_CONFIG_GLOB_MEASURE_TIME
If enabled, measures the time needed for each part of the loading process (i.e. IO time, importing, postprocessing, ..) and dumps these timings to the DefaultLogger. See the Performance Page for more information on this topic.
Property type: bool. Default value: false.
public static final java.lang.String AI_CONFIG_IMPORT_NO_SKELETON_MESHES
Skeleton dummy meshes are generated as a visualization aid in cases which the input data contains no geometry, but only animation data.
Property data type: bool. Default value: false
public static final java.lang.String AI_CONFIG_PP_SBBC_MAX_BONES
Process_SplitByBoneCount step.
Meshes are split until the maximum number of bones is reached. The default value is AI_SBBC_DEFAULT_MAX_BONES, which may be altered at compile-time.
Property data type: integer.
public static final java.lang.String AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE
This applies to the Process_CalcTangentSpace step. The angle is specified in degrees. The maximum value is 175.
Property type: float. Default value: 45 degrees
public static final java.lang.String AI_CONFIG_PP_CT_TEXTURE_CHANNEL_INDEX
The specified channel must exist or an error will be raised.
Property type: integer. Default value: 0
public static final java.lang.String AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE
Sometimes referred to as 'crease angle'. This applies to the Process_GenSmoothNormals step. The angle is specified in degrees, so 180 is PI. The
default value is 175 degrees (all vertex normals are smoothed). The maximum value is 175, too.
Property type: float.
Warning: setting this option may cause a severe loss of performance. The performance is unaffected if the AI_CONFIG_FAVOUR_SPEED flag is set but the
output quality may be reduced.
public static final java.lang.String AI_CONFIG_IMPORT_MDL_COLORMAP
This must be a valid path to a file. The file is 768 (256*3) bytes large and contains RGB triplets for each of the 256 palette entries. The default value is colormap.lmp. If the file is not found, a default palette (from Quake 1) is used.
Property type: string.
public static final java.lang.String AI_CONFIG_PP_RRM_EXCLUDE_LIST
Process_RemoveRedundantMaterials step to keep materials matching a name in a given list.
This is a list of 1 to n strings, ' ' serves as delimiter character. Identifiers containing whitespaces must be enclosed in *single* quotation marks.
For example: "keep-me and_me_to anotherMaterialToBeKept \'name with whitespace\'". If a material matches on of these names, it will not be
modified or removed by the postprocessing step nor will other materials be replaced by a reference to it.
This option might be useful if you are using some magic material names to pass additional semantics through the content pipeline. This ensures they won't be optimized away, but a general optimization is still performed for materials not contained in the list.
Property type: String. Default value: n/a
Linefeeds, tabs or carriage returns are treated as whitespace. Material names are case sensitive.
public static final java.lang.String AI_CONFIG_PP_PTV_KEEP_HIERARCHY
Process_PreTransformVertices step to keep the scene hierarchy. Meshes are moved to worldspace, but no optimization is performed (read:
meshes with equal materials are not joined. The total number of meshes won't change).
This option could be of use for you if the scene hierarchy contains important additional information which you intend to parse. For rendering, you can still render all meshes in the scene without any transformations.
Property type: bool. Default value: false.
public static final java.lang.String AI_CONFIG_PP_PTV_NORMALIZE
Process_PreTransformVertices step to normalize all vertex components into the [-1,1] range. That is, a bounding box for the
whole scene is computed, the maximum component is taken and all meshes are scaled appropriately (uniformly of course!). This might be useful if you
don't know the spatial dimension of the input data.public static final java.lang.String AI_CONFIG_PP_PTV_ADD_ROOT_TRANSFORMATION
Process_PreTransformVertices step to use a users defined matrix as the scene root node transformation before transforming vertices.
Property type: bool. Default value: false.
public static final java.lang.String AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION
Process_PreTransformVertices step to use a users defined matrix as the scene root node transformation before transforming vertices.
This property corresponds to the 'a1' component of the transformation matrix.
Property type: aiMatrix4x4.
public static final java.lang.String AI_CONFIG_PP_FD_REMOVE
Process_FindDegenerates step to remove degenerated primitives from the import - immediately.
The default behaviour converts degenerated triangles to lines and degenerated lines to points. See the documentation to the Process_FindDegenerates
step for a detailed example of the various ways to get rid of these lines and points if you don't want them.
Property type: bool. Default value: false.
public static final java.lang.String AI_CONFIG_PP_FD_CHECKAREA
Process_FindDegenerates to check the area of a triangle to be greater than e-6. If this is not the case the triangle will be removed if
AI_CONFIG_PP_FD_REMOVE is set to true.
Property type: bool. Default value: false.
public static final java.lang.String AI_CONFIG_PP_OG_EXCLUDE_LIST
Process_OptimizeGraph step to preserve nodes matching a name in a given list.
This is a list of 1 to n strings, ' ' serves as delimiter character. Identifiers containing whitespaces must be enclosed in *single* quotation marks.
For example: "keep-me and_me_to anotherNodeToBeKept \'name with whitespace\'". If a node matches on of these names, it will not be modified or
removed by the postprocessing step.
This option might be useful if you are using some magic node names to pass additional semantics through the content pipeline. This ensures they won't be optimized away, but a general optimization is still performed for nodes not contained in the list.
Property type: String. Default value: n/a
Linefeeds, tabs or carriage returns are treated as whitespace. Node names are case sensitive.
public static final java.lang.String AI_CONFIG_PP_SLM_TRIANGLE_LIMIT
This is used by the Process_SplitLargeMeshes PostProcess-Step to determine whether a mesh must be split or not.
Property type: integer.
The default value is AI_SLM_DEFAULT_MAX_TRIANGLES
public static final java.lang.String AI_CONFIG_PP_SLM_VERTEX_LIMIT
This is used by the Process_SplitLargeMeshes PostProcess-Step to determine whether a mesh must be split or not.
Property type: integer.
The default value is AI_SLM_DEFAULT_MAX_VERTICES
public static final java.lang.String AI_CONFIG_PP_LBW_MAX_WEIGHTS
This is used by the Process_LimitBoneWeights PostProcess-Step.
Property type: integer.
The default value is AI_LBW_MAX_WEIGHTS
public static final java.lang.String AI_CONFIG_PP_DB_THRESHOLD
This is used by the Process_Debone PostProcess-Step.
Property type: float.
The default value is AI_DEBONE_THRESHOLD
public static final java.lang.String AI_CONFIG_PP_DB_ALL_OR_NONE
This is used by the Process_Debone PostProcess-Step.
Property type: bool.
The default value is 0
public static final java.lang.String AI_CONFIG_PP_ICL_PTCACHE_SIZE
Process_ImproveCacheLocality step.
The size is given in vertices. Of course you can't know how the vertex format will exactly look like after the import returns, but you can still guess what your meshes will probably have.
Property type: integer.
The default value is PP_ICL_PTCACHE_SIZE. That results in slight performance improvements for most nVidia/AMD cards since 2002.
public static final java.lang.String AI_CONFIG_PP_RVC_FLAGS
Process_RemoveComponent step: Specifies the parts of the data structure to be removed.
See the documentation to this step for further details. The property is expected to be an integer, a bitwise combination of the aiComponent
flags. The default value is 0. Important: if no valid mesh is remaining after the step has been executed (e.g you thought it was funny to specify ALL
of the flags defined above) the import FAILS. Mainly because there is no data to work on anymore ...
public static final java.lang.String AI_CONFIG_PP_SBP_REMOVE
Process_SortByPType step: Specifies which primitive types are removed by the step.
This is a bitwise combination of the aiPrimitiveType flags. Specifying all of them is illegal, of course. A typical use would be to exclude
all line and point meshes from the import.
This is an integer property, its default value is 0.
public static final java.lang.String AI_CONFIG_PP_FID_ANIM_ACCURACY
Process_FindInvalidData step: Specifies the floating-point accuracy for animation values.
The step checks for animation tracks where all frame values are absolutely equal and removes them. This tweakable controls the epsilon for
floating-point comparisons - two keys are considered equal if the invariant abs(n0-n1)>epsilon holds true for all vector respectively
quaternion components.
The default value is 0.f - comparisons are exact then.
public static final java.lang.String AI_CONFIG_PP_FID_IGNORE_TEXTURECOORDS
Process_FindInvalidData step: Set to true to ignore texture coordinates.
This may be useful if you have to assign different kind of textures like one for the summer or one for the winter.
public static final java.lang.String AI_CONFIG_PP_TUV_EVALUATE
Process_TransformUVCoords step: Specifies which UV transformations are evaluated.
This is a bitwise combination of the AI_UVTRAFO_XXX flags (integer property, of course). By default all transformations are enabled
(AI_UVTRAFO_ALL).
public static final java.lang.String AI_CONFIG_FAVOUR_SPEED
Enabling this option may result in faster loading, but it needn't. It represents just a hint to loaders and post-processing steps to use faster code paths, if possible.
This property is expected to be an integer, != 0 stands for true. The default value is 0.
public static final java.lang.String AI_CONFIG_IMPORT_FBX_READ_ALL_GEOMETRY_LAYERS
Property type: bool. The default value is true (1)
public static final java.lang.String AI_CONFIG_IMPORT_FBX_READ_ALL_MATERIALS
This is void unless IMPORT_FBX_READ_MATERIALS=1.
Property type: bool. The default value is false (0)
public static final java.lang.String AI_CONFIG_IMPORT_FBX_READ_MATERIALS
Property type: bool. The default value is true (1)
public static final java.lang.String AI_CONFIG_IMPORT_FBX_READ_TEXTURES
Property type: bool. The default value is true (1)
public static final java.lang.String AI_CONFIG_IMPORT_FBX_READ_CAMERAS
Property type: bool. The default value is true (1)
public static final java.lang.String AI_CONFIG_IMPORT_FBX_READ_LIGHTS
Property type: bool. The default value is true (1)
public static final java.lang.String AI_CONFIG_IMPORT_FBX_READ_ANIMATIONS
Property type: bool. The default value is true (1)
public static final java.lang.String AI_CONFIG_IMPORT_FBX_STRICT_MODE
Property type: bool. The default value is false (0)
public static final java.lang.String AI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTS
Property type: bool. The default value is true (1)
public static final java.lang.String AI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES
Property type: bool. The default value is true (1)
public static final java.lang.String AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING
Property type: bool. The default value is false (0)
public static final java.lang.String AI_CONFIG_IMPORT_REMOVE_EMPTY_BONES
Empty bones are often used to define connections for other models.
Property type: bool. The default value is false (0)
public static final java.lang.String AI_CONFIG_FBX_CONVERT_TO_M
Property type: bool. The default value is false (0)
public static final java.lang.String AI_CONFIG_IMPORT_GLOBAL_KEYFRAME
ASSIMP does not support vertex keyframes (only bone animation is supported). The library reads only one frame of models with vertex animations. By default this is the first frame.
The default value is 0. This option applies to all importers. However, it is also possible to override the global setting for a specific loader.
You can use the AI_CONFIG_IMPORT_XXX_KEYFRAME options (where XXX is a placeholder for the file format for which you want to override the
global setting).
Property type: integer.
public static final java.lang.String AI_CONFIG_IMPORT_MD3_KEYFRAME
public static final java.lang.String AI_CONFIG_IMPORT_MD2_KEYFRAME
public static final java.lang.String AI_CONFIG_IMPORT_MDL_KEYFRAME
public static final java.lang.String AI_CONFIG_IMPORT_MDC_KEYFRAME
public static final java.lang.String AI_CONFIG_IMPORT_SMD_KEYFRAME
public static final java.lang.String AI_CONFIG_IMPORT_UNREAL_KEYFRAME
public static final java.lang.String AI_CONFIG_IMPORT_SMD_LOAD_ANIMATION_LIST
Property type: bool. Default value: true.
public static final java.lang.String AI_CONFIG_IMPORT_AC_SEPARATE_BFCULL
Property type: bool. Default value: true.
public static final java.lang.String AI_CONFIG_IMPORT_AC_EVAL_SUBDIVISION
Property type: bool. Default value: true.
public static final java.lang.String AI_CONFIG_UNREAL_HANDLE_FLAGS
Property type: bool. Default value: true.
public static final java.lang.String AI_CONFIG_IMPORT_TER_MAKE_UVS
UV coordinates for terrains are so simple to compute that you'll usually want to compute them on your own, if you need them. This option is intended for model viewers which want to offer an easy way to apply textures to terrains.
Property type: bool. Default value: false.
public static final java.lang.String AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS
Some ASE files have carry invalid normals, other don't.
Property type: bool. Default value: true.
public static final java.lang.String AI_CONFIG_IMPORT_MD3_HANDLE_MULTIPART
These models usually consist of 3 files, lower.md3, upper.md3 and head.md3. If this property is set to true, Assimp will try to load and * combine all three files if one of them is loaded.
Property type: bool. Default value: true.
public static final java.lang.String AI_CONFIG_IMPORT_MD3_SKIN_NAME
When loading MD3 files, Assimp checks whether a file [md3_file_name]_[skin_name].skin is existing. These files are used by * Quake III to be
able to assign different skins (e.g. red and blue team) to models. 'default', 'red', 'blue' are typical skin names.
Property type: String. Default value: "default".
public static final java.lang.String AI_CONFIG_IMPORT_MD3_SHADER_SRC
By default Assimp's behaviour is as follows: If a MD3 file any_path/models/any_q3_subdir/model_name/file_name.md3 is loaded, the library tries
to locate the corresponding shader file in any_path/scripts/model_name.shader. This property overrides this behaviour. It can either specify a
full path to the shader to be loaded or alternatively the path (relative or absolute) to the directory where the shaders for all MD3s to be loaded
reside. Assimp attempts to open IMPORT_MD3_SHADER_SRC/model_name.shader first, IMPORT_MD3_SHADER_SRC/file_name.shader is the fallback
file. Note that IMPORT_MD3_SHADER_SRC should have a terminal (back)slash.
Property type: String. Default value: n/a.
public static final java.lang.String AI_CONFIG_IMPORT_LWO_ONE_LAYER_ONLY
LWO files consist of layers and in some cases it could be useful to load only one of them. This property can be either a string - which specifies the name of the layer - or an integer - the index of the layer. If the property is not set the whole LWO model is loaded. Loading fails if the requested layer is not available. The layer index is zero-based and the layer name may not be empty.
Property type: Integer. Default value: all layers are loaded.
public static final java.lang.String AI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOAD
The default strategy is to look for a file with the same name but the MD5ANIM extension in the same directory. If it is found, it is loaded * and combined with the MD5MESH file. This configuration option can be used to disable this behaviour.
Property type: bool. Default value: false.
public static final java.lang.String AI_CONFIG_IMPORT_LWS_ANIM_START
AINodeAnim's.
Assimp provides full conversion of LightWave's envelope system, including pre and post conditions. The loader computes linearly subsampled animation chanels with the frame rate given in the LWS file. This property defines the start time. Note: animation channels are only generated if a node has at least one envelope with more tan one key assigned. This property is given in frames, '0' is the first frame. By default, if this property is not set, the importer takes the animation start from the input LWS file ('FirstFrame' line).
Property type: Integer. Default value: taken from file.
public static final java.lang.String AI_CONFIG_IMPORT_LWS_ANIM_END
public static final java.lang.String AI_CONFIG_IMPORT_IRR_ANIM_FPS
IRR animations are difficult to convert for Assimp and there will always be a loss of quality. This setting defines how many keys per second are returned by the converter.
Property type: integer. Default value: 100
public static final java.lang.String AI_CONFIG_IMPORT_OGRE_MATERIAL_FILE
Ogre meshes reference with material names, this does not tell Assimp the file where it is located in. Assimp will try to find the source file in the
following order: <material-name>.material, <mesh-filename-base>.material and lastly the material name defined by this config property.
Property type: String. Default value: Scene.material.
public static final java.lang.String AI_CONFIG_IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME
Ogre material texture units do not define texture type, the textures usage depends on the used shader or Ogre's fixed pipeline. If this config property is true Assimp will try to detect the type from the textures filename postfix: _n, _nrm, _nrml, _normal, _normals and _normalmap for normal map, _s, _spec, _specular and _specularmap for specular map, _l, _light, _lightmap, _occ and _occlusion for light map, _disp and _displacement for displacement map. The matching is case insensitive. Post fix is taken between the last underscore and the last period.
Default behavior is to detect type from lower cased texture unit name by matching against: normalmap, specularmap, lightmap and displacementmap. For
both cases if no match is found TextureType_DIFFUSE is used.
Property type: Bool. Default value: false.
public static final java.lang.String AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS
IfcSpace elements (and their geometric representations) are used to represent, well, free space in a building storey.
Property type: Bool. Default value: true.
public static final java.lang.String AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT
Turn on this option if you want to manage assets in native Android application without having to keep the internal directory and asset manager pointer.
public static final java.lang.String AI_CONFIG_IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS
A lot of files contain both a faceted mesh representation and a outline with a presentation type of 'Curve2D'. Currently Assimp doesn't convert those, so turning this option off just clutters the log with errors.
Property type: Bool. Default value: true.
public static final java.lang.String AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION
If this property is set to false, walls will be either triangulated by Process_Triangulate or will be passed through as huge polygons with faked
holes (i.e. holes that are connected with the outer boundary using a dummy edge). It is highly recommended to set this property to true if you want
triangulated data because Process_Triangulate is known to have problems with the kind of polygons that the IFC loader spits out for complicated
meshes.
Property type: Bool. Default value: true.
public static final java.lang.String AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE
This is used by the IFC importer to determine the tessellation parameter for smoothing curves.
The default value is AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE and the accepted values are in range [5.0, 120.0].
Property type: Float.
public static final java.lang.String AI_CONFIG_IMPORT_IFC_CYLINDRICAL_TESSELLATION
This is used by the IFC importer to determine the tessellation parameter for cylindrical shapes, i.e. the number of segments used to aproximate a circle.
The default value is AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION and the accepted values are in range [3, 180].
Property type: Integer.
public static final java.lang.String AI_CONFIG_IMPORT_COLLADA_IGNORE_UP_DIRECTION
If this property is set to true, the up direction provided in the file header will be ignored and the file will be loaded as is.
Property type: Bool. Default value: false.
public static final java.lang.String AI_CONFIG_IMPORT_COLLADA_USE_COLLADA_NAMES
If this property is set to true, the Collada names will be used as the node name. The default is to use the id tag (resp. sid tag, if no id tag is present) instead.
Property type: Bool. Default value: false.
public static final java.lang.String AI_CONFIG_EXPORT_XFILE_64BIT
Property type: Bool. Default value: false.
public static final java.lang.String AI_CONFIG_EXPORT_POINT_CLOUDS
When this flag is not defined the render data has to contain valid faces. Point clouds are only a collection of vertices which have nor spatial organization by a face and the validation process will remove them. Enabling this feature will switch off the flag and enable the functionality to export pure point clouds.
Property type: Bool. Default value: false.
public static final java.lang.String AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY
Property type: float. Default value: 1.0f
public static final java.lang.String AI_CONFIG_APP_SCALE_KEY
Property type: float. Default value: 1.0f
public static final int AI_SBBC_DEFAULT_MAX_BONES
public static final int AI_SLM_DEFAULT_MAX_TRIANGLES
public static final int AI_SLM_DEFAULT_MAX_VERTICES
public static final int AI_LBW_MAX_WEIGHTS
public static final int PP_ICL_PTCACHE_SIZE
public static final int AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION
public static final float AI_DEBONE_THRESHOLD
public static final float AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE
public static final float AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT
public static final float AI_CONFIG_APP_SCALE_DEFAULT
public static final int AI_UVTRAFO_SCALING
public static final int AI_UVTRAFO_ROTATION
public static final int AI_UVTRAFO_TRANSLATION
public static final int AI_UVTRAFO_ALL
public static final int aiComponent_NORMALS
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step.
See the documentation to Process_RemoveComponent for more details.
Component_NORMALS - Normal vectorsComponent_TANGENTS_AND_BITANGENTS - Tangents and bitangents go always togetherComponent_COLORS - ALL color sets. Use Component_COLORSn to specify the N'th set.Component_TEXCOORDS - ALL texture UV sets. Use Component_TEXCOORDSn to specify the N'th set.Component_BONEWEIGHTS -
Removes all bone weights from all meshes. The scenegraph nodes corresponding to the bones are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_ANIMATIONS -
Removes all node animations (AIScene::mAnimations). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph
step to do this.
Component_TEXTURES - Removes all embedded texturesComponent_LIGHTS -
Removes all light sources (AIScene::mLights). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_CAMERAS -
Removes all cameras (AIScene::mCameras). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to do
this.
Component_MESHES - Removes all meshes (AIScene::mMeshes).Component_MATERIALS - Removes all materials. One default material will be generated, so AIScene::mNumMaterials will be 1.public static final int aiComponent_TANGENTS_AND_BITANGENTS
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step.
See the documentation to Process_RemoveComponent for more details.
Component_NORMALS - Normal vectorsComponent_TANGENTS_AND_BITANGENTS - Tangents and bitangents go always togetherComponent_COLORS - ALL color sets. Use Component_COLORSn to specify the N'th set.Component_TEXCOORDS - ALL texture UV sets. Use Component_TEXCOORDSn to specify the N'th set.Component_BONEWEIGHTS -
Removes all bone weights from all meshes. The scenegraph nodes corresponding to the bones are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_ANIMATIONS -
Removes all node animations (AIScene::mAnimations). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph
step to do this.
Component_TEXTURES - Removes all embedded texturesComponent_LIGHTS -
Removes all light sources (AIScene::mLights). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_CAMERAS -
Removes all cameras (AIScene::mCameras). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to do
this.
Component_MESHES - Removes all meshes (AIScene::mMeshes).Component_MATERIALS - Removes all materials. One default material will be generated, so AIScene::mNumMaterials will be 1.public static final int aiComponent_COLORS
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step.
See the documentation to Process_RemoveComponent for more details.
Component_NORMALS - Normal vectorsComponent_TANGENTS_AND_BITANGENTS - Tangents and bitangents go always togetherComponent_COLORS - ALL color sets. Use Component_COLORSn to specify the N'th set.Component_TEXCOORDS - ALL texture UV sets. Use Component_TEXCOORDSn to specify the N'th set.Component_BONEWEIGHTS -
Removes all bone weights from all meshes. The scenegraph nodes corresponding to the bones are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_ANIMATIONS -
Removes all node animations (AIScene::mAnimations). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph
step to do this.
Component_TEXTURES - Removes all embedded texturesComponent_LIGHTS -
Removes all light sources (AIScene::mLights). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_CAMERAS -
Removes all cameras (AIScene::mCameras). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to do
this.
Component_MESHES - Removes all meshes (AIScene::mMeshes).Component_MATERIALS - Removes all materials. One default material will be generated, so AIScene::mNumMaterials will be 1.public static final int aiComponent_TEXCOORDS
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step.
See the documentation to Process_RemoveComponent for more details.
Component_NORMALS - Normal vectorsComponent_TANGENTS_AND_BITANGENTS - Tangents and bitangents go always togetherComponent_COLORS - ALL color sets. Use Component_COLORSn to specify the N'th set.Component_TEXCOORDS - ALL texture UV sets. Use Component_TEXCOORDSn to specify the N'th set.Component_BONEWEIGHTS -
Removes all bone weights from all meshes. The scenegraph nodes corresponding to the bones are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_ANIMATIONS -
Removes all node animations (AIScene::mAnimations). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph
step to do this.
Component_TEXTURES - Removes all embedded texturesComponent_LIGHTS -
Removes all light sources (AIScene::mLights). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_CAMERAS -
Removes all cameras (AIScene::mCameras). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to do
this.
Component_MESHES - Removes all meshes (AIScene::mMeshes).Component_MATERIALS - Removes all materials. One default material will be generated, so AIScene::mNumMaterials will be 1.public static final int aiComponent_BONEWEIGHTS
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step.
See the documentation to Process_RemoveComponent for more details.
Component_NORMALS - Normal vectorsComponent_TANGENTS_AND_BITANGENTS - Tangents and bitangents go always togetherComponent_COLORS - ALL color sets. Use Component_COLORSn to specify the N'th set.Component_TEXCOORDS - ALL texture UV sets. Use Component_TEXCOORDSn to specify the N'th set.Component_BONEWEIGHTS -
Removes all bone weights from all meshes. The scenegraph nodes corresponding to the bones are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_ANIMATIONS -
Removes all node animations (AIScene::mAnimations). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph
step to do this.
Component_TEXTURES - Removes all embedded texturesComponent_LIGHTS -
Removes all light sources (AIScene::mLights). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_CAMERAS -
Removes all cameras (AIScene::mCameras). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to do
this.
Component_MESHES - Removes all meshes (AIScene::mMeshes).Component_MATERIALS - Removes all materials. One default material will be generated, so AIScene::mNumMaterials will be 1.public static final int aiComponent_ANIMATIONS
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step.
See the documentation to Process_RemoveComponent for more details.
Component_NORMALS - Normal vectorsComponent_TANGENTS_AND_BITANGENTS - Tangents and bitangents go always togetherComponent_COLORS - ALL color sets. Use Component_COLORSn to specify the N'th set.Component_TEXCOORDS - ALL texture UV sets. Use Component_TEXCOORDSn to specify the N'th set.Component_BONEWEIGHTS -
Removes all bone weights from all meshes. The scenegraph nodes corresponding to the bones are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_ANIMATIONS -
Removes all node animations (AIScene::mAnimations). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph
step to do this.
Component_TEXTURES - Removes all embedded texturesComponent_LIGHTS -
Removes all light sources (AIScene::mLights). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_CAMERAS -
Removes all cameras (AIScene::mCameras). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to do
this.
Component_MESHES - Removes all meshes (AIScene::mMeshes).Component_MATERIALS - Removes all materials. One default material will be generated, so AIScene::mNumMaterials will be 1.public static final int aiComponent_TEXTURES
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step.
See the documentation to Process_RemoveComponent for more details.
Component_NORMALS - Normal vectorsComponent_TANGENTS_AND_BITANGENTS - Tangents and bitangents go always togetherComponent_COLORS - ALL color sets. Use Component_COLORSn to specify the N'th set.Component_TEXCOORDS - ALL texture UV sets. Use Component_TEXCOORDSn to specify the N'th set.Component_BONEWEIGHTS -
Removes all bone weights from all meshes. The scenegraph nodes corresponding to the bones are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_ANIMATIONS -
Removes all node animations (AIScene::mAnimations). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph
step to do this.
Component_TEXTURES - Removes all embedded texturesComponent_LIGHTS -
Removes all light sources (AIScene::mLights). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_CAMERAS -
Removes all cameras (AIScene::mCameras). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to do
this.
Component_MESHES - Removes all meshes (AIScene::mMeshes).Component_MATERIALS - Removes all materials. One default material will be generated, so AIScene::mNumMaterials will be 1.public static final int aiComponent_LIGHTS
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step.
See the documentation to Process_RemoveComponent for more details.
Component_NORMALS - Normal vectorsComponent_TANGENTS_AND_BITANGENTS - Tangents and bitangents go always togetherComponent_COLORS - ALL color sets. Use Component_COLORSn to specify the N'th set.Component_TEXCOORDS - ALL texture UV sets. Use Component_TEXCOORDSn to specify the N'th set.Component_BONEWEIGHTS -
Removes all bone weights from all meshes. The scenegraph nodes corresponding to the bones are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_ANIMATIONS -
Removes all node animations (AIScene::mAnimations). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph
step to do this.
Component_TEXTURES - Removes all embedded texturesComponent_LIGHTS -
Removes all light sources (AIScene::mLights). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_CAMERAS -
Removes all cameras (AIScene::mCameras). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to do
this.
Component_MESHES - Removes all meshes (AIScene::mMeshes).Component_MATERIALS - Removes all materials. One default material will be generated, so AIScene::mNumMaterials will be 1.public static final int aiComponent_CAMERAS
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step.
See the documentation to Process_RemoveComponent for more details.
Component_NORMALS - Normal vectorsComponent_TANGENTS_AND_BITANGENTS - Tangents and bitangents go always togetherComponent_COLORS - ALL color sets. Use Component_COLORSn to specify the N'th set.Component_TEXCOORDS - ALL texture UV sets. Use Component_TEXCOORDSn to specify the N'th set.Component_BONEWEIGHTS -
Removes all bone weights from all meshes. The scenegraph nodes corresponding to the bones are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_ANIMATIONS -
Removes all node animations (AIScene::mAnimations). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph
step to do this.
Component_TEXTURES - Removes all embedded texturesComponent_LIGHTS -
Removes all light sources (AIScene::mLights). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_CAMERAS -
Removes all cameras (AIScene::mCameras). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to do
this.
Component_MESHES - Removes all meshes (AIScene::mMeshes).Component_MATERIALS - Removes all materials. One default material will be generated, so AIScene::mNumMaterials will be 1.public static final int aiComponent_MESHES
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step.
See the documentation to Process_RemoveComponent for more details.
Component_NORMALS - Normal vectorsComponent_TANGENTS_AND_BITANGENTS - Tangents and bitangents go always togetherComponent_COLORS - ALL color sets. Use Component_COLORSn to specify the N'th set.Component_TEXCOORDS - ALL texture UV sets. Use Component_TEXCOORDSn to specify the N'th set.Component_BONEWEIGHTS -
Removes all bone weights from all meshes. The scenegraph nodes corresponding to the bones are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_ANIMATIONS -
Removes all node animations (AIScene::mAnimations). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph
step to do this.
Component_TEXTURES - Removes all embedded texturesComponent_LIGHTS -
Removes all light sources (AIScene::mLights). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_CAMERAS -
Removes all cameras (AIScene::mCameras). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to do
this.
Component_MESHES - Removes all meshes (AIScene::mMeshes).Component_MATERIALS - Removes all materials. One default material will be generated, so AIScene::mNumMaterials will be 1.public static final int aiComponent_MATERIALS
AIScene and AIMesh data structures that can be excluded from the import using the Process_RemoveComponent step.
See the documentation to Process_RemoveComponent for more details.
Component_NORMALS - Normal vectorsComponent_TANGENTS_AND_BITANGENTS - Tangents and bitangents go always togetherComponent_COLORS - ALL color sets. Use Component_COLORSn to specify the N'th set.Component_TEXCOORDS - ALL texture UV sets. Use Component_TEXCOORDSn to specify the N'th set.Component_BONEWEIGHTS -
Removes all bone weights from all meshes. The scenegraph nodes corresponding to the bones are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_ANIMATIONS -
Removes all node animations (AIScene::mAnimations). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph
step to do this.
Component_TEXTURES - Removes all embedded texturesComponent_LIGHTS -
Removes all light sources (AIScene::mLights). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to
do this.
Component_CAMERAS -
Removes all cameras (AIScene::mCameras). The corresponding scenegraph nodes are NOT removed. use the Process_OptimizeGraph step to do
this.
Component_MESHES - Removes all meshes (AIScene::mMeshes).Component_MATERIALS - Removes all materials. One default material will be generated, so AIScene::mNumMaterials will be 1.public static final double AI_MATH_PI
public static final double AI_MATH_TWO_PI
public static final double AI_MATH_HALF_PI
public static final float AI_MATH_PI_F
public static final float AI_MATH_TWO_PI_F
public static final float AI_MATH_HALF_PI_F
public static final float ai_epsilon
public static final int MAXLEN
public static final int aiReturn_SUCCESS
Return_SUCCESS - Indicates that a function was successful.Return_FAILURE - Indicates that a function failed.Return_OUTOFMEMORY - Indicates that not enough memory is available to perform the requested operation.public static final int aiReturn_FAILURE
Return_SUCCESS - Indicates that a function was successful.Return_FAILURE - Indicates that a function failed.Return_OUTOFMEMORY - Indicates that not enough memory is available to perform the requested operation.public static final int aiReturn_OUTOFMEMORY
Return_SUCCESS - Indicates that a function was successful.Return_FAILURE - Indicates that a function failed.Return_OUTOFMEMORY - Indicates that not enough memory is available to perform the requested operation.public static final int aiOrigin_SET
Origin_SET - Beginning of the fileOrigin_CUR - Current position of the file pointerOrigin_END - End of the file, offsets must be negativepublic static final int aiOrigin_CUR
Origin_SET - Beginning of the fileOrigin_CUR - Current position of the file pointerOrigin_END - End of the file, offsets must be negativepublic static final int aiOrigin_END
Origin_SET - Beginning of the fileOrigin_CUR - Current position of the file pointerOrigin_END - End of the file, offsets must be negativepublic static final int aiDefaultLogStream_FILE
DefaultLogStream_FILE - Stream the log to a fileDefaultLogStream_STDOUT - Stream the log to std::coutDefaultLogStream_STDERR - Stream the log to std::cerrDefaultLogStream_DEBUGGER - MSVC only: Stream the log the the debugger (this relies on OutputDebugString from the Win32 SDK)public static final int aiDefaultLogStream_STDOUT
DefaultLogStream_FILE - Stream the log to a fileDefaultLogStream_STDOUT - Stream the log to std::coutDefaultLogStream_STDERR - Stream the log to std::cerrDefaultLogStream_DEBUGGER - MSVC only: Stream the log the the debugger (this relies on OutputDebugString from the Win32 SDK)public static final int aiDefaultLogStream_STDERR
DefaultLogStream_FILE - Stream the log to a fileDefaultLogStream_STDOUT - Stream the log to std::coutDefaultLogStream_STDERR - Stream the log to std::cerrDefaultLogStream_DEBUGGER - MSVC only: Stream the log the the debugger (this relies on OutputDebugString from the Win32 SDK)public static final int aiDefaultLogStream_DEBUGGER
DefaultLogStream_FILE - Stream the log to a fileDefaultLogStream_STDOUT - Stream the log to std::coutDefaultLogStream_STDERR - Stream the log to std::cerrDefaultLogStream_DEBUGGER - MSVC only: Stream the log the the debugger (this relies on OutputDebugString from the Win32 SDK)public static final int aiAnimBehaviour_DEFAULT
AINodeAnim::mPreState and
AINodeAnim::mPostState.
AnimBehaviour_DEFAULT - The value from the default node transformation is takenAnimBehaviour_CONSTANT - The nearest key value is used without interpolationAnimBehaviour_LINEAR - The value of the nearest two keys is linearly extrapolated for the current time value.AnimBehaviour_REPEAT - The animation is repeated. If the animation key go from n to m and the current time is t, use the value at (t-n) % (|m-n|).public static final int aiAnimBehaviour_CONSTANT
AINodeAnim::mPreState and
AINodeAnim::mPostState.
AnimBehaviour_DEFAULT - The value from the default node transformation is takenAnimBehaviour_CONSTANT - The nearest key value is used without interpolationAnimBehaviour_LINEAR - The value of the nearest two keys is linearly extrapolated for the current time value.AnimBehaviour_REPEAT - The animation is repeated. If the animation key go from n to m and the current time is t, use the value at (t-n) % (|m-n|).public static final int aiAnimBehaviour_LINEAR
AINodeAnim::mPreState and
AINodeAnim::mPostState.
AnimBehaviour_DEFAULT - The value from the default node transformation is takenAnimBehaviour_CONSTANT - The nearest key value is used without interpolationAnimBehaviour_LINEAR - The value of the nearest two keys is linearly extrapolated for the current time value.AnimBehaviour_REPEAT - The animation is repeated. If the animation key go from n to m and the current time is t, use the value at (t-n) % (|m-n|).public static final int aiAnimBehaviour_REPEAT
AINodeAnim::mPreState and
AINodeAnim::mPostState.
AnimBehaviour_DEFAULT - The value from the default node transformation is takenAnimBehaviour_CONSTANT - The nearest key value is used without interpolationAnimBehaviour_LINEAR - The value of the nearest two keys is linearly extrapolated for the current time value.AnimBehaviour_REPEAT - The animation is repeated. If the animation key go from n to m and the current time is t, use the value at (t-n) % (|m-n|).public static final int AI_TRUE
public static final int AI_FALSE
public static final int aiImporterFlags_SupportTextFlavour
AIImporterDesc, indicating some features common to many importers.
ImporterFlags_SupportTextFlavour - Indicates that there is a textual encoding of the file format; and that it is supported.ImporterFlags_SupportBinaryFlavour - Indicates that there is a binary encoding of the file format; and that it is supported.ImporterFlags_SupportCompressedFlavour - Indicates that there is a compressed encoding of the file format; and that it is supported.ImporterFlags_LimitedSupport -
Indicates that the importer reads only a very particular subset of the file format. This happens commonly for declarative or procedural formats
which cannot easily be mapped to AIScene
ImporterFlags_Experimental -
Indicates that the importer is highly experimental and should be used with care. This only happens for trunk (i.e. SVN) versions, experimental code
is not included in releases.
public static final int aiImporterFlags_SupportBinaryFlavour
AIImporterDesc, indicating some features common to many importers.
ImporterFlags_SupportTextFlavour - Indicates that there is a textual encoding of the file format; and that it is supported.ImporterFlags_SupportBinaryFlavour - Indicates that there is a binary encoding of the file format; and that it is supported.ImporterFlags_SupportCompressedFlavour - Indicates that there is a compressed encoding of the file format; and that it is supported.ImporterFlags_LimitedSupport -
Indicates that the importer reads only a very particular subset of the file format. This happens commonly for declarative or procedural formats
which cannot easily be mapped to AIScene
ImporterFlags_Experimental -
Indicates that the importer is highly experimental and should be used with care. This only happens for trunk (i.e. SVN) versions, experimental code
is not included in releases.
public static final int aiImporterFlags_SupportCompressedFlavour
AIImporterDesc, indicating some features common to many importers.
ImporterFlags_SupportTextFlavour - Indicates that there is a textual encoding of the file format; and that it is supported.ImporterFlags_SupportBinaryFlavour - Indicates that there is a binary encoding of the file format; and that it is supported.ImporterFlags_SupportCompressedFlavour - Indicates that there is a compressed encoding of the file format; and that it is supported.ImporterFlags_LimitedSupport -
Indicates that the importer reads only a very particular subset of the file format. This happens commonly for declarative or procedural formats
which cannot easily be mapped to AIScene
ImporterFlags_Experimental -
Indicates that the importer is highly experimental and should be used with care. This only happens for trunk (i.e. SVN) versions, experimental code
is not included in releases.
public static final int aiImporterFlags_LimitedSupport
AIImporterDesc, indicating some features common to many importers.
ImporterFlags_SupportTextFlavour - Indicates that there is a textual encoding of the file format; and that it is supported.ImporterFlags_SupportBinaryFlavour - Indicates that there is a binary encoding of the file format; and that it is supported.ImporterFlags_SupportCompressedFlavour - Indicates that there is a compressed encoding of the file format; and that it is supported.ImporterFlags_LimitedSupport -
Indicates that the importer reads only a very particular subset of the file format. This happens commonly for declarative or procedural formats
which cannot easily be mapped to AIScene
ImporterFlags_Experimental -
Indicates that the importer is highly experimental and should be used with care. This only happens for trunk (i.e. SVN) versions, experimental code
is not included in releases.
public static final int aiImporterFlags_Experimental
AIImporterDesc, indicating some features common to many importers.
ImporterFlags_SupportTextFlavour - Indicates that there is a textual encoding of the file format; and that it is supported.ImporterFlags_SupportBinaryFlavour - Indicates that there is a binary encoding of the file format; and that it is supported.ImporterFlags_SupportCompressedFlavour - Indicates that there is a compressed encoding of the file format; and that it is supported.ImporterFlags_LimitedSupport -
Indicates that the importer reads only a very particular subset of the file format. This happens commonly for declarative or procedural formats
which cannot easily be mapped to AIScene
ImporterFlags_Experimental -
Indicates that the importer is highly experimental and should be used with care. This only happens for trunk (i.e. SVN) versions, experimental code
is not included in releases.
public static final int aiLightSource_UNDEFINED
enum aiLightSourceType)
LightSource_UNDEFINED - Undefined or unknown light sourceLightSource_DIRECTIONAL - A directional light source has a well-defined direction but is infinitely far away. That's quite a good approximation for sun light.LightSource_POINT - A point light source has a well-defined position in space but no direction - it emits light in all directions. A normal bulb is a point light.LightSource_SPOT -
A spot light source emits light in a specific angle. It has a position and a direction it is pointing to. A good example for a spot light is a
light spot in sport arenas.
LightSource_AMBIENT -
The generic light level of the world, including the bounces of all other light sources. Typically, there's at most one ambient light in a scene.
This light type doesn't have a valid position, direction, or other properties, just a color.
LightSource_AREA -
An area light is a rectangle with predefined size that uniformly emits light from one of its sides. The position is center of the rectangle and
direction is its normal vector.
public static final int aiLightSource_DIRECTIONAL
enum aiLightSourceType)
LightSource_UNDEFINED - Undefined or unknown light sourceLightSource_DIRECTIONAL - A directional light source has a well-defined direction but is infinitely far away. That's quite a good approximation for sun light.LightSource_POINT - A point light source has a well-defined position in space but no direction - it emits light in all directions. A normal bulb is a point light.LightSource_SPOT -
A spot light source emits light in a specific angle. It has a position and a direction it is pointing to. A good example for a spot light is a
light spot in sport arenas.
LightSource_AMBIENT -
The generic light level of the world, including the bounces of all other light sources. Typically, there's at most one ambient light in a scene.
This light type doesn't have a valid position, direction, or other properties, just a color.
LightSource_AREA -
An area light is a rectangle with predefined size that uniformly emits light from one of its sides. The position is center of the rectangle and
direction is its normal vector.
public static final int aiLightSource_POINT
enum aiLightSourceType)
LightSource_UNDEFINED - Undefined or unknown light sourceLightSource_DIRECTIONAL - A directional light source has a well-defined direction but is infinitely far away. That's quite a good approximation for sun light.LightSource_POINT - A point light source has a well-defined position in space but no direction - it emits light in all directions. A normal bulb is a point light.LightSource_SPOT -
A spot light source emits light in a specific angle. It has a position and a direction it is pointing to. A good example for a spot light is a
light spot in sport arenas.
LightSource_AMBIENT -
The generic light level of the world, including the bounces of all other light sources. Typically, there's at most one ambient light in a scene.
This light type doesn't have a valid position, direction, or other properties, just a color.
LightSource_AREA -
An area light is a rectangle with predefined size that uniformly emits light from one of its sides. The position is center of the rectangle and
direction is its normal vector.
public static final int aiLightSource_SPOT
enum aiLightSourceType)
LightSource_UNDEFINED - Undefined or unknown light sourceLightSource_DIRECTIONAL - A directional light source has a well-defined direction but is infinitely far away. That's quite a good approximation for sun light.LightSource_POINT - A point light source has a well-defined position in space but no direction - it emits light in all directions. A normal bulb is a point light.LightSource_SPOT -
A spot light source emits light in a specific angle. It has a position and a direction it is pointing to. A good example for a spot light is a
light spot in sport arenas.
LightSource_AMBIENT -
The generic light level of the world, including the bounces of all other light sources. Typically, there's at most one ambient light in a scene.
This light type doesn't have a valid position, direction, or other properties, just a color.
LightSource_AREA -
An area light is a rectangle with predefined size that uniformly emits light from one of its sides. The position is center of the rectangle and
direction is its normal vector.
public static final int aiLightSource_AMBIENT
enum aiLightSourceType)
LightSource_UNDEFINED - Undefined or unknown light sourceLightSource_DIRECTIONAL - A directional light source has a well-defined direction but is infinitely far away. That's quite a good approximation for sun light.LightSource_POINT - A point light source has a well-defined position in space but no direction - it emits light in all directions. A normal bulb is a point light.LightSource_SPOT -
A spot light source emits light in a specific angle. It has a position and a direction it is pointing to. A good example for a spot light is a
light spot in sport arenas.
LightSource_AMBIENT -
The generic light level of the world, including the bounces of all other light sources. Typically, there's at most one ambient light in a scene.
This light type doesn't have a valid position, direction, or other properties, just a color.
LightSource_AREA -
An area light is a rectangle with predefined size that uniformly emits light from one of its sides. The position is center of the rectangle and
direction is its normal vector.
public static final int aiLightSource_AREA
enum aiLightSourceType)
LightSource_UNDEFINED - Undefined or unknown light sourceLightSource_DIRECTIONAL - A directional light source has a well-defined direction but is infinitely far away. That's quite a good approximation for sun light.LightSource_POINT - A point light source has a well-defined position in space but no direction - it emits light in all directions. A normal bulb is a point light.LightSource_SPOT -
A spot light source emits light in a specific angle. It has a position and a direction it is pointing to. A good example for a spot light is a
light spot in sport arenas.
LightSource_AMBIENT -
The generic light level of the world, including the bounces of all other light sources. Typically, there's at most one ambient light in a scene.
This light type doesn't have a valid position, direction, or other properties, just a color.
LightSource_AREA -
An area light is a rectangle with predefined size that uniformly emits light from one of its sides. The position is center of the rectangle and
direction is its normal vector.
public static final java.lang.String AI_DEFAULT_MATERIAL_NAME
public static final int aiTextureOp_Multiply
TextureOp_Multiply - T = T1 * T2TextureOp_Add - T = T1 + T2TextureOp_Subtract - T = T1 - T2TextureOp_Divide - T = T1 / T2TextureOp_SmoothAdd - T = (T1 + T2) - (T1 * T2)TextureOp_SignedAdd - T = T1 + (T2 - 0.5)public static final int aiTextureOp_Add
TextureOp_Multiply - T = T1 * T2TextureOp_Add - T = T1 + T2TextureOp_Subtract - T = T1 - T2TextureOp_Divide - T = T1 / T2TextureOp_SmoothAdd - T = (T1 + T2) - (T1 * T2)TextureOp_SignedAdd - T = T1 + (T2 - 0.5)public static final int aiTextureOp_Subtract
TextureOp_Multiply - T = T1 * T2TextureOp_Add - T = T1 + T2TextureOp_Subtract - T = T1 - T2TextureOp_Divide - T = T1 / T2TextureOp_SmoothAdd - T = (T1 + T2) - (T1 * T2)TextureOp_SignedAdd - T = T1 + (T2 - 0.5)public static final int aiTextureOp_Divide
TextureOp_Multiply - T = T1 * T2TextureOp_Add - T = T1 + T2TextureOp_Subtract - T = T1 - T2TextureOp_Divide - T = T1 / T2TextureOp_SmoothAdd - T = (T1 + T2) - (T1 * T2)TextureOp_SignedAdd - T = T1 + (T2 - 0.5)public static final int aiTextureOp_SmoothAdd
TextureOp_Multiply - T = T1 * T2TextureOp_Add - T = T1 + T2TextureOp_Subtract - T = T1 - T2TextureOp_Divide - T = T1 / T2TextureOp_SmoothAdd - T = (T1 + T2) - (T1 * T2)TextureOp_SignedAdd - T = T1 + (T2 - 0.5)public static final int aiTextureOp_SignedAdd
TextureOp_Multiply - T = T1 * T2TextureOp_Add - T = T1 + T2TextureOp_Subtract - T = T1 - T2TextureOp_Divide - T = T1 / T2TextureOp_SmoothAdd - T = (T1 + T2) - (T1 * T2)TextureOp_SignedAdd - T = T1 + (T2 - 0.5)public static final int aiTextureMapMode_Wrap
TextureMapMode_Wrap - A texture coordinate u|v is translated to u%1|v%1TextureMapMode_Clamp - Texture coordinates outside [0...1] are clamped to the nearest valid value.TextureMapMode_Decal - If the texture coordinates for a pixel are outside [0...1] the texture is not applied to that pixelTextureMapMode_Mirror - A texture coordinate u|v becomes u%1|v%1 if (u-(u%1))%2 is zero and 1-(u%1)|1-(v%1) otherwisepublic static final int aiTextureMapMode_Clamp
TextureMapMode_Wrap - A texture coordinate u|v is translated to u%1|v%1TextureMapMode_Clamp - Texture coordinates outside [0...1] are clamped to the nearest valid value.TextureMapMode_Decal - If the texture coordinates for a pixel are outside [0...1] the texture is not applied to that pixelTextureMapMode_Mirror - A texture coordinate u|v becomes u%1|v%1 if (u-(u%1))%2 is zero and 1-(u%1)|1-(v%1) otherwisepublic static final int aiTextureMapMode_Decal
TextureMapMode_Wrap - A texture coordinate u|v is translated to u%1|v%1TextureMapMode_Clamp - Texture coordinates outside [0...1] are clamped to the nearest valid value.TextureMapMode_Decal - If the texture coordinates for a pixel are outside [0...1] the texture is not applied to that pixelTextureMapMode_Mirror - A texture coordinate u|v becomes u%1|v%1 if (u-(u%1))%2 is zero and 1-(u%1)|1-(v%1) otherwisepublic static final int aiTextureMapMode_Mirror
TextureMapMode_Wrap - A texture coordinate u|v is translated to u%1|v%1TextureMapMode_Clamp - Texture coordinates outside [0...1] are clamped to the nearest valid value.TextureMapMode_Decal - If the texture coordinates for a pixel are outside [0...1] the texture is not applied to that pixelTextureMapMode_Mirror - A texture coordinate u|v becomes u%1|v%1 if (u-(u%1))%2 is zero and 1-(u%1)|1-(v%1) otherwisepublic static final int aiTextureMapping_UV
Real-time applications typically require full UV coordinates, so the use of the Process_GenUVCoords step is highly recommended. It generates proper UV
channels for non-UV mapped objects, as long as an accurate description how the mapping should look like (e.g spherical) is given.
See the _AI_MATKEY_MAPPING_BASE property for more details.
TextureMapping_UV -
The mapping coordinates are taken from an UV channel. The _AI_MATKEY_UVWSRC_BASE key specifies from which UV channel the texture coordinates are
to be taken from (remember, meshes can have more than one UV channel).
TextureMapping_SPHERE - Spherical mappingTextureMapping_CYLINDER - Cylindrical mappingTextureMapping_BOX - Cubic mappingTextureMapping_PLANE - Planar mappingTextureMapping_OTHER - Undefined mapping. Have fun.public static final int aiTextureMapping_SPHERE
Real-time applications typically require full UV coordinates, so the use of the Process_GenUVCoords step is highly recommended. It generates proper UV
channels for non-UV mapped objects, as long as an accurate description how the mapping should look like (e.g spherical) is given.
See the _AI_MATKEY_MAPPING_BASE property for more details.
TextureMapping_UV -
The mapping coordinates are taken from an UV channel. The _AI_MATKEY_UVWSRC_BASE key specifies from which UV channel the texture coordinates are
to be taken from (remember, meshes can have more than one UV channel).
TextureMapping_SPHERE - Spherical mappingTextureMapping_CYLINDER - Cylindrical mappingTextureMapping_BOX - Cubic mappingTextureMapping_PLANE - Planar mappingTextureMapping_OTHER - Undefined mapping. Have fun.public static final int aiTextureMapping_CYLINDER
Real-time applications typically require full UV coordinates, so the use of the Process_GenUVCoords step is highly recommended. It generates proper UV
channels for non-UV mapped objects, as long as an accurate description how the mapping should look like (e.g spherical) is given.
See the _AI_MATKEY_MAPPING_BASE property for more details.
TextureMapping_UV -
The mapping coordinates are taken from an UV channel. The _AI_MATKEY_UVWSRC_BASE key specifies from which UV channel the texture coordinates are
to be taken from (remember, meshes can have more than one UV channel).
TextureMapping_SPHERE - Spherical mappingTextureMapping_CYLINDER - Cylindrical mappingTextureMapping_BOX - Cubic mappingTextureMapping_PLANE - Planar mappingTextureMapping_OTHER - Undefined mapping. Have fun.public static final int aiTextureMapping_BOX
Real-time applications typically require full UV coordinates, so the use of the Process_GenUVCoords step is highly recommended. It generates proper UV
channels for non-UV mapped objects, as long as an accurate description how the mapping should look like (e.g spherical) is given.
See the _AI_MATKEY_MAPPING_BASE property for more details.
TextureMapping_UV -
The mapping coordinates are taken from an UV channel. The _AI_MATKEY_UVWSRC_BASE key specifies from which UV channel the texture coordinates are
to be taken from (remember, meshes can have more than one UV channel).
TextureMapping_SPHERE - Spherical mappingTextureMapping_CYLINDER - Cylindrical mappingTextureMapping_BOX - Cubic mappingTextureMapping_PLANE - Planar mappingTextureMapping_OTHER - Undefined mapping. Have fun.public static final int aiTextureMapping_PLANE
Real-time applications typically require full UV coordinates, so the use of the Process_GenUVCoords step is highly recommended. It generates proper UV
channels for non-UV mapped objects, as long as an accurate description how the mapping should look like (e.g spherical) is given.
See the _AI_MATKEY_MAPPING_BASE property for more details.
TextureMapping_UV -
The mapping coordinates are taken from an UV channel. The _AI_MATKEY_UVWSRC_BASE key specifies from which UV channel the texture coordinates are
to be taken from (remember, meshes can have more than one UV channel).
TextureMapping_SPHERE - Spherical mappingTextureMapping_CYLINDER - Cylindrical mappingTextureMapping_BOX - Cubic mappingTextureMapping_PLANE - Planar mappingTextureMapping_OTHER - Undefined mapping. Have fun.public static final int aiTextureMapping_OTHER
Real-time applications typically require full UV coordinates, so the use of the Process_GenUVCoords step is highly recommended. It generates proper UV
channels for non-UV mapped objects, as long as an accurate description how the mapping should look like (e.g spherical) is given.
See the _AI_MATKEY_MAPPING_BASE property for more details.
TextureMapping_UV -
The mapping coordinates are taken from an UV channel. The _AI_MATKEY_UVWSRC_BASE key specifies from which UV channel the texture coordinates are
to be taken from (remember, meshes can have more than one UV channel).
TextureMapping_SPHERE - Spherical mappingTextureMapping_CYLINDER - Cylindrical mappingTextureMapping_BOX - Cubic mappingTextureMapping_PLANE - Planar mappingTextureMapping_OTHER - Undefined mapping. Have fun.public static final int aiTextureType_NONE
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_DIFFUSE
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_SPECULAR
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_AMBIENT
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_EMISSIVE
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_HEIGHT
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_NORMALS
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_SHININESS
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_OPACITY
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_DISPLACEMENT
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_LIGHTMAP
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_REFLECTION
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_BASE_COLOR
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_NORMAL_CAMERA
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_EMISSION_COLOR
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_METALNESS
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_DIFFUSE_ROUGHNESS
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_AMBIENT_OCCLUSION
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiTextureType_UNKNOWN
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
TextureType_NONE -
Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not*
related to textures.
TextureType_DIFFUSE - The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR - The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT - The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE - The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT - The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS -
The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not
distinguish here.
TextureType_SHININESS -
The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there
is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.
TextureType_OPACITY - The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT - Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP -
Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The
texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.
TextureType_REFLECTION - Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_BASE_COLOR - PBR material.TextureType_NORMAL_CAMERA - PBR material.TextureType_EMISSION_COLOR - PBR material.TextureType_METALNESS - PBR material.TextureType_DIFFUSE_ROUGHNESS - PBR material.TextureType_AMBIENT_OCCLUSION - PBR material.TextureType_UNKNOWN -
Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is
excluded from any further post-processing.
public static final int aiShadingMode_Flat
The list of shading modes has been taken from Blender. See Blender documentation for more information. The API does not distinguish between "specular" and "diffuse" shaders (thus the specular term for diffuse shading models like Oren-Nayar remains undefined).
Again, this value is just a hint. Assimp tries to select the shader whose most common implementation matches the original rendering results of the 3D modeller which wrote a particular model as closely as possible.
ShadingMode_Flat - Flat shading. Shading is done on per-face base, diffuse only. Also known as 'faceted shading'.ShadingMode_Gouraud - Simple Gouraud shading.ShadingMode_Phong - Phong-ShadingShadingMode_Blinn - Phong-Blinn-ShadingShadingMode_Toon - Toon-Shading per pixel. Also known as 'comic' shader.ShadingMode_OrenNayar - OrenNayar-Shading per pixel. Extension to standard Lambertian shading, taking the roughness of the material into accountShadingMode_Minnaert - Minnaert-Shading per pixel. Extension to standard Lambertian shading, taking the 'darkness' of the material into accountShadingMode_CookTorrance - CookTorrance-Shading per pixel. Special shader for metallic surfaces.ShadingMode_NoShading - No shading at all. Constant light influence of 1.0.ShadingMode_Fresnel - Fresnel shadingpublic static final int aiShadingMode_Gouraud
The list of shading modes has been taken from Blender. See Blender documentation for more information. The API does not distinguish between "specular" and "diffuse" shaders (thus the specular term for diffuse shading models like Oren-Nayar remains undefined).
Again, this value is just a hint. Assimp tries to select the shader whose most common implementation matches the original rendering results of the 3D modeller which wrote a particular model as closely as possible.
ShadingMode_Flat - Flat shading. Shading is done on per-face base, diffuse only. Also known as 'faceted shading'.ShadingMode_Gouraud - Simple Gouraud shading.ShadingMode_Phong - Phong-ShadingShadingMode_Blinn - Phong-Blinn-ShadingShadingMode_Toon - Toon-Shading per pixel. Also known as 'comic' shader.ShadingMode_OrenNayar - OrenNayar-Shading per pixel. Extension to standard Lambertian shading, taking the roughness of the material into accountShadingMode_Minnaert - Minnaert-Shading per pixel. Extension to standard Lambertian shading, taking the 'darkness' of the material into accountShadingMode_CookTorrance - CookTorrance-Shading per pixel. Special shader for metallic surfaces.ShadingMode_NoShading - No shading at all. Constant light influence of 1.0.ShadingMode_Fresnel - Fresnel shadingpublic static final int aiShadingMode_Phong
The list of shading modes has been taken from Blender. See Blender documentation for more information. The API does not distinguish between "specular" and "diffuse" shaders (thus the specular term for diffuse shading models like Oren-Nayar remains undefined).
Again, this value is just a hint. Assimp tries to select the shader whose most common implementation matches the original rendering results of the 3D modeller which wrote a particular model as closely as possible.
ShadingMode_Flat - Flat shading. Shading is done on per-face base, diffuse only. Also known as 'faceted shading'.ShadingMode_Gouraud - Simple Gouraud shading.ShadingMode_Phong - Phong-ShadingShadingMode_Blinn - Phong-Blinn-ShadingShadingMode_Toon - Toon-Shading per pixel. Also known as 'comic' shader.ShadingMode_OrenNayar - OrenNayar-Shading per pixel. Extension to standard Lambertian shading, taking the roughness of the material into accountShadingMode_Minnaert - Minnaert-Shading per pixel. Extension to standard Lambertian shading, taking the 'darkness' of the material into accountShadingMode_CookTorrance - CookTorrance-Shading per pixel. Special shader for metallic surfaces.ShadingMode_NoShading - No shading at all. Constant light influence of 1.0.ShadingMode_Fresnel - Fresnel shadingpublic static final int aiShadingMode_Blinn
The list of shading modes has been taken from Blender. See Blender documentation for more information. The API does not distinguish between "specular" and "diffuse" shaders (thus the specular term for diffuse shading models like Oren-Nayar remains undefined).
Again, this value is just a hint. Assimp tries to select the shader whose most common implementation matches the original rendering results of the 3D modeller which wrote a particular model as closely as possible.
ShadingMode_Flat - Flat shading. Shading is done on per-face base, diffuse only. Also known as 'faceted shading'.ShadingMode_Gouraud - Simple Gouraud shading.ShadingMode_Phong - Phong-ShadingShadingMode_Blinn - Phong-Blinn-ShadingShadingMode_Toon - Toon-Shading per pixel. Also known as 'comic' shader.ShadingMode_OrenNayar - OrenNayar-Shading per pixel. Extension to standard Lambertian shading, taking the roughness of the material into accountShadingMode_Minnaert - Minnaert-Shading per pixel. Extension to standard Lambertian shading, taking the 'darkness' of the material into accountShadingMode_CookTorrance - CookTorrance-Shading per pixel. Special shader for metallic surfaces.ShadingMode_NoShading - No shading at all. Constant light influence of 1.0.ShadingMode_Fresnel - Fresnel shadingpublic static final int aiShadingMode_Toon
The list of shading modes has been taken from Blender. See Blender documentation for more information. The API does not distinguish between "specular" and "diffuse" shaders (thus the specular term for diffuse shading models like Oren-Nayar remains undefined).
Again, this value is just a hint. Assimp tries to select the shader whose most common implementation matches the original rendering results of the 3D modeller which wrote a particular model as closely as possible.
ShadingMode_Flat - Flat shading. Shading is done on per-face base, diffuse only. Also known as 'faceted shading'.ShadingMode_Gouraud - Simple Gouraud shading.ShadingMode_Phong - Phong-ShadingShadingMode_Blinn - Phong-Blinn-ShadingShadingMode_Toon - Toon-Shading per pixel. Also known as 'comic' shader.ShadingMode_OrenNayar - OrenNayar-Shading per pixel. Extension to standard Lambertian shading, taking the roughness of the material into accountShadingMode_Minnaert - Minnaert-Shading per pixel. Extension to standard Lambertian shading, taking the 'darkness' of the material into accountShadingMode_CookTorrance - CookTorrance-Shading per pixel. Special shader for metallic surfaces.ShadingMode_NoShading - No shading at all. Constant light influence of 1.0.ShadingMode_Fresnel - Fresnel shadingpublic static final int aiShadingMode_OrenNayar
The list of shading modes has been taken from Blender. See Blender documentation for more information. The API does not distinguish between "specular" and "diffuse" shaders (thus the specular term for diffuse shading models like Oren-Nayar remains undefined).
Again, this value is just a hint. Assimp tries to select the shader whose most common implementation matches the original rendering results of the 3D modeller which wrote a particular model as closely as possible.
ShadingMode_Flat - Flat shading. Shading is done on per-face base, diffuse only. Also known as 'faceted shading'.ShadingMode_Gouraud - Simple Gouraud shading.ShadingMode_Phong - Phong-ShadingShadingMode_Blinn - Phong-Blinn-ShadingShadingMode_Toon - Toon-Shading per pixel. Also known as 'comic' shader.ShadingMode_OrenNayar - OrenNayar-Shading per pixel. Extension to standard Lambertian shading, taking the roughness of the material into accountShadingMode_Minnaert - Minnaert-Shading per pixel. Extension to standard Lambertian shading, taking the 'darkness' of the material into accountShadingMode_CookTorrance - CookTorrance-Shading per pixel. Special shader for metallic surfaces.ShadingMode_NoShading - No shading at all. Constant light influence of 1.0.ShadingMode_Fresnel - Fresnel shadingpublic static final int aiShadingMode_Minnaert
The list of shading modes has been taken from Blender. See Blender documentation for more information. The API does not distinguish between "specular" and "diffuse" shaders (thus the specular term for diffuse shading models like Oren-Nayar remains undefined).
Again, this value is just a hint. Assimp tries to select the shader whose most common implementation matches the original rendering results of the 3D modeller which wrote a particular model as closely as possible.
ShadingMode_Flat - Flat shading. Shading is done on per-face base, diffuse only. Also known as 'faceted shading'.ShadingMode_Gouraud - Simple Gouraud shading.ShadingMode_Phong - Phong-ShadingShadingMode_Blinn - Phong-Blinn-ShadingShadingMode_Toon - Toon-Shading per pixel. Also known as 'comic' shader.ShadingMode_OrenNayar - OrenNayar-Shading per pixel. Extension to standard Lambertian shading, taking the roughness of the material into accountShadingMode_Minnaert - Minnaert-Shading per pixel. Extension to standard Lambertian shading, taking the 'darkness' of the material into accountShadingMode_CookTorrance - CookTorrance-Shading per pixel. Special shader for metallic surfaces.ShadingMode_NoShading - No shading at all. Constant light influence of 1.0.ShadingMode_Fresnel - Fresnel shadingpublic static final int aiShadingMode_CookTorrance
The list of shading modes has been taken from Blender. See Blender documentation for more information. The API does not distinguish between "specular" and "diffuse" shaders (thus the specular term for diffuse shading models like Oren-Nayar remains undefined).
Again, this value is just a hint. Assimp tries to select the shader whose most common implementation matches the original rendering results of the 3D modeller which wrote a particular model as closely as possible.
ShadingMode_Flat - Flat shading. Shading is done on per-face base, diffuse only. Also known as 'faceted shading'.ShadingMode_Gouraud - Simple Gouraud shading.ShadingMode_Phong - Phong-ShadingShadingMode_Blinn - Phong-Blinn-ShadingShadingMode_Toon - Toon-Shading per pixel. Also known as 'comic' shader.ShadingMode_OrenNayar - OrenNayar-Shading per pixel. Extension to standard Lambertian shading, taking the roughness of the material into accountShadingMode_Minnaert - Minnaert-Shading per pixel. Extension to standard Lambertian shading, taking the 'darkness' of the material into accountShadingMode_CookTorrance - CookTorrance-Shading per pixel. Special shader for metallic surfaces.ShadingMode_NoShading - No shading at all. Constant light influence of 1.0.ShadingMode_Fresnel - Fresnel shadingpublic static final int aiShadingMode_NoShading
The list of shading modes has been taken from Blender. See Blender documentation for more information. The API does not distinguish between "specular" and "diffuse" shaders (thus the specular term for diffuse shading models like Oren-Nayar remains undefined).
Again, this value is just a hint. Assimp tries to select the shader whose most common implementation matches the original rendering results of the 3D modeller which wrote a particular model as closely as possible.
ShadingMode_Flat - Flat shading. Shading is done on per-face base, diffuse only. Also known as 'faceted shading'.ShadingMode_Gouraud - Simple Gouraud shading.ShadingMode_Phong - Phong-ShadingShadingMode_Blinn - Phong-Blinn-ShadingShadingMode_Toon - Toon-Shading per pixel. Also known as 'comic' shader.ShadingMode_OrenNayar - OrenNayar-Shading per pixel. Extension to standard Lambertian shading, taking the roughness of the material into accountShadingMode_Minnaert - Minnaert-Shading per pixel. Extension to standard Lambertian shading, taking the 'darkness' of the material into accountShadingMode_CookTorrance - CookTorrance-Shading per pixel. Special shader for metallic surfaces.ShadingMode_NoShading - No shading at all. Constant light influence of 1.0.ShadingMode_Fresnel - Fresnel shadingpublic static final int aiShadingMode_Fresnel
The list of shading modes has been taken from Blender. See Blender documentation for more information. The API does not distinguish between "specular" and "diffuse" shaders (thus the specular term for diffuse shading models like Oren-Nayar remains undefined).
Again, this value is just a hint. Assimp tries to select the shader whose most common implementation matches the original rendering results of the 3D modeller which wrote a particular model as closely as possible.
ShadingMode_Flat - Flat shading. Shading is done on per-face base, diffuse only. Also known as 'faceted shading'.ShadingMode_Gouraud - Simple Gouraud shading.ShadingMode_Phong - Phong-ShadingShadingMode_Blinn - Phong-Blinn-ShadingShadingMode_Toon - Toon-Shading per pixel. Also known as 'comic' shader.ShadingMode_OrenNayar - OrenNayar-Shading per pixel. Extension to standard Lambertian shading, taking the roughness of the material into accountShadingMode_Minnaert - Minnaert-Shading per pixel. Extension to standard Lambertian shading, taking the 'darkness' of the material into accountShadingMode_CookTorrance - CookTorrance-Shading per pixel. Special shader for metallic surfaces.ShadingMode_NoShading - No shading at all. Constant light influence of 1.0.ShadingMode_Fresnel - Fresnel shadingpublic static final int aiTextureFlags_Invert
Usually you'll instruct your cg artists how textures have to look like and how they will be processed in your application. However, if you use Assimp for completely generic loading purposes you might also need to process these flags in order to display as many 'unknown' 3D models as possible correctly.
This corresponds to the _AI_MATKEY_TEXFLAGS_BASE property.
TextureFlags_Invert - The texture's color values have to be inverted (component-wise 1-n)TextureFlags_UseAlpha -
Explicit request to the application to process the alpha channel of the texture. Mutually exclusive with TextureFlags_IgnoreAlpha. These flags are
set if the library can say for sure that the alpha channel is used/is not used. If the model format does not define this, it is left to the
application to decide whether the texture alpha channel - if any - is evaluated or not.
TextureFlags_IgnoreAlpha - Explicit request to the application to ignore the alpha channel of the texture. Mutually exclusive with TextureFlags_UseAlpha.public static final int aiTextureFlags_UseAlpha
Usually you'll instruct your cg artists how textures have to look like and how they will be processed in your application. However, if you use Assimp for completely generic loading purposes you might also need to process these flags in order to display as many 'unknown' 3D models as possible correctly.
This corresponds to the _AI_MATKEY_TEXFLAGS_BASE property.
TextureFlags_Invert - The texture's color values have to be inverted (component-wise 1-n)TextureFlags_UseAlpha -
Explicit request to the application to process the alpha channel of the texture. Mutually exclusive with TextureFlags_IgnoreAlpha. These flags are
set if the library can say for sure that the alpha channel is used/is not used. If the model format does not define this, it is left to the
application to decide whether the texture alpha channel - if any - is evaluated or not.
TextureFlags_IgnoreAlpha - Explicit request to the application to ignore the alpha channel of the texture. Mutually exclusive with TextureFlags_UseAlpha.public static final int aiTextureFlags_IgnoreAlpha
Usually you'll instruct your cg artists how textures have to look like and how they will be processed in your application. However, if you use Assimp for completely generic loading purposes you might also need to process these flags in order to display as many 'unknown' 3D models as possible correctly.
This corresponds to the _AI_MATKEY_TEXFLAGS_BASE property.
TextureFlags_Invert - The texture's color values have to be inverted (component-wise 1-n)TextureFlags_UseAlpha -
Explicit request to the application to process the alpha channel of the texture. Mutually exclusive with TextureFlags_IgnoreAlpha. These flags are
set if the library can say for sure that the alpha channel is used/is not used. If the model format does not define this, it is left to the
application to decide whether the texture alpha channel - if any - is evaluated or not.
TextureFlags_IgnoreAlpha - Explicit request to the application to ignore the alpha channel of the texture. Mutually exclusive with TextureFlags_UseAlpha.public static final int aiBlendMode_Default
If you're familiar with OpenGL or D3D, these flags aren't new to you. They define *how* the final color value of a pixel is computed, basing on the previous color at that pixel and the new color value from the material.
BlendMode_Default - SourceColor*SourceAlpha + DestColor*(1-SourceAlpha)BlendMode_Additive - SourceColor*1 + DestColor*1public static final int aiBlendMode_Additive
If you're familiar with OpenGL or D3D, these flags aren't new to you. They define *how* the final color value of a pixel is computed, basing on the previous color at that pixel and the new color value from the material.
BlendMode_Default - SourceColor*SourceAlpha + DestColor*(1-SourceAlpha)BlendMode_Additive - SourceColor*1 + DestColor*1public static final int aiPTI_Float
PTI_Float - Array of single-precision (32 Bit) floatsPTI_Double - Array of double-precision (64 Bit) floatsPTI_String - The material property is an aiString.PTI_Integer - Array of (32 Bit) integersPTI_Buffer - Simple binary buffer, content undefined. Not convertible to anything.public static final int aiPTI_Double
PTI_Float - Array of single-precision (32 Bit) floatsPTI_Double - Array of double-precision (64 Bit) floatsPTI_String - The material property is an aiString.PTI_Integer - Array of (32 Bit) integersPTI_Buffer - Simple binary buffer, content undefined. Not convertible to anything.public static final int aiPTI_String
PTI_Float - Array of single-precision (32 Bit) floatsPTI_Double - Array of double-precision (64 Bit) floatsPTI_String - The material property is an aiString.PTI_Integer - Array of (32 Bit) integersPTI_Buffer - Simple binary buffer, content undefined. Not convertible to anything.public static final int aiPTI_Integer
PTI_Float - Array of single-precision (32 Bit) floatsPTI_Double - Array of double-precision (64 Bit) floatsPTI_String - The material property is an aiString.PTI_Integer - Array of (32 Bit) integersPTI_Buffer - Simple binary buffer, content undefined. Not convertible to anything.public static final int aiPTI_Buffer
PTI_Float - Array of single-precision (32 Bit) floatsPTI_Double - Array of double-precision (64 Bit) floatsPTI_String - The material property is an aiString.PTI_Integer - Array of (32 Bit) integersPTI_Buffer - Simple binary buffer, content undefined. Not convertible to anything.public static final java.lang.String AI_MATKEY_NAME
public static final java.lang.String AI_MATKEY_TWOSIDED
public static final java.lang.String AI_MATKEY_SHADING_MODEL
public static final java.lang.String AI_MATKEY_ENABLE_WIREFRAME
public static final java.lang.String AI_MATKEY_BLEND_FUNC
public static final java.lang.String AI_MATKEY_OPACITY
public static final java.lang.String AI_MATKEY_TRANSPARENCYFACTOR
public static final java.lang.String AI_MATKEY_BUMPSCALING
public static final java.lang.String AI_MATKEY_SHININESS
public static final java.lang.String AI_MATKEY_REFLECTIVITY
public static final java.lang.String AI_MATKEY_SHININESS_STRENGTH
public static final java.lang.String AI_MATKEY_REFRACTI
public static final java.lang.String AI_MATKEY_COLOR_DIFFUSE
public static final java.lang.String AI_MATKEY_COLOR_AMBIENT
public static final java.lang.String AI_MATKEY_COLOR_SPECULAR
public static final java.lang.String AI_MATKEY_COLOR_EMISSIVE
public static final java.lang.String AI_MATKEY_COLOR_TRANSPARENT
public static final java.lang.String AI_MATKEY_COLOR_REFLECTIVE
public static final java.lang.String AI_MATKEY_GLOBAL_BACKGROUND_IMAGE
public static final java.lang.String AI_MATKEY_GLOBAL_SHADERLANG
public static final java.lang.String AI_MATKEY_SHADER_VERTEX
public static final java.lang.String AI_MATKEY_SHADER_FRAGMENT
public static final java.lang.String AI_MATKEY_SHADER_GEO
public static final java.lang.String AI_MATKEY_SHADER_TESSELATION
public static final java.lang.String AI_MATKEY_SHADER_PRIMITIVE
public static final java.lang.String AI_MATKEY_SHADER_COMPUTE
public static final java.lang.String _AI_MATKEY_TEXTURE_BASE
public static final java.lang.String _AI_MATKEY_UVWSRC_BASE
public static final java.lang.String _AI_MATKEY_TEXOP_BASE
public static final java.lang.String _AI_MATKEY_MAPPING_BASE
public static final java.lang.String _AI_MATKEY_TEXBLEND_BASE
public static final java.lang.String _AI_MATKEY_MAPPINGMODE_U_BASE
public static final java.lang.String _AI_MATKEY_MAPPINGMODE_V_BASE
public static final java.lang.String _AI_MATKEY_TEXMAP_AXIS_BASE
public static final java.lang.String _AI_MATKEY_UVTRANSFORM_BASE
public static final java.lang.String _AI_MATKEY_TEXFLAGS_BASE
public static final java.lang.String aiAI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR
public static final java.lang.String aiAI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR
public static final java.lang.String aiAI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR
public static final java.lang.String aiAI_MATKEY_GLTF_ALPHAMODE
public static final java.lang.String aiAI_MATKEY_GLTF_ALPHACUTOFF
public static final java.lang.String aiAI_MATKEY_GLTF_PBRSPECULARGLOSSINESS
public static final java.lang.String aiAI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR
public static final java.lang.String aiAI_MATKEY_GLTF_UNLIT
public static final java.lang.String ai_AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE
public static final java.lang.String ai_AI_MATKEY_GLTF_MAPPINGNAME_BASE
public static final java.lang.String ai_AI_MATKEY_GLTF_MAPPINGID_BASE
public static final java.lang.String ai_AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE
public static final java.lang.String ai_AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE
public static final java.lang.String ai_AI_MATKEY_GLTF_SCALE_BASE
public static final java.lang.String ai_AI_MATKEY_GLTF_STRENGTH_BASE
public static final int AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE
public static final int AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLICROUGHNESS_TEXTURE
public static final int AI_MAX_FACE_INDICES
public static final int AI_MAX_BONE_WEIGHTS
public static final int AI_MAX_VERTICES
public static final int AI_MAX_FACES
public static final int AI_MAX_NUMBER_OF_COLOR_SETS
public static final int AI_MAX_NUMBER_OF_TEXTURECOORDS
public static final int aiPrimitiveType_POINT
PrimitiveType_POINT - A point primitive. This is just a single vertex in the virtual world, AIFace contains just one index for such a primitive.PrimitiveType_LINE - A line primitive. This is a line defined through a start and an end position. AIFace contains exactly two indices for such a primitive.PrimitiveType_TRIANGLE - A triangular primitive. A triangle consists of three indices.PrimitiveType_POLYGON -
A higher-level polygon with more than 3 edges. A triangle is a polygon, but polygon in this context means "all polygons that are not triangles".
The "Triangulate"-Step is provided for your convenience, it splits all polygons in triangles (which are much easier to handle).
public static final int aiPrimitiveType_LINE
PrimitiveType_POINT - A point primitive. This is just a single vertex in the virtual world, AIFace contains just one index for such a primitive.PrimitiveType_LINE - A line primitive. This is a line defined through a start and an end position. AIFace contains exactly two indices for such a primitive.PrimitiveType_TRIANGLE - A triangular primitive. A triangle consists of three indices.PrimitiveType_POLYGON -
A higher-level polygon with more than 3 edges. A triangle is a polygon, but polygon in this context means "all polygons that are not triangles".
The "Triangulate"-Step is provided for your convenience, it splits all polygons in triangles (which are much easier to handle).
public static final int aiPrimitiveType_TRIANGLE
PrimitiveType_POINT - A point primitive. This is just a single vertex in the virtual world, AIFace contains just one index for such a primitive.PrimitiveType_LINE - A line primitive. This is a line defined through a start and an end position. AIFace contains exactly two indices for such a primitive.PrimitiveType_TRIANGLE - A triangular primitive. A triangle consists of three indices.PrimitiveType_POLYGON -
A higher-level polygon with more than 3 edges. A triangle is a polygon, but polygon in this context means "all polygons that are not triangles".
The "Triangulate"-Step is provided for your convenience, it splits all polygons in triangles (which are much easier to handle).
public static final int aiPrimitiveType_POLYGON
PrimitiveType_POINT - A point primitive. This is just a single vertex in the virtual world, AIFace contains just one index for such a primitive.PrimitiveType_LINE - A line primitive. This is a line defined through a start and an end position. AIFace contains exactly two indices for such a primitive.PrimitiveType_TRIANGLE - A triangular primitive. A triangle consists of three indices.PrimitiveType_POLYGON -
A higher-level polygon with more than 3 edges. A triangle is a polygon, but polygon in this context means "all polygons that are not triangles".
The "Triangulate"-Step is provided for your convenience, it splits all polygons in triangles (which are much easier to handle).
public static final int aiMorphingMethod_VERTEX_BLEND
enum aiMorphingMethod)
MorphingMethod_VERTEX_BLEND - Interpolation between morph targets.MorphingMethod_MORPH_NORMALIZED - Normalized morphing between morph targets.MorphingMethod_MORPH_RELATIVE - Relative morphing between morph targets.public static final int aiMorphingMethod_MORPH_NORMALIZED
enum aiMorphingMethod)
MorphingMethod_VERTEX_BLEND - Interpolation between morph targets.MorphingMethod_MORPH_NORMALIZED - Normalized morphing between morph targets.MorphingMethod_MORPH_RELATIVE - Relative morphing between morph targets.public static final int aiMorphingMethod_MORPH_RELATIVE
enum aiMorphingMethod)
MorphingMethod_VERTEX_BLEND - Interpolation between morph targets.MorphingMethod_MORPH_NORMALIZED - Normalized morphing between morph targets.MorphingMethod_MORPH_RELATIVE - Relative morphing between morph targets.public static final int AI_BOOL
public static final int AI_INT32
public static final int AI_UINT64
public static final int AI_FLOAT
public static final int AI_DOUBLE
public static final int AI_AISTRING
public static final int AI_AIVECTOR3D
public static final int AI_META_MAX
public static final java.lang.String AI_METADATA_SOURCE_FORMAT
This is always present if the scene was created from an imported asset.
public static final java.lang.String AI_METADATA_SOURCE_FORMAT_VERSION
Not all formats add this metadata.
public static final java.lang.String AI_METADATA_SOURCE_GENERATOR
Not all formats add this metadata.
public static final int aiProcess_CalcTangentSpace
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_JoinIdenticalVertices
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_MakeLeftHanded
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_Triangulate
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_RemoveComponent
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_GenNormals
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_GenSmoothNormals
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_SplitLargeMeshes
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_PreTransformVertices
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_LimitBoneWeights
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_ValidateDataStructure
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_ImproveCacheLocality
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_RemoveRedundantMaterials
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_FixInfacingNormals
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_PopulateArmatureData
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_SortByPType
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_FindDegenerates
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_FindInvalidData
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_GenUVCoords
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_TransformUVCoords
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_FindInstances
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_OptimizeMeshes
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_OptimizeGraph
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_FlipUVs
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_FlipWindingOrder
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_SplitByBoneCount
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_Debone
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_GlobalScale
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_EmbedTextures
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_ForceGenNormals
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_DropNormals
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_GenBoundingBoxes
Process_CalcTangentSpace -
Calculates the tangents and bitangents for the imported meshes.
Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations
such as normal mapping applied to the meshes. There's an importer property, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to
specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.
Process_JoinIdenticalVertices -
Identifies and joins identical vertex data sets within all imported meshes.
After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded -
Converts all the imported data to a left-handed coordinate space.
By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_Triangulate -
Triangulates all faces of all meshes.
By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
Process_Triangulate and Process_SortByPTypeProcess_RemoveComponent -
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).
The components to be removed are specified in a separate importer property, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need
all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline
as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force
Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By
using this step you can make sure they are NOT there.
This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD
app, and it has per-face vertex colors. Vertex positions can't be shared, thus the Process_JoinIdenticalVertices step fails to optimize the data
because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components
are excluded as early as possible thus opening more room for internal optimizations.
Process_GenNormals -
Generates normals for all faces of all meshes.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're
usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the
library to duplicate vertices in some cases. Process_JoinIdenticalVertices is *senseless* then.
This flag may not be specified together with Process_GenSmoothNormals.
Process_GenSmoothNormals -
Generates smooth normals for all vertices in the mesh.
This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with Process_GenNormals. There's a importer property, AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which
allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard'
seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.
Process_SplitLargeMeshes -
Splits large meshes into smaller sub-meshes.
This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the AI_CONFIG_PP_SLM_VERTEX_LIMIT and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT importer
properties. The default values are AI_SLM_DEFAULT_MAX_VERTICES and AI_SLM_DEFAULT_MAX_TRIANGLES.
Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices -
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.
The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
The AI_CONFIG_PP_PTV_NORMALIZE configuration property can be set to normalize the scene's spatial dimension to the -1...1
range.
Process_LimitBoneWeights -
Limits the number of bones simultaneously affecting a single vertex to a maximum value.
If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights
are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as AI_LBW_MAX_WEIGHTS in config.h), but
you can use the AI_CONFIG_PP_LBW_MAX_WEIGHTS importer property to supply your own limit to the post processing step.
If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure -
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all
material references are correct .. etc.
It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
GetErrorString carries the error message around.AI_SCENE_FLAGS_VALIDATION_WARNING is set in
AIScene::mFlags.This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
Process_ImproveCacheLocality -
Reorders triangles for better vertex cache locality.
The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE importer property
can be used to fine-tune the cache optimization.
Process_RemoveRedundantMaterials -
Searches for redundant/unreferenced materials and removes them.
This is especially useful in combination with the Process_PreTransformVertices and Process_OptimizeMeshes flags. Both join small meshes with
equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during
Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined
several times with exactly the same settings.
Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if
you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively
take a look at the AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property.
Process_FixInfacingNormals -
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.
The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_PopulateArmatureData -
This step generically populates aiBone->mArmature and aiBone->mNode.
The point of these is it saves you later having to calculate these elements. This is useful when handling rest information or skin information. If you have multiple armatures on your models we strongly recommend enabling this. Instead of writing your own multi-root, multi-armature lookups we have done the hard work for you.
Process_SortByPType -
This step splits meshes with more than one primitive type in homogeneous sub-meshes.
The step is executed after the triangulation step. After the step returns, just one bit is set in AIMesh::mPrimitiveTypes. This is
especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the
AI_CONFIG_PP_SBP_REMOVE importer property to specify which primitive types you need. This can be used to easily exclude lines and points,
which are rarely used, from the import.
Process_FindDegenerates -
This step searches all meshes for degenerate primitives and converts them to proper lines or points.
A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
Process_FindDegenerates flag.AI_CONFIG_PP_FD_REMOVE importer property to 1. This will cause the step to remove degenerate triangles from the import as
soon as they're detected. They won't pass any further pipeline steps.Process_FindDegenerates flag.Process_SortByPType flag. This moves line and point primitives to separate meshes.AI_CONFIG_PP_SBP_REMOVE importer property to PrimitiveType_POINT | PrimitiveType_LINE to cause
Process_SortByPType to reject point and line meshes from the scene.This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in
your model, set the property AI_CONFIG_PP_FD_CHECKAREA to false.
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
Process_FindInvalidData -
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get
rid of some common exporter errors.
This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by
the Process_GenSmoothNormals flag.
The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key.
The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides the accuracy of the check for duplicate animation tracks.
Process_GenUVCoords -
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.
Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
If this step is not requested, you'll need to process the _AI_MATKEY_MAPPING_BASE material property in order to display all assets
properly.
Process_TransformUVCoords -
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.
UV transformations are specified per-texture - see the _AI_MATKEY_UVTRANSFORM_BASE material key for more information. This step processes
all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most
applications won't support UV transformations, so you will probably want to specify this step.
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances -
This step searches for duplicate meshes and replaces them with references to the first mesh.
This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes -
A post-processing step to reduce the number of meshes.
This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with Process_OptimizeGraph, if possible. The flag is fully compatible
with both Process_SplitLargeMeshes and Process_SortByPType.
Process_OptimizeGraph -
A post-processing step to optimize the scene hierarchy.
Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a list of node names you want to be kept. Nodes matching one of the names in this
list won't be touched or modified.
Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with Process_OptimizeMeshes for best results.
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats. Process_OptimizeMeshes
in combination with Process_OptimizeGraph usually fixes them all and makes them renderable.
Process_FlipUVs -
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.
Output UV coordinate system:
0y|0y ---------- 1x|0y
| |
| |
| |
0x|1y ---------- 1x|1y
You'll probably want to consider this flag if you use Direct3D for rendering. The Process_ConvertToLeftHanded flag supersedes this setting and
bundles all conversions typically required for D3D-based applications.
Process_FlipWindingOrder -
This step adjusts the output face winding order to be CW.
The default face winding order is counter clockwise (CCW).
Output face order:
x2
x0
x1
Process_SplitByBoneCount -
This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.
Process_Debone -
This step removes bones losslessly or according to some threshold.
In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use AI_CONFIG_PP_DB_THRESHOLD to control this. Use AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones
within the scene qualify for removal.
Process_GlobalScale -
This step will perform a global scale of the model.
Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get
the global scaling from your importer settings like in FBX. Use the flag AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table
to configure this.
Use AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaling factor.
Process_EmbedTextures -
A postprocessing step to embed of textures.
This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals -
Drops normals for all faces of all meshes.
This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate
vertices in some cases. Process_JoinIdenticalVertices is senseless then. This process gives sense back to Process_JoinIdenticalVertices.
Process_GenBoundingBoxespublic static final int aiProcess_ConvertToLeftHanded
Process_ConvertToLeftHanded -
Shortcut flag for Direct3D-based applications.
Supersedes the Process_MakeLeftHanded and Process_FlipUVs and Process_FlipWindingOrder flags. The output data matches Direct3D's conventions:
left-handed geometry, upper-left origin for UV coordinates and finally clockwise face order, suitable for CCW culling.
ProcessPreset_TargetRealtime_Fast -
Default postprocess configuration optimizing the data for real-time rendering.
Applications would want to use this preset to load models on end-user PCs, maybe for direct use in game.
If you're using DirectX, don't forget to combine this value with the Process_ConvertToLeftHanded step. If you don't support UV transformations in
your application apply the Process_TransformUVCoords step, too.
Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them.
ProcessPreset_TargetRealtime_Quality -
Default postprocess configuration optimizing the data for real-time rendering.
Unlike ProcessPreset_TargetRealtime_Fast, this configuration performs some extra optimizations to improve rendering speed and to minimize memory
usage. It could be a good choice for a level editor environment where import speed is not so important.
If you're using DirectX, don't forget to combine this value with the Process_ConvertToLeftHanded step. If you don't support UV transformations in
your application apply the Process_TransformUVCoords step, too.
Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them.
ProcessPreset_TargetRealtime_MaxQuality -
Default postprocess configuration optimizing the data for real-time rendering.
This preset enables almost every optimization step to achieve perfectly optimized data. It's your choice for level editor environments where import speed is not important.
If you're using DirectX, don't forget to combine this value with the Process_ConvertToLeftHanded step. If you don't support UV transformations in
your application, apply the Process_TransformUVCoords step, too.
Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them.
public static final int aiProcessPreset_TargetRealtime_Fast
Process_ConvertToLeftHanded -
Shortcut flag for Direct3D-based applications.
Supersedes the Process_MakeLeftHanded and Process_FlipUVs and Process_FlipWindingOrder flags. The output data matches Direct3D's conventions:
left-handed geometry, upper-left origin for UV coordinates and finally clockwise face order, suitable for CCW culling.
ProcessPreset_TargetRealtime_Fast -
Default postprocess configuration optimizing the data for real-time rendering.
Applications would want to use this preset to load models on end-user PCs, maybe for direct use in game.
If you're using DirectX, don't forget to combine this value with the Process_ConvertToLeftHanded step. If you don't support UV transformations in
your application apply the Process_TransformUVCoords step, too.
Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them.
ProcessPreset_TargetRealtime_Quality -
Default postprocess configuration optimizing the data for real-time rendering.
Unlike ProcessPreset_TargetRealtime_Fast, this configuration performs some extra optimizations to improve rendering speed and to minimize memory
usage. It could be a good choice for a level editor environment where import speed is not so important.
If you're using DirectX, don't forget to combine this value with the Process_ConvertToLeftHanded step. If you don't support UV transformations in
your application apply the Process_TransformUVCoords step, too.
Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them.
ProcessPreset_TargetRealtime_MaxQuality -
Default postprocess configuration optimizing the data for real-time rendering.
This preset enables almost every optimization step to achieve perfectly optimized data. It's your choice for level editor environments where import speed is not important.
If you're using DirectX, don't forget to combine this value with the Process_ConvertToLeftHanded step. If you don't support UV transformations in
your application, apply the Process_TransformUVCoords step, too.
Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them.
public static final int aiProcessPreset_TargetRealtime_Quality
Process_ConvertToLeftHanded -
Shortcut flag for Direct3D-based applications.
Supersedes the Process_MakeLeftHanded and Process_FlipUVs and Process_FlipWindingOrder flags. The output data matches Direct3D's conventions:
left-handed geometry, upper-left origin for UV coordinates and finally clockwise face order, suitable for CCW culling.
ProcessPreset_TargetRealtime_Fast -
Default postprocess configuration optimizing the data for real-time rendering.
Applications would want to use this preset to load models on end-user PCs, maybe for direct use in game.
If you're using DirectX, don't forget to combine this value with the Process_ConvertToLeftHanded step. If you don't support UV transformations in
your application apply the Process_TransformUVCoords step, too.
Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them.
ProcessPreset_TargetRealtime_Quality -
Default postprocess configuration optimizing the data for real-time rendering.
Unlike ProcessPreset_TargetRealtime_Fast, this configuration performs some extra optimizations to improve rendering speed and to minimize memory
usage. It could be a good choice for a level editor environment where import speed is not so important.
If you're using DirectX, don't forget to combine this value with the Process_ConvertToLeftHanded step. If you don't support UV transformations in
your application apply the Process_TransformUVCoords step, too.
Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them.
ProcessPreset_TargetRealtime_MaxQuality -
Default postprocess configuration optimizing the data for real-time rendering.
This preset enables almost every optimization step to achieve perfectly optimized data. It's your choice for level editor environments where import speed is not important.
If you're using DirectX, don't forget to combine this value with the Process_ConvertToLeftHanded step. If you don't support UV transformations in
your application, apply the Process_TransformUVCoords step, too.
Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them.
public static final int aiProcessPreset_TargetRealtime_MaxQuality
Process_ConvertToLeftHanded -
Shortcut flag for Direct3D-based applications.
Supersedes the Process_MakeLeftHanded and Process_FlipUVs and Process_FlipWindingOrder flags. The output data matches Direct3D's conventions:
left-handed geometry, upper-left origin for UV coordinates and finally clockwise face order, suitable for CCW culling.
ProcessPreset_TargetRealtime_Fast -
Default postprocess configuration optimizing the data for real-time rendering.
Applications would want to use this preset to load models on end-user PCs, maybe for direct use in game.
If you're using DirectX, don't forget to combine this value with the Process_ConvertToLeftHanded step. If you don't support UV transformations in
your application apply the Process_TransformUVCoords step, too.
Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them.
ProcessPreset_TargetRealtime_Quality -
Default postprocess configuration optimizing the data for real-time rendering.
Unlike ProcessPreset_TargetRealtime_Fast, this configuration performs some extra optimizations to improve rendering speed and to minimize memory
usage. It could be a good choice for a level editor environment where import speed is not so important.
If you're using DirectX, don't forget to combine this value with the Process_ConvertToLeftHanded step. If you don't support UV transformations in
your application apply the Process_TransformUVCoords step, too.
Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them.
ProcessPreset_TargetRealtime_MaxQuality -
Default postprocess configuration optimizing the data for real-time rendering.
This preset enables almost every optimization step to achieve perfectly optimized data. It's your choice for level editor environments where import speed is not important.
If you're using DirectX, don't forget to combine this value with the Process_ConvertToLeftHanded step. If you don't support UV transformations in
your application, apply the Process_TransformUVCoords step, too.
Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them.
public static final int AI_SCENE_FLAGS_INCOMPLETE
public static final int AI_SCENE_FLAGS_VALIDATED
public static final int AI_SCENE_FLAGS_VALIDATION_WARNING
public static final int AI_SCENE_FLAGS_NON_VERBOSE_FORMAT
public static final int AI_SCENE_FLAGS_TERRAIN
TER (Terragen) and HMP (3D Game Studio) are height map formats. Note: Assimp is probably not the best choice for loading *huge* terrains - fully triangulated data takes extremely much free store and should be avoided as long as possible (typically you'll do the triangulation when you actually need to render it).
public static final int ASSIMP_CFLAGS_SHARED
public static final int ASSIMP_CFLAGS_STLPORT
public static final int ASSIMP_CFLAGS_DEBUG
public static final int ASSIMP_CFLAGS_NOBOOST
ASSIMP_BUILD_BOOST_WORKAROUND definedpublic static final int ASSIMP_CFLAGS_SINGLETHREADED
ASSIMP_BUILD_SINGLETHREADED definedpublic static org.lwjgl.system.SharedLibrary getLibrary()
SharedLibrary.public static int aiComponent_COLORSn(int n)
n - The color channelpublic static int aiComponent_TEXCOORDSn(int n)
n - The UV channelpublic static float AI_DEG_TO_RAD(float x)
x - The value in degreespublic static float AI_RAD_TO_DEG(float x)
x - The value in radianspublic static long aiGetExportFormatCount()
GetExportFormatDescription to retrieve infos of a specific
export format.public static long naiGetExportFormatDescription(long pIndex)
GetExportFormatDescription@Nullable public static AIExportFormatDesc aiGetExportFormatDescription(long pIndex)
GetExportFormatCount to learn how many export formats are supported. The description must
be released by calling ReleaseExportFormatDescription afterwards.pIndex - Index of the export format to retrieve information for. Valid range is 0 to GetExportFormatCountNULL if pIndex is out of range.public static void naiReleaseExportFormatDescription(long desc)
ReleaseExportFormatDescriptionpublic static void aiReleaseExportFormatDescription(AIExportFormatDesc desc)
GetExportFormatDescription.desc - Pointer to the descriptionpublic static void naiCopyScene(long pIn,
long pOut)
CopyScenepublic static void aiCopyScene(AIScene pIn, org.lwjgl.PointerBuffer pOut)
This is useful to import files via Assimp, change their topology and export them again. Since the scene returned by the various importer functions is const, a modifiable copy is needed.
pIn - Valid scene to be copiedpOut - Receives a modifiable copy of the scene. Use FreeScene to delete it again.@Nullable public static AIScene aiCopyScene(AIScene pIn)
This is useful to import files via Assimp, change their topology and export them again. Since the scene returned by the various importer functions is const, a modifiable copy is needed.
pIn - Valid scene to be copiedpublic static void naiFreeScene(long pIn)
FreeScenepublic static void aiFreeScene(AIScene pIn)
CopyScenepIn - Scene to be freedpublic static int naiExportScene(long pScene,
long pFormatId,
long pFileName,
int pPreProcessing)
ExportScenepublic static int aiExportScene(AIScene pScene, java.nio.ByteBuffer pFormatId, java.nio.ByteBuffer pFileName, int pPreProcessing)
Use CopyScene to get a modifiable copy of a previously imported scene.
pScene - The scene to export. Stays in possession of the caller, is not changed by the function. The scene is expected to conform to Assimp's Importer
output format as specified in the Data Structures Page. In short, this means the model data should use a right-handed coordinate systems, face
winding should be counter-clockwise and the UV coordinate origin is assumed to be in the upper left. If your input data uses different conventions,
have a look at the last parameter.pFormatId - ID string to specify to which format you want to export to. Use GetExportFormatCount / GetExportFormatDescription to learn which export
formats are available.pFileName - Output file to writepPreProcessing - Accepts any choice of the aiPostProcessSteps enumerated flags, but in reality only a subset of them makes sense here. Specifying
'preprocessing' flags is useful if the input scene does not conform to Assimp's default conventions as specified in the Data Structures Page. In
short, this means the geometry data should use a right-handed coordinate systems, face winding should be counter-clockwise and the UV coordinate
origin is assumed to be in the upper left. The Process_MakeLeftHanded, Process_FlipUVs and Process_FlipWindingOrder flags are used in the import
side to allow users to have those defaults automatically adapted to their conventions. Specifying those flags for exporting has the opposite
effect, respectively. Some other of the aiPostProcessSteps enumerated values may be useful as well, but you'll need to try out what their
effect on the exported file is. Many formats impose their own restrictions on the structure of the geometry stored therein, so some preprocessing
may have little or no effect at all, or may be redundant as exporters would apply them anyhow. A good example is triangulation - whilst you can
enforce it by specifying the Process_Triangulate flag, most export formats support only triangulate data so they would run the step anyway.
If assimp detects that the input scene was directly taken from the importer side of the library (i.e. not copied using CopyScene and potentially
modified afterwards), any postprocessing steps already applied to the scene will not be applied again, unless they show non-idempotent behaviour
(Process_MakeLeftHanded, Process_FlipUVs and Process_FlipWindingOrder). One or more of:
public static int aiExportScene(AIScene pScene, java.lang.CharSequence pFormatId, java.lang.CharSequence pFileName, int pPreProcessing)
Use CopyScene to get a modifiable copy of a previously imported scene.
pScene - The scene to export. Stays in possession of the caller, is not changed by the function. The scene is expected to conform to Assimp's Importer
output format as specified in the Data Structures Page. In short, this means the model data should use a right-handed coordinate systems, face
winding should be counter-clockwise and the UV coordinate origin is assumed to be in the upper left. If your input data uses different conventions,
have a look at the last parameter.pFormatId - ID string to specify to which format you want to export to. Use GetExportFormatCount / GetExportFormatDescription to learn which export
formats are available.pFileName - Output file to writepPreProcessing - Accepts any choice of the aiPostProcessSteps enumerated flags, but in reality only a subset of them makes sense here. Specifying
'preprocessing' flags is useful if the input scene does not conform to Assimp's default conventions as specified in the Data Structures Page. In
short, this means the geometry data should use a right-handed coordinate systems, face winding should be counter-clockwise and the UV coordinate
origin is assumed to be in the upper left. The Process_MakeLeftHanded, Process_FlipUVs and Process_FlipWindingOrder flags are used in the import
side to allow users to have those defaults automatically adapted to their conventions. Specifying those flags for exporting has the opposite
effect, respectively. Some other of the aiPostProcessSteps enumerated values may be useful as well, but you'll need to try out what their
effect on the exported file is. Many formats impose their own restrictions on the structure of the geometry stored therein, so some preprocessing
may have little or no effect at all, or may be redundant as exporters would apply them anyhow. A good example is triangulation - whilst you can
enforce it by specifying the Process_Triangulate flag, most export formats support only triangulate data so they would run the step anyway.
If assimp detects that the input scene was directly taken from the importer side of the library (i.e. not copied using CopyScene and potentially
modified afterwards), any postprocessing steps already applied to the scene will not be applied again, unless they show non-idempotent behaviour
(Process_MakeLeftHanded, Process_FlipUVs and Process_FlipWindingOrder). One or more of:
public static int naiExportSceneEx(long pScene,
long pFormatId,
long pFileName,
long pIO,
int pPreProcessing)
ExportSceneExpublic static int aiExportSceneEx(AIScene pScene, java.nio.ByteBuffer pFormatId, java.nio.ByteBuffer pFileName, @Nullable AIFileIO pIO, int pPreProcessing)
Use CopyScene to get a modifiable copy of a previously imported scene.
pScene - The scene to export. Stays in possession of the caller, is not changed by the function. The scene is expected to conform to Assimp's Importer
output format as specified in the Data Structures Page. In short, this means the model data should use a right-handed coordinate systems, face
winding should be counter-clockwise and the UV coordinate origin is assumed to be in the upper left. If your input data uses different conventions,
have a look at the last parameter.pFormatId - ID string to specify to which format you want to export to. Use GetExportFormatCount / GetExportFormatDescription to learn which export
formats are available.pFileName - Output file to writepIO - custom IO implementation to be used. Use this if you use your own storage methods. If none is supplied, a default implementation using standard
file IO is used. Note that ExportSceneToBlob is provided as convenience function to export to memory buffers.pPreProcessing - Accepts any choice of the aiPostProcessSteps enumerated flags, but in reality only a subset of them makes sense here. Specifying
'preprocessing' flags is useful if the input scene does not conform to Assimp's default conventions as specified in the Data Structures Page. In
short, this means the geometry data should use a right-handed coordinate systems, face winding should be counter-clockwise and the UV coordinate
origin is assumed to be in the upper left. The Process_MakeLeftHanded, Process_FlipUVs and Process_FlipWindingOrder flags are used in the import
side to allow users to have those defaults automatically adapted to their conventions. Specifying those flags for exporting has the opposite
effect, respectively. Some other of the aiPostProcessSteps enumerated values may be useful as well, but you'll need to try out what their
effect on the exported file is. Many formats impose their own restrictions on the structure of the geometry stored therein, so some preprocessing
may have little or no effect at all, or may be redundant as exporters would apply them anyhow. A good example is triangulation - whilst you can
enforce it by specifying the Process_Triangulate flag, most export formats support only triangulate data so they would run the step anyway.
If assimp detects that the input scene was directly taken from the importer side of the library (i.e. not copied using CopyScene and potentially
modified afterwards), any postprocessing steps already applied to the scene will not be applied again, unless they show non-idempotent behaviour
(Process_MakeLeftHanded, Process_FlipUVs and Process_FlipWindingOrder). One or more of:
public static int aiExportSceneEx(AIScene pScene, java.lang.CharSequence pFormatId, java.lang.CharSequence pFileName, @Nullable AIFileIO pIO, int pPreProcessing)
Use CopyScene to get a modifiable copy of a previously imported scene.
pScene - The scene to export. Stays in possession of the caller, is not changed by the function. The scene is expected to conform to Assimp's Importer
output format as specified in the Data Structures Page. In short, this means the model data should use a right-handed coordinate systems, face
winding should be counter-clockwise and the UV coordinate origin is assumed to be in the upper left. If your input data uses different conventions,
have a look at the last parameter.pFormatId - ID string to specify to which format you want to export to. Use GetExportFormatCount / GetExportFormatDescription to learn which export
formats are available.pFileName - Output file to writepIO - custom IO implementation to be used. Use this if you use your own storage methods. If none is supplied, a default implementation using standard
file IO is used. Note that ExportSceneToBlob is provided as convenience function to export to memory buffers.pPreProcessing - Accepts any choice of the aiPostProcessSteps enumerated flags, but in reality only a subset of them makes sense here. Specifying
'preprocessing' flags is useful if the input scene does not conform to Assimp's default conventions as specified in the Data Structures Page. In
short, this means the geometry data should use a right-handed coordinate systems, face winding should be counter-clockwise and the UV coordinate
origin is assumed to be in the upper left. The Process_MakeLeftHanded, Process_FlipUVs and Process_FlipWindingOrder flags are used in the import
side to allow users to have those defaults automatically adapted to their conventions. Specifying those flags for exporting has the opposite
effect, respectively. Some other of the aiPostProcessSteps enumerated values may be useful as well, but you'll need to try out what their
effect on the exported file is. Many formats impose their own restrictions on the structure of the geometry stored therein, so some preprocessing
may have little or no effect at all, or may be redundant as exporters would apply them anyhow. A good example is triangulation - whilst you can
enforce it by specifying the Process_Triangulate flag, most export formats support only triangulate data so they would run the step anyway.
If assimp detects that the input scene was directly taken from the importer side of the library (i.e. not copied using CopyScene and potentially
modified afterwards), any postprocessing steps already applied to the scene will not be applied again, unless they show non-idempotent behaviour
(Process_MakeLeftHanded, Process_FlipUVs and Process_FlipWindingOrder). One or more of:
public static long naiExportSceneToBlob(long pScene,
long pFormatId,
int pPreProcessing)
ExportSceneToBlob@Nullable public static AIExportDataBlob aiExportSceneToBlob(AIScene pScene, java.nio.ByteBuffer pFormatId, int pPreProcessing)
ReleaseExportBlob to free the resources associated with the export.pScene - The scene to export. Stays in possession of the caller, is not changed by the function. The scene is expected to conform to Assimp's Importer
output format as specified in the Data Structures Page. In short, this means the model data should use a right-handed coordinate systems, face
winding should be counter-clockwise and the UV coordinate origin is assumed to be in the upper left. If your input data uses different conventions,
have a look at the last parameter.pFormatId - ID string to specify to which format you want to export to. Use GetExportFormatCount / GetExportFormatDescription to learn which export
formats are available.pPreProcessing - Accepts any choice of the aiPostProcessSteps enumerated flags, but in reality only a subset of them makes sense here. Specifying
'preprocessing' flags is useful if the input scene does not conform to Assimp's default conventions as specified in the Data Structures Page. In
short, this means the geometry data should use a right-handed coordinate systems, face winding should be counter-clockwise and the UV coordinate
origin is assumed to be in the upper left. The Process_MakeLeftHanded, Process_FlipUVs and Process_FlipWindingOrder flags are used in the import
side to allow users to have those defaults automatically adapted to their conventions. Specifying those flags for exporting has the opposite
effect, respectively. Some other of the aiPostProcessSteps enumerated values may be useful as well, but you'll need to try out what their
effect on the exported file is. Many formats impose their own restrictions on the structure of the geometry stored therein, so some preprocessing
may have little or no effect at all, or may be redundant as exporters would apply them anyhow. A good example is triangulation - whilst you can
enforce it by specifying the Process_Triangulate flag, most export formats support only triangulate data so they would run the step anyway.
If assimp detects that the input scene was directly taken from the importer side of the library (i.e. not copied using CopyScene and potentially
modified afterwards), any postprocessing steps already applied to the scene will not be applied again, unless they show non-idempotent behaviour
(Process_MakeLeftHanded, Process_FlipUVs and Process_FlipWindingOrder). One or more of:
NULL in case of error@Nullable public static AIExportDataBlob aiExportSceneToBlob(AIScene pScene, java.lang.CharSequence pFormatId, int pPreProcessing)
ReleaseExportBlob to free the resources associated with the export.pScene - The scene to export. Stays in possession of the caller, is not changed by the function. The scene is expected to conform to Assimp's Importer
output format as specified in the Data Structures Page. In short, this means the model data should use a right-handed coordinate systems, face
winding should be counter-clockwise and the UV coordinate origin is assumed to be in the upper left. If your input data uses different conventions,
have a look at the last parameter.pFormatId - ID string to specify to which format you want to export to. Use GetExportFormatCount / GetExportFormatDescription to learn which export
formats are available.pPreProcessing - Accepts any choice of the aiPostProcessSteps enumerated flags, but in reality only a subset of them makes sense here. Specifying
'preprocessing' flags is useful if the input scene does not conform to Assimp's default conventions as specified in the Data Structures Page. In
short, this means the geometry data should use a right-handed coordinate systems, face winding should be counter-clockwise and the UV coordinate
origin is assumed to be in the upper left. The Process_MakeLeftHanded, Process_FlipUVs and Process_FlipWindingOrder flags are used in the import
side to allow users to have those defaults automatically adapted to their conventions. Specifying those flags for exporting has the opposite
effect, respectively. Some other of the aiPostProcessSteps enumerated values may be useful as well, but you'll need to try out what their
effect on the exported file is. Many formats impose their own restrictions on the structure of the geometry stored therein, so some preprocessing
may have little or no effect at all, or may be redundant as exporters would apply them anyhow. A good example is triangulation - whilst you can
enforce it by specifying the Process_Triangulate flag, most export formats support only triangulate data so they would run the step anyway.
If assimp detects that the input scene was directly taken from the importer side of the library (i.e. not copied using CopyScene and potentially
modified afterwards), any postprocessing steps already applied to the scene will not be applied again, unless they show non-idempotent behaviour
(Process_MakeLeftHanded, Process_FlipUVs and Process_FlipWindingOrder). One or more of:
NULL in case of errorpublic static void naiReleaseExportBlob(long pData)
ReleaseExportBlobpublic static void aiReleaseExportBlob(AIExportDataBlob pData)
ExportSceneToBlob.pData - the data blob returned by ExportSceneToBlobpublic static long naiImportFile(long pFile,
int pFlags)
ImportFile@Nullable public static AIScene aiImportFile(java.nio.ByteBuffer pFile, int pFlags)
If the call succeeds, the imported data is returned in an AIScene structure. The data is intended to be read-only, it stays property of the ASSIMP
library and will be stable until ReleaseImport is called. After you're done with it, call ReleaseImport to free the resources associated with
this file. If the import fails, NULL is returned instead. Call GetErrorString to retrieve a human-readable error text.
pFile - Path and filename of the file to be importedpFlags - Optional post processing steps to be executed after a successful import. If you wish to inspect the imported scene first in order to fine-tune
your post-processing setup, consider to use ApplyPostProcessing. One or more of:NULL if the import failed.@Nullable public static AIScene aiImportFile(java.lang.CharSequence pFile, int pFlags)
If the call succeeds, the imported data is returned in an AIScene structure. The data is intended to be read-only, it stays property of the ASSIMP
library and will be stable until ReleaseImport is called. After you're done with it, call ReleaseImport to free the resources associated with
this file. If the import fails, NULL is returned instead. Call GetErrorString to retrieve a human-readable error text.
pFile - Path and filename of the file to be importedpFlags - Optional post processing steps to be executed after a successful import. If you wish to inspect the imported scene first in order to fine-tune
your post-processing setup, consider to use ApplyPostProcessing. One or more of:NULL if the import failed.public static long naiImportFileEx(long pFile,
int pFlags,
long pFS)
ImportFileEx@Nullable public static AIScene aiImportFileEx(java.nio.ByteBuffer pFile, int pFlags, @Nullable AIFileIO pFS)
If the call succeeds, the imported data is returned in an AIScene structure. The data is intended to be read-only, it stays property of the ASSIMP
library and will be stable until ReleaseImport is called. After you're done with it, call ReleaseImport to free the resources associated with
this file. If the import fails, NULL is returned instead. Call GetErrorString to retrieve a human-readable error text.
pFile - Path and filename of the file to be importedpFlags - Optional post processing steps to be executed after a successful import. If you wish to inspect the imported scene first in order to fine-tune
your post-processing setup, consider to use ApplyPostProcessing. One or more of:pFS - Will be used to open the model file itself and any other files the loader needs to open. Pass NULL to use the default implementation.NULL if the import failed.@Nullable public static AIScene aiImportFileEx(java.lang.CharSequence pFile, int pFlags, @Nullable AIFileIO pFS)
If the call succeeds, the imported data is returned in an AIScene structure. The data is intended to be read-only, it stays property of the ASSIMP
library and will be stable until ReleaseImport is called. After you're done with it, call ReleaseImport to free the resources associated with
this file. If the import fails, NULL is returned instead. Call GetErrorString to retrieve a human-readable error text.
pFile - Path and filename of the file to be importedpFlags - Optional post processing steps to be executed after a successful import. If you wish to inspect the imported scene first in order to fine-tune
your post-processing setup, consider to use ApplyPostProcessing. One or more of:pFS - Will be used to open the model file itself and any other files the loader needs to open. Pass NULL to use the default implementation.NULL if the import failed.public static long naiImportFileExWithProperties(long pFile,
int pFlags,
long pFS,
long pProps)
ImportFileExWithProperties@Nullable public static AIScene aiImportFileExWithProperties(java.nio.ByteBuffer pFile, int pFlags, @Nullable AIFileIO pFS, AIPropertyStore pProps)
ImportFileEx, but adds an extra parameter containing importer settings.pFile - Path and filename of the file to be importedpFlags - Optional post processing steps to be executed after a successful import. If you wish to inspect the imported scene first in order to fine-tune
your post-processing setup, consider to use ApplyPostProcessing. One or more of:pFS - Will be used to open the model file itself and any other files the loader needs to open. Pass NULL to use the default implementation.pProps - AIPropertyStore instance containing import settings.NULL if the import failed.@Nullable public static AIScene aiImportFileExWithProperties(java.lang.CharSequence pFile, int pFlags, @Nullable AIFileIO pFS, AIPropertyStore pProps)
ImportFileEx, but adds an extra parameter containing importer settings.pFile - Path and filename of the file to be importedpFlags - Optional post processing steps to be executed after a successful import. If you wish to inspect the imported scene first in order to fine-tune
your post-processing setup, consider to use ApplyPostProcessing. One or more of:pFS - Will be used to open the model file itself and any other files the loader needs to open. Pass NULL to use the default implementation.pProps - AIPropertyStore instance containing import settings.NULL if the import failed.public static long naiImportFileFromMemory(long pBuffer,
int pLength,
int pFlags,
long pHint)
ImportFileFromMemorypLength - Length of pBuffer, in bytes@Nullable public static AIScene aiImportFileFromMemory(java.nio.ByteBuffer pBuffer, int pFlags, @Nullable java.nio.ByteBuffer pHint)
If the call succeeds, the contents of the file are returned as a pointer to an AIScene object. The returned data is intended to be read-only, the
importer keeps ownership of the data and will destroy it upon destruction. If the import fails, NULL is returned. A human-readable error description
can be retrieved by calling GetErrorString.
This is a straightforward way to decode models from memory buffers, but it doesn't handle model formats that spread their data across multiple files or
even directories. Examples include OBJ or MD3, which outsource parts of their material info into external scripts. If you need full functionality,
provide a custom IOSystem to make Assimp find these files and use the regular ImportFileEx/ImportFileExWithProperties API.
pBuffer - Pointer to the file datapFlags - Optional post processing steps to be executed after a successful import. If you wish to inspect the imported scene first in order to fine-tune
your post-processing setup, consider to use ApplyPostProcessing. One or more of:pHint - An additional hint to the library. If this is a non empty string, the library looks for a loader to support the file extension specified by
pHint and passes the file to the first matching loader. If this loader is unable to completely the request, the library continues and tries
to determine the file format on its own, a task that may or may not be successful. Check the return value, and you'll know ...NULL if the import failed.@Nullable public static AIScene aiImportFileFromMemory(java.nio.ByteBuffer pBuffer, int pFlags, @Nullable java.lang.CharSequence pHint)
If the call succeeds, the contents of the file are returned as a pointer to an AIScene object. The returned data is intended to be read-only, the
importer keeps ownership of the data and will destroy it upon destruction. If the import fails, NULL is returned. A human-readable error description
can be retrieved by calling GetErrorString.
This is a straightforward way to decode models from memory buffers, but it doesn't handle model formats that spread their data across multiple files or
even directories. Examples include OBJ or MD3, which outsource parts of their material info into external scripts. If you need full functionality,
provide a custom IOSystem to make Assimp find these files and use the regular ImportFileEx/ImportFileExWithProperties API.
pBuffer - Pointer to the file datapFlags - Optional post processing steps to be executed after a successful import. If you wish to inspect the imported scene first in order to fine-tune
your post-processing setup, consider to use ApplyPostProcessing. One or more of:pHint - An additional hint to the library. If this is a non empty string, the library looks for a loader to support the file extension specified by
pHint and passes the file to the first matching loader. If this loader is unable to completely the request, the library continues and tries
to determine the file format on its own, a task that may or may not be successful. Check the return value, and you'll know ...NULL if the import failed.public static long naiImportFileFromMemoryWithProperties(long pBuffer,
int pLength,
int pFlags,
long pHint,
long pProps)
ImportFileFromMemoryWithPropertiespLength - Length of pBuffer, in bytes@Nullable public static AIScene aiImportFileFromMemoryWithProperties(java.nio.ByteBuffer pBuffer, int pFlags, @Nullable java.nio.ByteBuffer pHint, AIPropertyStore pProps)
ImportFileFromMemory, but adds an extra parameter containing importer settings.pBuffer - Pointer to the file datapFlags - Optional post processing steps to be executed after a successful import. If you wish to inspect the imported scene first in order to fine-tune
your post-processing setup, consider to use ApplyPostProcessing. One or more of:pHint - An additional hint to the library. If this is a non empty string, the library looks for a loader to support the file extension specified by
pHint and passes the file to the first matching loader. If this loader is unable to completely the request, the library continues and tries
to determine the file format on its own, a task that may or may not be successful. Check the return value, and you'll know ...pProps - AIPropertyStore instance containing import settings.NULL if the import failed.@Nullable public static AIScene aiImportFileFromMemoryWithProperties(java.nio.ByteBuffer pBuffer, int pFlags, @Nullable java.lang.CharSequence pHint, AIPropertyStore pProps)
ImportFileFromMemory, but adds an extra parameter containing importer settings.pBuffer - Pointer to the file datapFlags - Optional post processing steps to be executed after a successful import. If you wish to inspect the imported scene first in order to fine-tune
your post-processing setup, consider to use ApplyPostProcessing. One or more of:pHint - An additional hint to the library. If this is a non empty string, the library looks for a loader to support the file extension specified by
pHint and passes the file to the first matching loader. If this loader is unable to completely the request, the library continues and tries
to determine the file format on its own, a task that may or may not be successful. Check the return value, and you'll know ...pProps - AIPropertyStore instance containing import settings.NULL if the import failed.public static long naiApplyPostProcessing(long pScene,
int pFlags)
ApplyPostProcessing@Nullable public static AIScene aiApplyPostProcessing(AIScene pScene, int pFlags)
This is strictly equivalent to calling ImportFile/ImportFileEx with the same flags. However, you can use this separate function to inspect the
imported scene first to fine-tune your post-processing setup.
pScene - Scene to work on.pFlags - Provide a bitwise combination of the aiPostProcessSteps flags. One or more of:AIScene which you passed for pScene.
However, if post-processing failed, the scene could now be NULL. That's quite a rare case, post processing steps are not really designed to
'fail'. To be exact, the Process_ValidateDataStructure flag is currently the only post processing step which can actually cause the scene to be reset
to NULL.public static void naiAttachLogStream(long stream)
AttachLogStreampublic static void aiAttachLogStream(AILogStream stream)
Attaching a log stream can slightly reduce Assimp's overall import performance. Multiple log-streams can be attached.
To ensure proper destruction of the logging system, you need to manually call DetachLogStream on every single log stream you attach. Alternatively
(for the lazy folks) DetachAllLogStreams is provided.
stream - Describes the new log stream.public static void aiEnableVerboseLogging(boolean d)
d - true or false, your decisionpublic static int naiDetachLogStream(long stream)
DetachLogStreampublic static int aiDetachLogStream(AILogStream stream)
This is the counterpart of AttachLogStream. If you attached a stream, don't forget to detach it again.
stream - The log stream to be detached.Return_SUCCESS if the log stream has been detached successfully.public static void aiDetachAllLogStreams()
public static void naiReleaseImport(long pScene)
ReleaseImportpublic static void aiReleaseImport(@Nullable
AIScene pScene)
Call this function after you're done with the imported data.
pScene - The imported data to release. NULL is a valid value.public static long naiGetErrorString()
GetErrorString@Nullable public static java.lang.String aiGetErrorString()
NULL if there was no error. There can't be an error if you got a
non-NULL AIScene from ImportFile/ImportFileEx/ApplyPostProcessing.public static int naiIsExtensionSupported(long szExtension)
IsExtensionSupportedpublic static boolean aiIsExtensionSupported(java.nio.ByteBuffer szExtension)
szExtension - Extension for which the function queries support for. Must include a leading dot '.'. Example: ".3ds", ".md3"public static boolean aiIsExtensionSupported(java.lang.CharSequence szExtension)
szExtension - Extension for which the function queries support for. Must include a leading dot '.'. Example: ".3ds", ".md3"public static void naiGetExtensionList(long szOut)
GetExtensionListpublic static void aiGetExtensionList(AIString szOut)
If a file extension is contained in the list this does, of course, not mean that ASSIMP is able to load all files with this extension.
szOut - String to receive the extension list. Format of the list: "*.3ds;*.obj;*.dae". NULL is not a valid parameter.public static void naiGetMemoryRequirements(long pIn,
long in)
GetMemoryRequirementspublic static void aiGetMemoryRequirements(AIScene pIn, AIMemoryInfo in)
pIn - Input asset.in - Data structure to be filled.public static long naiCreatePropertyStore()
CreatePropertyStore@Nullable public static AIPropertyStore aiCreatePropertyStore()
ReleasePropertyStore API function.public static void naiReleasePropertyStore(long p)
ReleasePropertyStorepublic static void aiReleasePropertyStore(AIPropertyStore p)
p - Property store to be deleted.public static void naiSetImportPropertyInteger(long store,
long szName,
int value)
SetImportPropertyIntegerpublic static void aiSetImportPropertyInteger(AIPropertyStore store, java.nio.ByteBuffer szName, int value)
This is the C-version of Assimp::Importer::SetPropertyInteger(). In the C interface, properties are always shared by all imports. It is not
possible to specify them per import.
store - Store to modify. Use CreatePropertyStore to obtain a store.szName - Name of the configuration property to be set. One of:value - New value for the propertypublic static void aiSetImportPropertyInteger(AIPropertyStore store, java.lang.CharSequence szName, int value)
This is the C-version of Assimp::Importer::SetPropertyInteger(). In the C interface, properties are always shared by all imports. It is not
possible to specify them per import.
store - Store to modify. Use CreatePropertyStore to obtain a store.szName - Name of the configuration property to be set. One of:value - New value for the propertypublic static void naiSetImportPropertyFloat(long store,
long szName,
float value)
SetImportPropertyFloatpublic static void aiSetImportPropertyFloat(AIPropertyStore store, java.nio.ByteBuffer szName, float value)
This is the C-version of Assimp::Importer::SetPropertyFloat(). In the C interface, properties are always shared by all imports. It is not
possible to specify them per import.
store - Store to modify. Use CreatePropertyStore to obtain a store.szName - Name of the configuration property to be set. One of:value - New value for the propertypublic static void aiSetImportPropertyFloat(AIPropertyStore store, java.lang.CharSequence szName, float value)
This is the C-version of Assimp::Importer::SetPropertyFloat(). In the C interface, properties are always shared by all imports. It is not
possible to specify them per import.
store - Store to modify. Use CreatePropertyStore to obtain a store.szName - Name of the configuration property to be set. One of:value - New value for the propertypublic static void naiSetImportPropertyString(long store,
long szName,
long value)
SetImportPropertyStringpublic static void aiSetImportPropertyString(AIPropertyStore store, java.nio.ByteBuffer szName, AIString value)
This is the C-version of Assimp::Importer::SetPropertyString(). In the C interface, properties are always shared by all imports. It is not
possible to specify them per import.
store - Store to modify. Use CreatePropertyStore to obtain a store.szName - Name of the configuration property to be set. One of:value - New value for the propertypublic static void aiSetImportPropertyString(AIPropertyStore store, java.lang.CharSequence szName, AIString value)
This is the C-version of Assimp::Importer::SetPropertyString(). In the C interface, properties are always shared by all imports. It is not
possible to specify them per import.
store - Store to modify. Use CreatePropertyStore to obtain a store.szName - Name of the configuration property to be set. One of:value - New value for the propertypublic static void naiSetImportPropertyMatrix(long store,
long szName,
long value)
SetImportPropertyMatrixpublic static void aiSetImportPropertyMatrix(AIPropertyStore store, java.nio.ByteBuffer szName, AIMatrix4x4 value)
This is the C-version of Assimp::Importer::SetPropertyMatrix(). In the C interface, properties are always shared by all imports. It is not
possible to specify them per import.
store - Store to modify. Use CreatePropertyStore to obtain a store.szName - Name of the configuration property to be set. One of:value - New value for the propertypublic static void aiSetImportPropertyMatrix(AIPropertyStore store, java.lang.CharSequence szName, AIMatrix4x4 value)
This is the C-version of Assimp::Importer::SetPropertyMatrix(). In the C interface, properties are always shared by all imports. It is not
possible to specify them per import.
store - Store to modify. Use CreatePropertyStore to obtain a store.szName - Name of the configuration property to be set. One of:value - New value for the propertypublic static void naiCreateQuaternionFromMatrix(long quat,
long mat)
CreateQuaternionFromMatrixpublic static void aiCreateQuaternionFromMatrix(AIQuaternion quat, AIMatrix3x3 mat)
quat - Receives the output quaternion.mat - Matrix to 'quaternionize'.public static void naiDecomposeMatrix(long mat,
long scaling,
long rotation,
long position)
DecomposeMatrixpublic static void aiDecomposeMatrix(AIMatrix4x4 mat, AIVector3D scaling, AIQuaternion rotation, AIVector3D position)
mat - Matrix to decomposescaling - Receives the scaling componentrotation - Receives the rotational componentposition - Receives the translational component.public static void naiTransposeMatrix4(long mat)
TransposeMatrix4public static void aiTransposeMatrix4(AIMatrix4x4 mat)
mat - Pointer to the matrix to be transposedpublic static void naiTransposeMatrix3(long mat)
TransposeMatrix3public static void aiTransposeMatrix3(AIMatrix3x3 mat)
mat - Pointer to the matrix to be transposedpublic static void naiTransformVecByMatrix3(long vec,
long mat)
TransformVecByMatrix3public static void aiTransformVecByMatrix3(AIVector3D vec, AIMatrix3x3 mat)
vec - Vector to be transformed.mat - Matrix to transform the vector with.public static void naiTransformVecByMatrix4(long vec,
long mat)
TransformVecByMatrix4public static void aiTransformVecByMatrix4(AIVector3D vec, AIMatrix4x4 mat)
vec - Vector to be transformed.mat - Matrix to transform the vector with.public static void naiMultiplyMatrix4(long dst,
long src)
MultiplyMatrix4public static void aiMultiplyMatrix4(AIMatrix4x4 dst, AIMatrix4x4 src)
dst - First factor, receives result.src - Matrix to be multiplied with 'dst'.public static void naiMultiplyMatrix3(long dst,
long src)
MultiplyMatrix3public static void aiMultiplyMatrix3(AIMatrix3x3 dst, AIMatrix3x3 src)
dst - First factor, receives result.src - Matrix to be multiplied with 'dst'.public static void naiIdentityMatrix3(long mat)
IdentityMatrix3public static void aiIdentityMatrix3(AIMatrix3x3 mat)
mat - Matrix to receive its personal identitypublic static void naiIdentityMatrix4(long mat)
IdentityMatrix4public static void aiIdentityMatrix4(AIMatrix4x4 mat)
mat - Matrix to receive its personal identitypublic static long aiGetImportFormatCount()
GetImportFormatDescription to retrieve infos of a specific
import format.public static long naiGetImportFormatDescription(long pIndex)
GetImportFormatDescription@Nullable public static AIImporterDesc aiGetImportFormatDescription(long pIndex)
GetImportFormatCount to learn how many import formats are supported.pIndex - Index of the import format to retrieve information for. Valid range is 0 to GetImportFormatCountNULL if pIndex is out of range.public static long naiGetImporterDesc(long extension)
GetImporterDesc@Nullable public static AIImporterDesc aiGetImporterDesc(java.nio.ByteBuffer extension)
Will return a NULL-pointer if no assigned importer desc. was found for the given extension.
extension - The extension to look forAIImporterDesc.@Nullable public static AIImporterDesc aiGetImporterDesc(java.lang.CharSequence extension)
Will return a NULL-pointer if no assigned importer desc. was found for the given extension.
extension - The extension to look forAIImporterDesc.public static int naiGetMaterialProperty(long pMat,
long pKey,
int type,
int index,
long mPropOut)
GetMaterialPropertypublic static int aiGetMaterialProperty(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, org.lwjgl.PointerBuffer mPropOut)
pMat - Pointer to the input material. May not be NULLpKey - Key to search for. One of the AI_MATKEY_XXX constants.type - Specifies the type of the texture to be retrieved. One of:index - Index of the texture to be retrieved.mPropOut - Pointer to receive a pointer to a valid AIMaterialProperty structure or NULL if the key has not been found.public static int aiGetMaterialProperty(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, org.lwjgl.PointerBuffer mPropOut)
pMat - Pointer to the input material. May not be NULLpKey - Key to search for. One of the AI_MATKEY_XXX constants.type - Specifies the type of the texture to be retrieved. One of:index - Index of the texture to be retrieved.mPropOut - Pointer to receive a pointer to a valid AIMaterialProperty structure or NULL if the key has not been found.public static int aiGetMaterialProperty(AIMaterial pMat, java.nio.ByteBuffer pKey, org.lwjgl.PointerBuffer mPropOut)
pMat - Pointer to the input material. May not be NULLpKey - Key to search for. One of the AI_MATKEY_XXX constants.mPropOut - Pointer to receive a pointer to a valid AIMaterialProperty structure or NULL if the key has not been found.public static int aiGetMaterialProperty(AIMaterial pMat, java.lang.CharSequence pKey, org.lwjgl.PointerBuffer mPropOut)
pMat - Pointer to the input material. May not be NULLpKey - Key to search for. One of the AI_MATKEY_XXX constants.mPropOut - Pointer to receive a pointer to a valid AIMaterialProperty structure or NULL if the key has not been found.public static int naiGetMaterialFloatArray(long pMat,
long pKey,
int type,
int index,
long pOut,
long pMax)
GetMaterialFloatArraypMax - Specifies the size of the given buffer, in float's. Receives the number of values (not bytes!) read.public static int aiGetMaterialFloatArray(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, java.nio.FloatBuffer pOut, @Nullable java.nio.IntBuffer pMax)
pMat - Pointer to the input material. May not be NULLpKey - Key to search for. One of the AI_MATKEY_XXX constants.type - Specifies the type of the texture to be retrieved. One of:index - Index of the texture to be retrieved.pOut - Pointer to a buffer to receive the result.pMax - Specifies the size of the given buffer, in float's. Receives the number of values (not bytes!) read.pMax is set to 0.public static int aiGetMaterialFloatArray(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, java.nio.FloatBuffer pOut, @Nullable java.nio.IntBuffer pMax)
pMat - Pointer to the input material. May not be NULLpKey - Key to search for. One of the AI_MATKEY_XXX constants.type - Specifies the type of the texture to be retrieved. One of:index - Index of the texture to be retrieved.pOut - Pointer to a buffer to receive the result.pMax - Specifies the size of the given buffer, in float's. Receives the number of values (not bytes!) read.pMax is set to 0.public static int naiGetMaterialIntegerArray(long pMat,
long pKey,
int type,
int index,
long pOut,
long pMax)
GetMaterialIntegerArraypMax - Specifies the size of the given buffer, in int's. Receives the number of values (not bytes!) read.public static int aiGetMaterialIntegerArray(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, java.nio.IntBuffer pOut, @Nullable java.nio.IntBuffer pMax)
pMat - Pointer to the input material. May not be NULLpKey - Key to search for. One of the AI_MATKEY_XXX constants.type - Specifies the type of the texture to be retrieved. One of:index - Index of the texture to be retrieved.pOut - Pointer to a buffer to receive the result.pMax - Specifies the size of the given buffer, in int's. Receives the number of values (not bytes!) read.pMax is set to 0.public static int aiGetMaterialIntegerArray(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, java.nio.IntBuffer pOut, @Nullable java.nio.IntBuffer pMax)
pMat - Pointer to the input material. May not be NULLpKey - Key to search for. One of the AI_MATKEY_XXX constants.type - Specifies the type of the texture to be retrieved. One of:index - Index of the texture to be retrieved.pOut - Pointer to a buffer to receive the result.pMax - Specifies the size of the given buffer, in int's. Receives the number of values (not bytes!) read.pMax is set to 0.public static int naiGetMaterialColor(long pMat,
long pKey,
int type,
int index,
long pOut)
GetMaterialColorpublic static int aiGetMaterialColor(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, AIColor4D pOut)
pMat - Pointer to the input material. May not be NULLpKey - Key to search for. One of the AI_MATKEY_XXX constants.type - Specifies the type of the texture to be retrieved. One of:index - Index of the texture to be retrieved.pOut - Pointer to a color to receive the result.public static int aiGetMaterialColor(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, AIColor4D pOut)
pMat - Pointer to the input material. May not be NULLpKey - Key to search for. One of the AI_MATKEY_XXX constants.type - Specifies the type of the texture to be retrieved. One of:index - Index of the texture to be retrieved.pOut - Pointer to a color to receive the result.public static int naiGetMaterialUVTransform(long pMat,
long pKey,
int type,
int index,
long pOut)
GetMaterialUVTransformpublic static int aiGetMaterialUVTransform(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, AIUVTransform pOut)
pMat - Pointer to the input material. May not be NULLpKey - Key to search for. One of the AI_MATKEY_XXX constants.type - Specifies the type of the texture to be retrieved. One of:index - Index of the texture to be retrieved.pOut - Pointer to a AIUVTransform to receive the result.public static int aiGetMaterialUVTransform(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, AIUVTransform pOut)
pMat - Pointer to the input material. May not be NULLpKey - Key to search for. One of the AI_MATKEY_XXX constants.type - Specifies the type of the texture to be retrieved. One of:index - Index of the texture to be retrieved.pOut - Pointer to a AIUVTransform to receive the result.public static int naiGetMaterialString(long pMat,
long pKey,
int type,
int index,
long pOut)
GetMaterialStringpublic static int aiGetMaterialString(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, AIString pOut)
pMat - Pointer to the input material. May not be NULLpKey - Key to search for. One of the AI_MATKEY_XXX constants.type - Specifies the type of the texture to be retrieved. One of:index - Index of the texture to be retrieved.pOut - Pointer to a string to receive the result.public static int aiGetMaterialString(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, AIString pOut)
pMat - Pointer to the input material. May not be NULLpKey - Key to search for. One of the AI_MATKEY_XXX constants.type - Specifies the type of the texture to be retrieved. One of:index - Index of the texture to be retrieved.pOut - Pointer to a string to receive the result.public static int naiGetMaterialTextureCount(long pMat,
int type)
GetMaterialTextureCountpublic static int aiGetMaterialTextureCount(AIMaterial pMat, int type)
pMat - Pointer to the input material. May not be NULLtype - Texture type to check for. One of:public static int naiGetMaterialTexture(long pMat,
int type,
int index,
long path,
long mapping,
long uvindex,
long blend,
long op,
long mapmode,
long flags)
GetMaterialTexturepublic static int aiGetMaterialTexture(AIMaterial pMat, int type, int index, AIString path, @Nullable java.nio.IntBuffer mapping, @Nullable java.nio.IntBuffer uvindex, @Nullable java.nio.FloatBuffer blend, @Nullable java.nio.IntBuffer op, @Nullable java.nio.IntBuffer mapmode, @Nullable java.nio.IntBuffer flags)
This function is provided just for convenience. You could also read the texture by parsing all of its properties manually. This function bundles all of them in a huge function monster.
pMat - Pointer to the input material. May not be NULLtype - Specifies the texture stack to read from (e.g. diffuse, specular, height map ...). One of:index - Index of the texture. The function fails if the requested index is not available for this texture type.path - Receives the output path. This parameter must be non-null.mapping - The texture mapping mode to be used. Pass NULL if you're not interested in this information.uvindex - For UV-mapped textures: receives the index of the UV source channel. Unmodified otherwise.blend - Receives the blend factor for the texture. Pass NULL if you're not interested in this information.op - Receives the texture blend operation to be perform between this texture and the previous texture. Pass NULL if you're not interested in this
information.mapmode - Receives the mapping modes to be used for the texture. Pass NULL if you're not interested in this information. Otherwise, pass a pointer to an
array of two aiTextureMapMode's (one for each axis, UV order).flags - Receives the texture flags.Return_SUCCESS on success, otherwise something else. Have fun.public static long naiGetLegalString()
GetLegalStringpublic static java.lang.String aiGetLegalString()
public static int aiGetVersionPatch()
public static int aiGetVersionMinor()
public static int aiGetVersionMajor()
public static int aiGetVersionRevision()
public static long naiGetBranchName()
GetBranchName@Nullable public static java.lang.String aiGetBranchName()
public static int aiGetCompileFlags()
ASSIMP_CFLAGS_xxx constants.public static int aiGetMaterialFloatArray(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, float[] pOut, @Nullable int[] pMax)
GetMaterialFloatArraypublic static int aiGetMaterialFloatArray(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, float[] pOut, @Nullable int[] pMax)
GetMaterialFloatArraypublic static int aiGetMaterialIntegerArray(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, int[] pOut, @Nullable int[] pMax)
GetMaterialIntegerArraypublic static int aiGetMaterialIntegerArray(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, int[] pOut, @Nullable int[] pMax)
GetMaterialIntegerArraypublic static int aiGetMaterialTexture(AIMaterial pMat, int type, int index, AIString path, @Nullable int[] mapping, @Nullable int[] uvindex, @Nullable float[] blend, @Nullable int[] op, @Nullable int[] mapmode, @Nullable int[] flags)
GetMaterialTextureCopyright LWJGL. All Rights Reserved. License terms.