Wavefront OBJ Import

From Terragen Documentation from Planetside Software
Revision as of 08:28, 13 September 2012 by Jo (talk | contribs)
Jump to navigation Jump to search

Terragen can import a limited form of Wavefront OBJ files (.obj extension). It can import geometry and material information.

Geometry

TG only imports three and four sided polygons. Polygons with 5 or more vertices/sides are not supported. It also doesn't support freeform/spline curves or surfaces like NURBS.

TG can load normals and texture coordinates.

TG loads groups and objects and any materal assignments for them. See below for more information on materials.

Materials

TG can read material data from an MTL (.mtl extension) file referenced by the OBJ file.

TG reads diffuse and specular values from the MTL file. It can also load a diffuse texture file in any of the image formats TG supports.

Nodes Created

OBJ files are loaded by an Obj reader node. Materials are added to an object using a Parts shader node which is created in the internal network of the Obj Reader node. Each group of the object with a material assigned also has two further nodes created for it in the internal network on the Parts shader. For each group an Object part node is created. This node has a Default shader assigned to it which holds the actual material settings loaded from the MTL file. If you want to change the material settings then you need to go down through these internal networks and change the Default shader for that particular part of the object.