About this document
Rules can be used in InstaLOD Studio XL and InstaLOD Pipeline for various purposes, reaching from automated data preparation, to file analysis over to mesh operation filtering.
A rule can match a wide range of object attributes that can be split into two different types. While some attributes require a regular expression, others can be matched by a combination of numerical and logical expressions.
Regular expression matching
The following attributes can be matched by regular expressions (ECMA, ignore-case):
|Path||Node hierarchy path|
|(Custom Attribute)||Any user-defined attribute within a mesh's metadata can be used. Select the 'Object Inspector' in InstaLOD Studio XL to review all available custom attributes on a selected mesh.|
Match value expressions
Some attributes can be matched using relational operators. Multiple expressions can be combined with the logical operator
AND. The following expression matches all values within the range from 500-20000:
>= 500 and <= 20000
For example, it could be used to match a scene rule with all meshes with the given polygon count.
These attributes support match value expressions:
|Node.ChildCount||Amount of child nodes|
|Node.Path.Depth||Depth of nodes a root-node can have|
|Mesh.Vertex.Boundary.Count||Vertex count along a boundary|
|Mesh.BoundingBox.Volume||Bounding box volume in units|
|Mesh.BoundingSphere.Radius||Bounding sphere radius in units|
|Mesh.WedgeColorSet.Count||Amount of vertex color sets|
|Mesh.WedgeTexCoordSet.Count||Amount of texture coordinate sets|
|Mesh.AABB.Mins.X||Minimum AABB boundary of mesh in X-Axis in units|
Minimum AABB boundary of mesh in Y-Axis in units
|Mesh.AABB.Mins.Z||Minimum AABB boundary of mesh in Z-Axis in units|
||Maximum AABB boundary of mesh in X-Axis in units|
||Maximum AABB boundary of mesh in Y-Axis in units|
|Mesh.AABB.Maxs.Z||Maximum AABB boundary of mesh in Z-Axis in units|
InstaLOD Analysis Profile
Match rules are utilized in InstaLOD's analysis profile for data scoring. When performing an analysis, InstaLOD assigns scores based on a set of match rules that are defined in the profile. Match rules can be used here with the previously mentioned attributes to either increase or decrease the overall score when a rule matches a mesh. Additionally, an analysis profile contains scene rules that affect the analysis score based on certain scene metrics. These can be evaluated through the following attributes:
|MeshCountMinimum||Minimum amount of meshes in the scene|
|MeshCountMaximum||Maximum amount of meshes in the scene|
|HierarchyDepthMaximum||The maximum depth of a hierarchy structure|
|SceneDimensionsMins||Minimum scene dimensions in XYZ
Example: "-100 -100 -100"
|SceneDimensionsMaxs||Maximum scene dimensions in XYZ
Example: "100 100 100"
InstaLOD Pipeline is shipped with an example profile that demostrates how an analysis operation can be configured. After installing InstaLOD Pipeline, it can be found under "Profiles/Analyze.json".