Geometry Types

Triangles vs. Quads

Meshes in Blender can be made up of triangles or quads.  The DTS File format requires meshes to be made up exclusively of triangles.  The exporter will convert quads to triangles automatically.  Quads may also be converted to triangles within blender prior to export, but this is not required.

Converting quads to triangles in Blender

To convert a mesh's polygons from quads to triangles:

  1. Select a Blender mesh object and switch the 3d view into edit mode.
  2. Select all faces and press ctrl-t.  The mesh is now made up of only triangles.

Three ways to store triangles inside a dts file

Triangles can be stored inside a DTS file in several different ways.  The method that is used to pack the triangles inside a dts file also has a direct effect on how the triangles are rendered and on in-game performance (frame rate).  The following options are available on the Shape Options panel of the exporter user interface.

Triangle Lists

The "Triangle Lists" export mode stores triangles with a given material mapping in a single triangle list primitive. This is the fastest and most efficient method of storing and rendering geometry on almost all graphics cards; this is also the default geometry export mode as of version 0.97 of the Blender DTS exporter.

Triangle Strips

The "Triangles Strips" export mode stores triangles inside triangle strip primitives. When enabled, Triangle Strips are created using the exporter's built-in triangle stripper by default. The VTK triangle stripper is also supported. Triangle Strips are slower to render than Triangle Lists on most graphics cards.

"Triangles"

In this mode, each individual triangle in a mesh is stored by itself in a separate list (each "list" contains only one triangle). Triangles is the most inefficient possible way of storing and rendering triangles.  Packing single triangles into each triangles (triangle list) primitive is a bit crazy on the surface, but it's mainly there for backwards compatibility. Several other dts exporters for different modeling applications pack single triangles into each triangle strip as their only mode of export.  This is made somewhat viable by having the engine convert the geometry to proper triangle lists on load (see notes below).

 

Summary

Use triangle lists whenever possible

Modern graphics cards and drivers are more optimized for rendering triangle lists than triangles strips. While exporting using triangle strips is supported, triangle strips simply do not achieve the kind of perfromance available when using triangle lists on most GPUs.

There is a shadow rendering bug in TGE versions prior to 1.5.1 when using models exported with "Triangle Lists" primitives. A fix for the shadow bug and another related bug can be found here: www.garagegames.com/community/forums/viewthread/56570.  Newer versions of TGE and TGEA do not suffer from this problem.


Notes: