D-Mesh Tutorial I - Basic Shape Editing

Basic Shape Editing.

D-Mesh 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 are both accessed from the Object:Muscles menu item.)

The Anatomy Layer defines the components and constraints for multi-part objects. For an object such as a arm, it defines the number of parts along with their lengths, curvature and bending information.

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 radius at any given point along its verticle axis.


The following examples will take you step by step through creating some basic shapes

Basic Shape Editing: X-Section
Start D-Mesh. You will be presented with a dialog box allowing you to select what type view you wish to start with. Select UV Map if it not already selected. The Displacement View draws quite slowly, and since we will not be using any images in this section, the UV Map view will be sufficient and faster.

Now we will create a window to view the object in 3D. Select the Window:3DPreview menu, and a new window will be created showing the default object. The most common shape used in creating humanoid objects such as arms, legs and heads is the conic, and this is the default shape used for new objects.

(default object view)

The following example covers the shape cross-section properties, and this however, is more easily illustrated using a planar object. Our first task then, will be to change the basic shape from a conic to a planar object. Select the Object:Properties menu item, and in the Basic Shape section, change the radion button selection from Conic to Planar. Click OK to apply the change, and our object has been converted to a planar (or heightfield) object. (Note that changing the Basic Shape can be performed at any time, and is completely independent of any musculature definitions. You can therefore create a face based on a conic object, and convert it to a planar object with a single mouse click.)

Our 3D view will appear to go blank, but this is because the view is displaying the planar object directly from the edge. We need to rotate the object slightly to view it from a different angle. Click and hold the left mouse button in the middle of the 3D Preview window, and drag towards the bottom of the window. The object will rotate into view. Dragging in the up or down direction will rotate the object about the X axis, while dragging left or right will rotate about the Y axis. (see the OpenGL Mouse Commands documentation section for additional keyboard and mouse controls for the 3D view.)

We will now make some simple changes to the basic object shape

From the menu, choose Object:Muscles:Basic Shape and you will be presented with a dialog box allowing the basic shapes information to be modified.

(note that the default object texture has changed from red to green since the images for this tutorial were intially created. Therefore, your view will show the following objects in green rather than red.)

(1)

(2)

(3)

1) In the Control Points edit box in the X-Section area, replace <0.0000,1.0000> with <0,0>,<0.5,1>,<1,0>

Since we are working with a planar object, the X-Section defines the height of the object in the horizontal direction. The view will appear similiar to this

2) If we now return to the Basic Shape dialog and change the repeats value to 2, we will see that the basic 'roof peak' shape is repeated twice across the object.

3) Return to the Basic Shape dialog again: change Repeats to 3, and change the Curve Type from Polyline to Cat Rom. We now have three repititions, and they are now much smoother since the displacement is calculated as a Catmull-Rom curve, rather than a simple polyline.

Basic Shape Editing - Rope
This section will cover using the Basic Shape layer as applied to a conic object. We will create a simple, 3-strand rope object.

Close all windows, then select the File:New menu object to create a default object. Again select UV Map for the initial view. Create a 3D view window by selecting the Window:3D Preview menu. We will be manually entering Control Point information, and you may wish to briefly review the Curves documentation and specifically its Defining Control Points section.

The view will appear as shown here.

Next, we increase the length of the object to be more representative of a rope

1) Select the Anatomy layer from the Object:Muscles menu, and change the segments edit box to read <0.25,6.0,0.25>

2) Use the <ctrl><shift><drag-mouse-up> combination to move the object away in the z direction until you can see the entire object. (You may wish to resize the 3D window to provide addition viewing space.)

Next, we add the three rope strands. Select the Basic Shape layer from the Object:Muscle menu. In the X-Section area, make the following changes

1) change the Control Points edit box to <0,0>,<0.5,1>,<1,0> and set the Repeats value to 3. If we click OK, we will get an object similiar to this, except the strands will be much pointier.

2) Return to the Basic Shape layer, change Scale to 0.50, and Base to 0.50. The view will then be as shown here.

The Scale value is applied directly to

The Control Point value components are multiplied by the Scale value, and therefore provides a global scaling of the curve. The Base value supplies the starting or base value for the curve. Our X-Section curve therefore ranges from 0.00->0.50 due to the scaling factor, but is further offset by 0.50 due to the Base factor. This results in the curve actually ranging from 0.50->1.00

Next we add a little twist to the object to give it a that twisted rope-like appearance.

First lets set the view type to wire frameso we can more easily understand the effects of the twist value. From Preview:Type menu, select the Wire item.

Then, select the Basic Shape layer, and in the X-Section area, change the Twist value to 1.0. This will give the object a full twist, and should appear as shown here. Note that the polygons themselves are twisted, thereby ensuring that the edges are properly defined. The twist value can range from 0.00 to as high as needed. Fractional values are supported, so entering 0.25 will provide a one-quarter twist to the object.

(1)

(2)

(3)

1) Now set the view type back to smooth shaded by selecting the Preview:Type:Smooth menu, and we will have a view similiar to this. The polygon edges are still fairly obvious in this view, so lets double the polygon resolution from its default value of 20.

2) Select the Object:Properties menu item, and in the resolution section, change the U field to 42, (not 40!) This will increase the number of polygons resolution in the U direction (ie 'around' the object.) We have three strands (ie repeats,) in this surface, and so the number of polygons should be an even multiple of this number in order than the edges are properly created. The number 42 was chosen since we wanted to double the resolution, and this was the next multiple of 3 after 40.

3) The 'strands' are actually fairly 'pointy' now that the resolution has been increased. This is because the shape is being calculated as straight lines. We can change this behaviour to give a smoother curve. Select the Basic Shape layer agin, and change the Curve Type from Polyline to CatRom. The polyline curve type connects the control points with a simple straight line. The CatRom type will use the Catmull-Rom curve basis to connect the points, and results in a smooth curve.

We can see that it is getting pretty close to resembling a rope, although admittedly a rather short, fat one. These could be stacked on top of each other to make a longer piece.

However, lets make this small piece into a longer more rope-like object with some bend. First, return to the Object:Properties dialog, and increase the V polygon resolution to 40. The next steps will require the additional resolution.

Return to the Basic Shape layer, and in the X-Section area, change the Scale and Base values to 0.25 and 0.75 respectively. This will make the strands a little less prominent. Then increase the Twist value from 1 to 3.

Finally, in the Radius section, change the Scale value to 0.25. This will result in the overall radius of the cone being reduced to one quarter of its original size. We now have a long skinny piece of rope that twists around rather nicely.

Next, we add a little bend to the rope, since they are rarely perfectly straight. Select the Anatomy layer again, and click on the Bone Curvature check box. This will enable the the edit box, and allow us to specify a curvature for the object. In the edit box, enter these values.

< 0, 0, 0 >, <0.5, 0.5, 0>, <0, 1, 0>

After clicking the OK button, the object will appear as shown. This has added a small curvature to the center line of the object, and the rope is no longer a perfectly straight object. Note that the Bone Curvature does not actually bend the object in 3D, but just offsets the center line.

Additional information regarding the Anatomy and Bone Curvature components can be found in the Documentation Table of Contents. Alternatively, you can go directly to the Anatomy or the Bone Curvature sections.

As a final step, we rotate the object in the Z direction to see how well it 'hangs'.