Model.Read
Fields / Optional
format
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'
The CMH model file format ('Compiled Model Hierarchy', proprietary)
Write supported: yes
IANA media type: none
File extensions:.cmh
-
'GLB'
The GL Transmission Format Version 2.0 - Binary
Write supported: no
IANA media type:model/gltf-binary
File extensions:.glb
-
'GLTF'
The GL Transmission Format Version 2.0 - JSON
Write supported: no
IANA media type:model/gltf+json
File extensions:.gltf
-
'LAS'
The LAS model file format.
Write supported: no
IANA media type:application/vnd.las
File extensions:.las
-
'OBJ'
The OBJ model file format.
Write supported: yes
IANA media type:model/obj
File extensions:.obj
The following commands are supported in
*.obj
files:-
v X Y Z
(vertex coordinates) -
v X Y Z R G B
(vertex coordinates with color) -
vn X Y Z
(vertex normal vector) -
vt X Y
(vertex texture coordinates) -
s N
(smoothing group for normal vectors) -
f A1 B1 C1 …
(polygon face) -
f A1/A2 B1/B2 C1/C2 …
(polygon face) -
f A1/A2/A3 B1/B2/B3 C1/C2/C3 …
(polygon face) -
mtllib NAME
(select material library) -
usemtl NAME
(select material)
The following commands are supported in
*.mtl
files:+
-
newmtl NAME
(define new material) -
Ka R G B
(ambient reflectivity) -
Kd R G B
(diffuse reflectivity) -
Ks R G B
(specular reflectivity) -
Tf R G B
(transmission filter) -
d V
(material dissolve) -
sharpness V
(glossiness) -
map_Ka NAME
(ambient texture map) -
map_Kd NAME
(diffuse texture map) -
map_Ks NAME
(specular texture map) -
map_d NAME
(dissolve texture map)
-
-
'ASSIMP5'
Uses Open Asset Import Library (v5.*), if installed.
winding
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.
texturePath
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.
transform
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.
modelNames
Names of the model nodes to keep, including their hierarchical structure.
If Read.Flags.ModelNames is present, this property is ignored.