Meshwork Manual

[ Overview ] [ Topics In Depth ] [ Reference ] [ Tutorial ] [ Import/Export ]

5. Import/Export Formats

5.1. 3DMF

3DMF ("3D Metafile Format") is a format defined by Apple as the standard file format for QuickDraw 3D, and now maintained by the Quesa team. It is a general and powerful scene-description language; Meshwork supports only a small subset of 3DMF. 3DMF may be represented in two very different but equivalent ways: human-readable text, or binary. Meshwork imports both kinds, but always exports binary. Free tools are available for converting from text to binary or vice versa.


Meshwork can import a subset of 3DMF, but only if Quesa or QD3D are available. If your 3D Preview window works, then you should be able to import 3DMF.

Meshwork only imports the following geometric primitives: TriMesh, Polyhedron, Mesh, Triangle. Other types of geometry are simply ignored. In addition, Meshwork imports only the structural geometry; textures and other surface attributes are not imported.

Meshwork imports both text and binary 3DMF.


3DMF is Meshwork's "standard" export format and the primary reason for its existence. Meshwork generates high-quality TriMesh geometry with full texture mapping, including support for translucent colors or textures. Textures are embedded directly into the 3DMF code.

This does not require Quesa or QD3D.

Meshwork always writes its 3DMF files in text form, but you can convert these to binary using a free tool such as Anatas.

5.2. 3DS

3DS is the format used by the modeling program 3D Studio. However, because it is a relatively simple format, it has become fairly commonly used by other applications as well.


Meshwork supports 3DS import of TRIMESH geometry, including UV texture coordinates and texture names.


On export, Meshwork generates a 3DS file containing all geometry and texture-mapping coordinates. In addition, the name of each material (set in the Material Properties dialog) is written out as the texture file name (the actual textures are part of 3DS).

5.3. DXF

DXF is a file format defined by the AutoCAD program, but like 3DS, has become more widely used. It is a fairly primitive format, with no support for texture mapping, but does a good job with segmented geometry of the sort used by Meshwork.


Meshwork supports the VERTEX and 3DFACE tags used to define triangular or quadrilateral faces. In the case of a quadrilateral face, Meshwork divides this into two arbitrary triangles.


Meshwork generates a DXF file with a 3DFACE for each triangle in the model. Material properties (color, texture mapping, etc.) are not preserved.

5.4. SKN (The Sims)

SKN is the file format used by the popular game The Sims. It's a complex format based on several standard skeleton structures. Support for SKN is still preliminary, but if you'd like to see it extended further, please be sure to let me know.


On import, the first thing Meshwork must do is determine which skeleton to use, since properly importing the geometry depends on that. Meshwork does this based on the first line of the file; if the 12th character is a "c" (as in "xskin-bi16mcchd_preppy-01-PELVIS-BODY"), the Child skeleton is used; otherwise the Adult skeleton is used. Object models (which don't use bones at all) should also work.

After that, the geometry should be properly imported, including texture coordinates and names. You'll still need to paste in the actual texture images into the Material Properties dialogs. Bone assignments are partly imported; blending data (i.e., attachment of a vertex to more than one bone) is currently ignored, but most SKN models don't seem to suffer from this too much.


Meshwork does not currently support export to SKN format.

5.5. POV-Ray

POV-Ray is a free, open-source ray-tracing application which can produce extremely high-quality results. Meshwork can write out files which can be used in POV-Ray scenes.


Meshwork does not support import of POV-Ray files. Doing so would be quite impractical, since POV-Ray files comprise a complex programming language.


Meshwork generates a POV-Ray file containing one "mesh" object for each geometry, enclosed in a union so that they can be treated as a single object. The meshes use "smooth_triangle" or "triangle" depending on whether you have chosen the Smooth option for each material. Colors and texture maps are supported, however, pinned-mode texture mapping is not yet supported.

POV-Ray 3.1 and earlier had no geometry which allowed efficient definition of arbitrary UV texture coordinates (i.e. pinned-mode texture mapping). However, version 3.5 of POV-Ray recently became available, and it sports a new geometry type which makes support for pinned-mode texture mapping possible. If that's something you need, please let me know.

5.6. VRML

VRML (Virtual Reality Modeling Language) is a 3D file format sometimes used on the web, and in a number of other applications. It's a complex scene description format which is easy to write, but rather difficult to read.


Meshwork does not support import of VRML scene files.


Meshwork generates VRML 2.0 files containing an IndexedFaceSet for each material, grouped together into one object. It supports both solid color and texture mapping, with UV coordinates. Textures are not part of the VRML file, so Meshwork exports a dummy file name of "texture0.jpg" for the first material, "texture1.jpg" for the second, and so on.

The standard scale for VRML is 1 unit == 1 meter, which would make typical Meshwork files way too large. So all vertex coordinates are scaled by a factor of 0.01 when exporting to VRML.

5.7. Bones

In addition to the standard formats above, Meshwork has one export format unique to Meshwork itself. This is a Bones export file. A bones file contains not only information on the bones of the model, but also on the attachments of all vertices of the model to the bones. This can be used in conjunction with one of the other export formats above to provide skeletal animation.

The Bones file is a BigEndian binary format, beginning with a version code (2 bytes, currently equal to 0x0200), followed by the number of bones (2 bytes). Then for each bone, we have the following:

  1. 4-byte bone code
  2. bone position (3 floats)
  3. 2-byte index of parent bone

Next comes the number of meshes (2 bytes), followed by data for each mesh:

  1. number of points (2 bytes)
  2. for each point:
    1. index of first bone (1 byte)
    2. index of second bone (1 byte)
    3. weight to first bone, in percent (1 byte)

Meshwork Manual Section 5: Import/Export
Last modified: 09 May 2003

[Back to Index]