DMesh Documentation - Exporting

Mesh Types

Geometry Formats

Image Types

Image Formats


Mesh Types

Skinned

Exporting the object in this format will create a skin that will be wrapped around all active layer and muscle defintions to produce a smoothed-surface set of polygons. For objects with layers containing clothes, hair or other overlays, these external layers should be disabled prior to export. This results in only the underlying object being used in the creation of the skin. This will ensure that the overlays will appear on top of the skinned object, instead of being included with in the skin itself.

Layered

This option will export only the polygons associated with the selected layer(s). These are generally external objects such as clothes and hair. It is also useful for creating thin muscle overlays that have a much higher resolution than the underlying skin. For example, thin muscles such as eyelids would require a very high resolution skin in order to properly display them in detail, but this amount of polygon resolution would likely be very redundant in low resolution areas such as the forhead. Putting these specific items in a separate layer, and exporting them separately, will allow the basic object to have a lower polygon count, while the eyelids themselves can contain as much detail as is required.

Differences in uv coordinates

With the skinned export option, uv coordinates will be relative to the object as a whole. With the layered option, uv coordinates will be relative to the individual muscle. The v coordinate will range from 0.00 to 1.00 along the length of the muscle, while the u coordinate will vary across it.

For example, a headband would be defined as an orbital muscle that wrapped around the head object. The length of the muscle/headband would then be around the head, and v would vary in this direction. The u coordinate would then vary across the width of the headband.

This means that the uv coordinates will actually be in muscle (or headband) space rather than absolute uv space. This makes applying textures to the object a much more straightfoward and (I hope) intuitive process. This is equally true for many overlay objects - eye shadow will be much more easily applied in eyelid muscle-space, than would be possible in absolute uv space. Hair is also much easier to color in hair space, than it would otherwise be in uv or xyz space.

(comments welcome - and a user selectable option is likely in order.)


Geometry Formats

RAW is a plain ASCII text format that lists one triangle per line. It can also optionally contain normal and uv/texture coordinates, as well as texture names and comments. The texture names are applied to all following triangles, and remain in effect until another texture defintion is encounterd. Comments are specified by having the first non-whitespace characters as // (double slashes) Some implementations require that the double slash be followed by at least one space, and so DMesh will always use double-slash-space.

The posible layouts for a single line are:

  1. x1 y1 z1 x2 y2 z2 x3 y3 z3

  2. x1 y1 z1 x2 y2 z2 x3 y3 z3 nx1 ny1 nz1 nx2 ny2 nz2 nx3 ny3 nz3
  3. x1 y1 z1 x2 y2 z2 x3 y3 z3 nx1 ny1 nz1 nx2 ny2 nz2 nx3 ny3 nz3 u1 v1 u2 v2 u3 v3
  4. x1 y1 z1 x2 y2 z2 x3 y3 z3 u1 v1 u2 v2 u3 v3
  5. TextureName
  6. // comment

Note that not all RAW readers will support the fourth option, and will require that normals be included as well. In this case, use the option three layout. Note that the only delimiters used are spaces and line feeds, commas and/or angle brackets are not used.

POVray export is included for the freeware Persistence of Vision ray-tracing program. Objects can be exported as triangle meshes, or as smooth-triangle meshes by specifying the 'include normals' export option. Support for uv coordinates is not currently implemented, since the official build of POVray does not support this feature.

The customized UVPOV build does support uv coordinates, so the inclusion of uv coordinates will be supported pending clarification of the proper method to implement this layout.

(any additional comments or suggestions on how to implement uv coordinates and texture names in a format suitable for POVray and its variants would be greatly appreciated!)

BMRT support is supplied in PointsPolygon or Subdivision mesh format. The PointsPolygon format supports the inclusion of both normal and uv/st information. The Subdivision mesh format is experimental. Although this option works with the BMRT implementation of this structure, the results have not been verified to be consistent to the PRman implementation. It is therfore possible that this option will be discontinued.

There is also enhancements underway to provide export options for displacement shaders and possibly DSO's. Any advice and or assistance in this area would be greatly appreciated.


Image Types

(under construction)


Image Formats

Exporting of image maps is accessed from the File:Export:TGA menu item.

This option acts slightly different depending on the status of the current view window:

Currently supported bit depth formats are:

(Note: D-Mesh muscle displacements are in no way constrained to fit within the 0.00->1.00 range. When exported at 8-bit depths, 'wrap around' artifacts can be present in the exported image maps, as values of greater than 1.00 are wrapped around to fit the 256 levels. (ie 0.5 = 127 and 1.5 = 127) For the present, Layer Scaling can usually solve this situation. Additional support and user definable options will become available as the image manipulation features are activated.)