TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class Tinman.Model.Read

Short Name:
  • class Read
Derived From:
Fields:

Reads the given 3D model file.

Fields

The following table lists all fields of this config type.

Field Type Constraint Default
required data Data
# != null
 

The 3D model file to read.

optional format string  
null

The 3D model file format. If unknown, the format is inferred from the data stream.
The following default model file formats are available:

  • 'Any'
    Automatic model format

  • 'CMH'
    Tinman 3D Compiled Model Hierarchy

  • 'LAS'
    LASer (LAS) File Format 1.3

  • 'OBJ'
    Wavefront OBJ

  • 'OFF'
    Object File Format

  • 'ASSIMP'
    Uses Open Asset Import Library (any version), is installed.

  • 'ASSIMP3'
    Uses Open Asset Import Library (v3.*), if installed.

  • 'ASSIMP4'
    Uses Open Asset Import Library (v4.*), if installed.

optional winding number  
0

Fix vertex winding of indexed triangle list primitives:
Given a triangle (a,b,c), vertex winding is fixed using the face normal N and the cross product X=(b-a)x(c-a):
> 0: Fix triangle winding so that dot(N,X) is positive.
< 0: Fix triangle winding so that dot(N,X) is negative.
= 0: Do not fix triangle winding.

If the model does not have normal vectors, vertex winding will never be fixed. This fix is applied after Read.Flags.FlipWinding.

optional flags Read.Flags[]  
[None]

The model reader flags to use.

optional gloss number  
1

Scale factor to apply to Model.Material.gloss of all read materials.

optional reflectivity Tinman.Color  
Colors.White

Modulation color to apply to Model.Material.reflectivity of all read materials.

optional material Model.Material  
null

The material to use for the model root node.

optional unit Unit  
null

The unit of measure to use for the model root node.

optional texturePath path
# != null
<.>

The base directory to use for resolving relative texture file paths in the 3D model.

The given base directory can be relative; in this case, it will be resolved using the path of the directory that contains the model file. If there is no path info for the model data, the current filesystem directory is used instead.

optional transform Mat4  
[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0,
  0, 0, 1]

Optional transformation matrix to apply to the model geometry.

The transformation matrix is applied as the last transformation step, before the custom post processors are invoked.

optional postProcess Processor[]  
null

Custom model post processors.

optional textureName Read.Name[]  
null

Specifies substitutions for texture names.

optional textureFile Read.File[]  
null

Specifies replacements for texture files.