DMesh Documentation - Layers


Overview

DMesh is composed of a multi-layered geometry editing system. Two primary layers will exist in all models: the Anatomy Layer and the Basic Shape Layer. These define the basic 3 dimensional shape of the object. Additional User Defined layers are created to contain specific muscle definitions.

Each layer contains a name, a default texture ID, a scaling factor and an active flag.

The activation flag will enable or disable the layer, and it will be ignored by any subsequent calculations.

The scaling factor allows the height of the entire layer to be scaled as a whole. For example, a layer containing vein definitions could be scaled larger to make them more prominent, (and thereby simulate additional 'muscle stress',) or smaller for the opposite effect. Setting the scaling factor to a negative value is an easy way of producing an indent or dip, such as a belly-button.

The default texture ID is applied to all muscles in the layer that don't have a specific texture defined, (ie the muscle TextureID is 0 ) If the layer TextureID is set to 0, the layer texture will default to that of the object.

The layer name is simply a user definable string used for dialog boxes and menu items.

Layers are combined additively, with later layers being added 'on top of' existing layers. Within a single layer, muscle displacements will be calculated as the maximum of all active muscles. If you wish a muscle to appear 'on top of' another muscle, (such as a vein on top of a bicep muscle,) place the two muscles in different layers. In cases where the muscles should merge, such as the nose and forhead bones, the muscles should be placed in the same layer.


Anatomy

The Anatomy Layer defines the components and constraints for multi-part objects. For an object such as a arm, it will define the number of parts (ie hand, wrist, forearm, upperarm and shoulder) along with their relative lengths and any curvature and bending information. The Anatomy layer has three individual components: Segments, Bone Curvature and Joint Bending.

(Please not that the actual technical details of how the components of this layer are interpreted may very well change, although these three components will be the minimal implementation.)

Segments

The Segments definition uses the same control point definition layout as used throughout DMesh, but with subtle and significant differences in how the control points are interpreted. Each control point entry (each <x,y,z> triplet,) describes one segment of the object. The y component describes the total length of this segment, while the x and z components describe the width of the joint at its upper end.

(Note that the x and z components refer to the joint, rather than the segment! This implementation has a very high probability of changing in future versions, but has an even higher chance of remaining the way it is.)

The y component describes the absolute length of this segment and will be summed to calculate the overall length of the object. If there are three segements, all with a y component of 1, the total object will be three units long.

The x and z components are entered as percents, and should be kept in the range 0.00 to 1.00. Negative values will be clipped to 0.00, while values greater than 1.00 will be retained as entered. The x component describes how much of the joint is built from the current segment, while the z component defines how much of the joint belongs to the next segment.

Bone Curvature

Most humanoid (and other) limbs are not perfectly straight, and the underlying bones generally have a slight curvature to them. Limbs are generally created using a conic object, which has a well defined but perfectly straight center line. The Bone Curvature option is intended to address this tendency by allowing the center line to be slightly offset from the actual center line of the conic.

Bone Curvature is defined by a curve in the same manner as curves are entered throughout DMesh. In this case however, an actual <x, y, z> triplet is entered for each control point. The x and z components define the amount and direction the center line will be offset at each point along its length. The y component is generally kept within the 0.00->1.00 range to properly reflect its relationship to v. Note that the conic will not actually be bent or rotated, but skewed and/or offset in the x z directions.

A Bone Curvature definition such as: <0, 0, 0>, <0.5, 0.5, 0>, <0, 1.0, 0> would slighly bow the object in the x direction; while <0, 0, 0>, <0, 0.5, 0.5>, <0, 1.0, 0> would slighly bow it in the z direction. You can combine both x and z values to create objects that curve in both directions.

(Future enhancements to this option will likely implement true bending of the object to follow the tangent of the control curve. At present, it is meant only to supply small deviations to the object center.)

Joint Bending

The joint bending entries also use the control point definition layout, with slight modification. Each entry accepts four components defined as <x,y,z,twist>. All four components are entered in degrees, so typical entries are generally within the range of plus or minus 0 to 360. This is not enforced, so values outside this range can be used if required.

The joints are defined as the top of each segment, with their total length being determined by the x and z components of the segments section. The bends themselves are actually performed in the reverse order, so the limb is first twisted, then bent around the z axis, followed by bending about the y axis, and finally the x axis. This means that the specified bends are absolute, and it is not required to compensate for the order of rotations.

The bends are also applied in the reverse order. This results in the origin of the limb being changed to the apex of the object. I realize putting the origin at the apex rather than the base will seem backwards to many people, (including myself,) and every effort will be made to at least offer a choice in the matter, if not completely clarify the situation.


Basic Shape

The Basic Shape Layer defines the basic displacement to be added to the object as a whole. For a planar object, this describes any general curvature or waviness. For a conic object, it will describe the basic cross-sectional shape to be extruded, and the basic radius at any given point along its verticle axis.

The x-section defines the basic shape of the object in the u direction. For conic objects, this is similiar to an extruded surface, while for planar objects, it is closer to an ribbon type of object.

The radius defines the basic shape of the object in the v direction. For conics, this is very similiar to a lathe or surface of revolution object. For planar objects, this is again similiar to a ribbon, but in the v direction


Muscle Definitions

User defined layers are used to contain the definitions of the muscles that will be overlayed on the basic shape. The actual number and names of these layers is user definable, so will vary between models. Three default layers are created with each new model, but these are suggestions only, and can be changed to suit the specific modelling requirements.

In addition to the muscle definitions, all layers can also contain image-based information. (At present, most of the image manipulation features are disabled, so you are currently limited to importing existing images.) Once an image has been imported into a layer, all of the standard mesh generation features are available for use. An image must be imported into a specific layer. At present, only one image per layer is supported