DMesh uses a left handed coordinate system for mesh generation and viewing. Options to provide for a right handed (or other) system will be considered given sufficient interest. Please refer to the contact information page if you would like to make a comment in this regard.
DMesh is heavily reliant on the use of a modified uvw+ coordinate system, with the uv components being somewhat simliar to an st or texture coordinate system, and with the w component varying in type. All information within D-Mesh is retained internally in this coordinate system, with valid values for uv generally ranging from 0.00 to 1.00 inclusive. (The w component is maintained internally, so only the uv portion need concern us here.)
These coordinates are subsequently converted to appropriate xyz values for exporting or mesh viewing. The exact conversion is heavily dependant on the type of the w component, but in general can be thought of in the following terms:
Planar: <u,v> = <0,0> is located at the origin, with increasing u moving in the postive x direction, and increasing v moving in the positive z direction.
Conic: u ranges from 0.00 to 1.00 about the circumference of the object in a counter-clockwise direction, (starting at <x,y,z> = <1,0,0>) while v ranges from 0.00 at the base to 1.00 at the apex.
Spheric: The same as for conic, although the basic shape is spheric rather than conic. The uv portions can be thought of as the equivalent of latitude and longitude. Exported meshes will be centered at the origin.
Disc: u ranges from 0.00 to 1.00 about the circumference of the object in a counter-clockwise direction starting at <x,y,z> = <1,0,0>, (the same as for conic) while v ranges from 0.00 at the inside of the disc to 1.00 at the outside edge.
Toric: u follows the cross-sectional circumference of the outer or small 'ring', while v follows the length of the surface about the 'hole'.
Overlays, Sheets and Clothes: (Not yet implemented.) The uv coordinates for the cloth 'sheet' will act in the same manner as for planar surfaces, although they will be internally modified (along with w) to reflect the underlying surface. The u1v1 coordintates can be used to reference the underlying reference surface.
Other: Please refer to the documentation included with the specific surface plugin.
It is sufficient to understand these two uv components to attach muscles or create distortion surfaces. If you wish a little extra information regarding the resulting distortion surface, refer to the following W+ Distortions section.
Additional distortions to the base surface will be performed depending on the musculature definitions, bending and tension constraints, etc.The exact distortion is heavily dependant on whether the w component is a single value, a three-value, or a multi-valued space-time-gravity-tension-plus value. In general it follows these priciples:
If w is single-valued, displacements will occur in the direction of the surface normal. This surface normal is in reference to the basic shape of the mesh (ie planar, conic, spheric etc.) and is therfore not reliant on specific muscle definitions.
If w is a three-value, displacements will occur in xyz space. (currently N/A)
If w is multi-valued, a range of additional factors will be evaluated such as time, surface tension, gravity, collision detection, etc. (also currently N/A)
The default orientation for most models puts the back at u=0.00, the right side at u=0.25, and the front at u=0.50. Placing the 'front' of the model at u=0.50 is a preference of mine, since it leaves the most latitude in both directions without having to consider the wrap-around from 0.00 to1.00 or back. The front is also generally the part of the object most concerned with for modelling and rendering, and the area where there will likely be the most detail. On the other hand, if creating the back of something, place u=0.5 in the 'center' of the back.
In general, I attempt to place u=0.50 at the point where I expect there to be the most detail. In many cases, you will desire to place a muscle on either side of the center, (such as abdominals or cheeks,) and it seems easier to mentally add and subtract 0.125 from 0.50 than from some other value such as 0.25. In addition, this specific task is easily implemented using the muscle mirroring options, while attempting to mirror an object about position will require manual editing.
In addition, the uv clipping feature allows you to export a portion of the mesh by specifying a low and high value for either u or v. If the model is centered at 0.50, you can choose a clipping range such as 0.25 to 0.75, and generate only the front portion, while ignoring the back. If the model is centered at 0.00, there is no way that you could export starting at 0.75, move to 1.00, and then wrap back around to 0.25.
This orientation has the strange result that the exported model will have the front facing in the negative x direction. As far as D-Mesh is concered, the actual xyz facing of the model is completely irrelavant, but it may seem a strange orientation for other's. I will probably add an option so the user can specify the proper orientation for export, but for present, you will need to supply a rotatation within the renderer to provide the proper viewing direction.