TriLib
1.9.0
TriLib Unity Package
|
Classes | |
class | AssetAdvancedConfig |
Represents an asset advanced config. More... | |
class | AssetAdvancedPropertyMetadata |
Represents all asset advanced configuration-metadata. More... | |
class | AssetDownloader |
Represents an asset downloader. Add this MonoBehaviour to any GameObject and set AssetURI and AssetExtension to automatically download the referenced model. More... | |
class | AssetLoader |
Represents a synchronous asset loader. More... | |
class | AssetLoaderAsync |
Represents an asynchronous asset loader. More... | |
class | AssetLoaderBase |
Base asset loader. More... | |
class | AssetLoaderOptions |
Represents a series of asset loading options. More... | |
class | AssetLoaderZip |
Represents an Asset Loader which handles ZIP files (extracting them locally) and has synchronous and asynchronous methods. If you wish to simply load files from ZIP files without extracting them, use AssetLoader or AssetLoaderAsync instead. More... | |
class | AssetUnloader |
Represents an asset unloader. This class is added to your loaded GameObject if your AssetLoaderOptions.AddAssetUnloader flag is set to true. This class destroy every asset (textures, materials, meshes) used by your GameObjects if they are not being used anymore. More... | |
class | AssimpMetadataCollection |
Represents a series of AssimpMetadata related to the given UnityEngine.GameObject. More... | |
class | AssimpProcessPreset |
Represents the importing post process pressets. More... | |
class | BrowserFilesLoadedEvent |
Represents a browser file loading event. This event passes the number of files that was loaded by the browser, which could be used when calling the GetBrowserFileName and GetBrowerFileData methods. More... | |
class | CameraExtensions |
Represents a series of UnityEngine.Camera extension methods. More... | |
class | Dispatcher |
Represents a system for dispatching code to execute on the main thread. More... | |
class | FileUtils |
Contains file helper functions. More... | |
class | JSHelper |
Represents a series of Javascript helper functions. More... | |
class | MatrixExtensions |
Represents a series of UnityEngine.Matrix4x4 extension methods. More... | |
class | StreamUtils |
Contains stream helper functions. More... | |
class | StringUtils |
Represents a series of string functions. More... | |
class | ThreadUtils |
Contains Thread helper functions. More... | |
class | TransformExtensions |
Represents a series of UnityEngine.Transform extension methods. More... | |
class | TriLibProjectUtils |
Functions | |
delegate void | ObjectLoadedHandle (GameObject loadedGameObject) |
Represents an AssetLoader asset loaded event handler. More... | |
delegate void | MeshCreatedHandle (uint meshIndex, Mesh mesh) |
Represents an AssetLoader mesh creation event handler. More... | |
delegate void | MaterialCreatedHandle (uint materialIndex, bool isOverriden, Material material) |
Represents an AssetLoader material created event handler. More... | |
delegate void | AvatarCreatedHandle (Avatar avatar, Animator animator) |
Represents an AssetLoader avatar created event handler. More... | |
delegate void | AnimationClipCreatedHandle (uint animationClipIndex, AnimationClip animationClip) |
Represents an AssetLoader animation created event handler. More... | |
delegate void | MetadataProcessedHandle (AssimpMetadataType metadataType, uint metadataIndex, string metadataKey, object metadataValue) |
Represents an AssetLoader metadata processed event handler. More... | |
delegate void | BlendShapeKeyCreatedHandle (Mesh mesh, string name, Vector3[] vertices, Vector3[] normals, Vector4[] tangents, Vector4[] biTangents) |
Represents a blend-shape key created event handler. More... | |
delegate EmbeddedTextureData | LoadTextureDataCallback (string path, string basePath) |
Callback used to retrieve custom embedded texture data. More... | |
delegate EmbeddedTextureData | EmbeddedTextureLoadCallback (string path) |
Event used to pass a custom texture data when processing a texture entry. More... | |
|
strong |
Represents a component flags.
|
strong |
|
strong |
|
strong |
Represents an asset advanced config type.
|
strong |
Represents the asset advanced configs class names.
Enumerator | |
---|---|
ACImportEvalSubdivision | Configures whether the AC loader evaluates subdivision surfaces (indicated by the presence of the 'subdiv' attribute in the file). By default, TriLib performs the subdivision using the standard Catmull-Clark algorithm. |
ACImportSeparateBackfaceCull | Configures the AC loader to collect all surfaces which have the "Backface cull" flag set in separate meshes. |
ASEImportReconstructNormals | Configures the ASE loader to always reconstruct normal vectors basing on the smoothing groups loaded from the file. Some ASE files carry invalid normals, others don't. |
CalculateNormalsMaxSmoothingAngle | Specifies the maximum angle that may be between two face normals at the same vertex position that their normals will be smoothed together during the calculate smooth normals step. This is commonly called the "crease angle". The angle is specified in degrees. |
CalculateTangentsMaxSmoothingAngle | Specifies the maximum angle that may be between two vertex tangents that their tangents and bitangents are smoothed during the step to calculate the tangent basis. The angle specified is in degrees. |
CalculateTangentsTextureChannelIndex | Source UV channel for tangent space computation. The specified channel must exist or an error will be raised. |
ColladaImportIgnoreUpDirection | Specifies whether the collada loader will ignore the up direction. |
ColladaImportUseColladaNames | If this property is set to true, the Collada names will be used as the
|
DeboneThreshold | Threshold used to determine if a bone is kept or removed during the TriLib.AssimpPostProcessSteps.Debone step. |
DeboneAllOrNone | Require all bones to qualify for de-boning before any are removed. |
FBXImportReadAllMaterials | Specifies whether the FBX importer will read all materials present in the source file or take only the referenced materials, if the importer will read materials, otherwise this has no effect. |
FBXImportOptimizeEmptyAnimationCurves | Specifies whether the importer will drop empty animation curves or animation curves which match the bind pose |
FBXImportEmbeddedTextureLegacyNaming | Specifies whether the FBX importer will use legacy embedded texture naming |
FBXImportDisableDiffuseFactor | Specifies whether the FBX importer will disable materials color factor |
FBXImportStrictMode | Specifies whether the FBX importer will act in strict mode in which only the FBX 2013 |
FBXImportReadLights | Specifies whether the FBX importer will read light sources. |
FBXImportReadMaterials | Specifies whether the FBX importer will read materials. |
FBXImportPreservePivots | Specifies whether the FBX importer will preserve pivot points for transformations (as extra nodes). If set to false, pivots and offsets will be evaluated whenever possible. |
FBXImportReadAllGeometryLayers | Specifies whether the FBX importer will merge all geometry layers present in the source file or take only the first. |
FBXImportReadTextures | Specifies whether the FBX importer will read embedded textures. |
FBXImportReadCameras | Specifies whether the FBX importer will read cameras. |
FBXImportReadAnimations | Specifies whether the FBX importer will read animations. |
FindDegeneratesRemove | Configures the TriLib.AssimpPostProcessSteps.FindDegenerates step to remove degenerated primitives from the import immediately. The default behavior converts degenerated triangles to lines and degenerated lines to points. |
FindInvalidDataAnimAccuracy | Input parameter to the TriLib.AssimpPostProcessSteps.FindInvalidData step. It specifies the floating point accuracy for animation values, specifically the epsilon during the comparison. The step checks for animation tracks where all frame values are absolutely equal and removes them. Two floats are considered equal if the invariant |
IFCImportSkipSpaceRepresentations | Specifies whether the IFC loader skips over shape representations of type 'Curve2D'. A lot of files contain both a faceted mesh representation and a outline with a presentation type of 'Curve2D'. Currently TriLib does not convert those, so turning this option off just clutters the log with errors. |
IFCImportCylindricalTesselation | This is used by the IFC importer to determine the tessellation parameter for cylindrical shapes, i.e. the number of segments used to approximate a circle. |
IFCImportSmoothingAngle | This is used by the IFC importer to determine the tessellation parameter for smoothing curves. |
IFCImportCustomTriangulation | Specifies whether the IFC loader will use its own, custom triangulation algorithm to triangulate wall and floor meshes. If this is set to false, walls will be either triangulated by the post process triangulation or will be passed through as huge polygons with faked holes (e.g. holes that are connected with the outer boundary using a dummy edge). It is highly recommended to leave this property set to true as the default post process has some known issues with these kind of polygons. |
ImportNoSkeletonMeshes | Global setting to disable generation of skeleton dummy meshes. These are generated as a visualization aid in cases which the input data contains no geometry, but only animation data. So the geometry are visualizing the bones. |
ImportFavourSpeed | A hint to TriLib to favour speed against import quality. Enabling this option may result in faster loading, or it may not. It is just a hint to loaders and post-processing steps to use faster code paths if possible. A value not equal to zero stands for true. |
ImportGlobalKeyframe | Sets the vertex animation keyframe to be imported. TriLib does not support vertex animation. summary> Specifies a global key factor for scale, float value |
GlobalScaleFactor | |
ImproveCacheLocalityPostTransformCacheSize | Sets the size of the post-transform vertex cache to optimize vertices for. This is for the TriLib.AssimpPostProcessSteps.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. The default value has resulted in slight performance improvements for most Nvidia/AMD cards since 2002. |
IRRImportAnimFPS | Defines the output frame rate of the IRR loader. IRR animations are difficult to convert for TriLib and there will always be a loss of quality. This setting defines how many keys per second are returned by the converter. |
LimitBoneWeightsMaxWeights | Sets the maximum number of bones that can affect a single vertex. This is used by the TriLib.AssimpPostProcessSteps.LimitBoneWeights step. |
LWOImportOneLayerOnly | Configures the LWO loader to load just one layer from the model. 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 then 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 |
LWSImportAnimStart | Defines the beginning of the time range for which the LWS loader evaluates animations and computes AiNodeAnim's. TriLib provides full conversion of Lightwave's envelope system, including pre and post conditions. The loader computes linearly subsampled animation channels with the frame rate given in the LWS file. This property defines the start time. Animation channels are only generated if a node has at least one envelope with more than one key assigned. This property is given in frames where '0' is the first. By default, if this property is not set, the importer takes the animation start from the input LWS file ('FirstFrame' line) |
LWSImportAnimEnd | Defines the ending of the time range for which the LWS loader evaluates animations and computes AiNodeAnim's. TriLib provides full conversion of Lightwave's envelope system, including pre and post conditions. The loader computes linearly subsampled animation channels with the frame rate given in the LWS file. This property defines the end time. Animation channels are only generated if a node has at least one envelope with more than one key assigned. This property is given in frames where '0' is the first. By default, if this property is not set, the importer takes the animation end from the input LWS file. |
MD2ImportKeyframe | Sets the vertex animation keyframe to be imported. TriLib does not support vertex animation. |
MD3ImportShaderSource | Specifies the Quake 3 shader file to be used for a particular MD3 file. This can be a full path or relative to where all MD3 shaders reside. |
MD3ImportKeyframe | Sets the vertex animation keyframe to be imported. TriLib does not support vertex animation. |
MD3ImportSkinName | Tells the MD3 loader which skin files to load. When loading MD3 files, TriLib checks whether a file named "md3_file_name"_"skin_name".skin exists. 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. |
MD3ImportHandleMultiPart | Configures the MD3 loader to detect and process multi-part Quake player models. These models usually consit of three files, lower.md3, upper.md3 and head.md3. If this propery is set to true, TriLib will try to load and combine all three files if one of them is loaded. |
MD5ImportNoAnimAutoLoad | Configures the MD5 loader to not load the MD5ANIM file for a MD5MESH file automatically. The default strategy is to look for a file with the same name but with 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 behavior. |
MDCImportKeyframe | Sets the vertex animation key-frame to be imported. TriLib does not support vertex animation. |
MDLmportKeyframe | Sets the vertex animation key-frame to be imported. TriLib does not support vertex animation. |
MDLImportColormap | Sets the color-map (= palette) to be used to decode embedded textures in MDL (Quake or 3DG5) files. 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. If the file is not found, a default palette (from Quake 1) is used. |
OgreImportMaterialFile | The Ogre importer will try to load this MaterialFile. Ogre meshes reference with material names, this does not tell TriLib where the file is located. TriLib 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. summary> The Ogre importer will detect the texture usage from the filename. Normally a texture is loaded as a color map, if no target is specified in the material file. If this is enabled, then TriLib will try to detect the type from the texture filename postfix:
The matching is case insensitive. Postfix is taken between the last "</em>" and last ".". The default behavior is to detect type from lower cased texture unit name by matching against: normalmap, specular-map, lightmap, and displacement-map. For both cases if no match is found then, diffuse texture type is used. /summary> |
OgreImportTextureTypeFromFilename | |
OptimizeGraphExcludeList | Configures the TriLib.AssimpPostProcessSteps.OptimizeGraph step to preserve nodes matching a name in a given list. This is a list of 1 to n strings, whitespace ' ' serves as a delimter character. Identifiers containing whitespaces must be enclosed in single quotation marks. Carriage returns and tabs are treated as white space. If a node matches one of these names, it will not be modified or removed by the post-processing step. |
PreTransformVerticesNormalize | Configures the TriLib.PostProcessSteps.PreTransformVertices step to normalize all vertex components into the -1...1 range. |
PreTransformVerticesKeepHierarchy | Configures the TriLib.AssimpPostProcessSteps.PreTransformVertices step to keep the scene hierarchy. Meshes are moved to world-space, but no optimization is performed where meshes with the same materials are not joined. This option could be of used if you have a scene hierarchy that contains important additional information which you intend to parse. |
PreTransformVerticesRootTransformation | Configures the TriLib.AssimpPostProcessSteps.PreTransformVertices step to use a user defined matrix as the scene root node transformation before transforming vertices. |
PreTransformVerticesAddRootTransformation | Configures the TriLib.AssimpPostProcessSteps.PreTransformVertices step to use a user defined matrix as the scene root node transformation before transforming vertices. |
RemoveComponentFlags | Input parameter to the TriLib.AssimpPostProcessSteps.RemoveComponent step. It specifies the parts of the data structure to be removed. This is a bitwise combination of the TriLib.AiComponent flag. If no valid mesh is remaining after the step is executed, the import FAILS. |
RemoveRedundantMaterialsExcludeList | Configures the TriLib.AssimpPostProcessSteps.RemoveRedundantMaterials step to keep materials matching a name in a given list. This is a list of 1 to n strings where whitespace ' ' serves as a delimiter character. Identifiers containing whitespaces must be enclosed in single quotation marks. Tabs or carriage returns are treated as whitespace. If a material matches one of these names, it will not be modified or removed by the post processing step nor will other materials be replaced by a reference to it. |
SMDImportKeyframe | Sets the vertex animation key-frame to be imported. TriLib does not support vertex animation. |
SmdLoadAnimationList | Smd load multiple animations |
SortByPrimitiveTypeRemove | Input parameter to the TriLib.AssimpPostProcessSteps.SortByPrimitiveType step. It specifies which primitive types are to be removed by the step. This is a bitwise combination of the TriLib.AiPrimitiveType flag. Specifying ALL types is illegal. |
SplitByBoneCountMaxBones | Maximum bone cone per mesh for the TriLib.AssimpPostProcessSteps.SplitByBoneCount step. |
SplitLargeMeshesTriangleLimit | Sets the maximum number of triangles a mesh can contain. This is used by the TriLib.AssimpPostProcessSteps.SplitLargeMeshes step to determine whether a mesh must be split or not. |
SplitLargeMeshesVertexLimit | Sets the maximum number of vertices in a mesh. This is used by the TriLib.AssimpPostProcessSteps.SplitLargeMeshes step to determine whether a mesh must be split or not. |
TerImportMakeUVs | Configures the terragen import plugin to compute UV's for terrains, if they are not given. Furthermore, a default texture is assigned. 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. |
TransformUVCoordsEvaluate | Input parameter to the TriLib.AssimpPostProcessSteps.TransformUVCoords step. It specifies which UV transformations are to be evaluated. This is bitwise combination of the TriLib.AiUVTransform flag. |
UnrealImportKeyframe | Sets the vertex animation keyframe to be imported. TriLib does not support vertex animation. |
UnrealHandleFlags | Configures the UNREAL 3D loader to separate faces with different surface flags (e.g. two-sided vs single-sided). |
|
strong |
Represents the importing post process steps. This documentation is based on the latest Assimp branch. Based on: Assimp documentation.
Enumerator | |
---|---|
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, |
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. |
MakeLeftHanded | Converts all the imported data to a left-handed coordinate space. |
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:
|
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, 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 TriLib.AssimpPostProcessSteps.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. |
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. TriLib.AssimpProcessPreset.JoinIdenticalVertices is ///senseless/// then. This flag may not be specified together with TriLib.PostProcessSteps.GenSmoothNormals. |
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 TriLib.AssimpProcessPreset.GenNormals. There's a importer property, |
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 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. |
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.
|
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, but you can use the If you intend to perform the skinning in hardware, this post processing step might be of interest to you. |
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 TriLib'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:
This post-processing step is not time-consuming. Its use is not compulsory, but recommended. |
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 |
RemoveRedundantMaterials | Searches for redundant/unreferenced materials and removes them. This is especially useful in combination with the TriLib.PostProcessSteps.PreTransformVertices and TriLib.PostProcessSteps.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 TriLib'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 |
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. |
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 |
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:
|
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 TriLib.AssimpPostProcessSteps.GenSmoothNormals flag. |
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 TriLib 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. |
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
|
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 TriLib 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. |
OptimizeMeshes | A postprocessing 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 TriLib.PostProcessSteps.OptimizeGraph, if possible. The flag is fully compatible with both TriLib.PostProcessSteps.SplitLargeMeshes and TriLib.PostProcessSteps.SortByPType. |
OptimizeGraph | A postprocessing 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 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 TriLib.PostProcessSteps.OptimizeMeshes for best results.
|
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 The TriLib.AssimpProcessPreset.ConvertToLeftHanded flag supersedes this setting. |
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 |
SplitByBoneCount | This step splits meshes with many bones into sub-meshes so that each su-bmesh has fewer or as many bones as a given limit. |
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 |
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. |
|
strong |
|
strong |
delegate void TriLib.AnimationClipCreatedHandle | ( | uint | animationClipIndex, |
AnimationClip | animationClip | ||
) |
Represents an AssetLoader animation created event handler.
delegate void TriLib.AvatarCreatedHandle | ( | Avatar | avatar, |
Animator | animator | ||
) |
Represents an AssetLoader avatar created event handler.
delegate void TriLib.BlendShapeKeyCreatedHandle | ( | Mesh | mesh, |
string | name, | ||
Vector3 [] | vertices, | ||
Vector3 [] | normals, | ||
Vector4 [] | tangents, | ||
Vector4 [] | biTangents | ||
) |
Represents a blend-shape key created event handler.
mesh | UnityEngine.Mesh where the blend-shape key has been created. |
name | Blend-shape name |
vertices | Blend-shape key vertices. |
normals | Blend-shape key normals. |
tangents | Blend-shape key tangents. |
biTangents | Blend-shape key bi-tangents. |
delegate EmbeddedTextureData TriLib.EmbeddedTextureLoadCallback | ( | string | path | ) |
Event used to pass a custom texture data when processing a texture entry.
delegate EmbeddedTextureData TriLib.LoadTextureDataCallback | ( | string | path, |
string | basePath | ||
) |
Callback used to retrieve custom embedded texture data.
path | Texture path. |
basePath | Texture base path. |
delegate void TriLib.MaterialCreatedHandle | ( | uint | materialIndex, |
bool | isOverriden, | ||
Material | material | ||
) |
Represents an AssetLoader material created event handler.
delegate void TriLib.MeshCreatedHandle | ( | uint | meshIndex, |
Mesh | mesh | ||
) |
Represents an AssetLoader mesh creation event handler.
delegate void TriLib.MetadataProcessedHandle | ( | AssimpMetadataType | metadataType, |
uint | metadataIndex, | ||
string | metadataKey, | ||
object | metadataValue | ||
) |
Represents an AssetLoader metadata processed event handler.
metadataType | The AssimpMetadataType of the metadata. |
metadataIndex | The index of the metadata |
metadataKey | The key of the metadata |
metadataValue | The value of the metadata |
delegate void TriLib.ObjectLoadedHandle | ( | GameObject | loadedGameObject | ) |
Represents an AssetLoader asset loaded event handler.