D-Mesh Tutorial III - Image Mapping Functions
In addition to the muscle definitions, all layers can also contain image-based information. (At present, only importing and exporting of images has been enabled. Additional image manipulation features will be enabled in future versions.) Once an image has been imported into a layer, all of the standard mesh generation features are available for use. An image must also be imported into a specific layer. At present, only one image per layer is supported.
| Create a new DMesh document by selecting the File:New menu. In the View Properties dialog, choose Displacement for the initial view, and select Bone Surfaces in the Attach to Layer(s) list box. Since there is no currently existing muscle definition or image map for this layer, the displacements will all be zero, and the image will be black. | ||
| Using the Object:Property menu item, increase the uv mesh resolution, (the following renders were created using a mesh resolution of 50X50 - with smoothing enabled at export/render time.) | ||
|
Choose the Object:Muscle:Basic Shape and in the X-Section group,
change the scale value to 0.00. We will be exporting these images as planar
meshes, and we usually want these to have a base X-Section height of zero.
Change the Base Shape type to planar, since we will be viewing these
images as height fields.
Finally, create a 3D Preview window, and rotate the object into view. (This is covered in Tutorial I, so if you skipped it, you may wish to go back.) |
||
arrowhe3.tga |
We are now ready to import an image for viewing as a height field. First,
select the image view window. This will activate the File:Import:TGA
menu. Select this menu item, and choose the ImageMap subdirectory. This contains
a few small sample height field maps (256X256 gray scale.) Select
arrowhe3.tga to import it into the current view layer.
The 3D preview will be updated to display the height field, however, it will be much 'steeper' than that shown here. Select the Object:Muscles:Bone Surfaces layer, and in the Image Mapping section at the bottom, change the Image Scale to 0.25 This will scale the height displacement to 25% and will appear as shown. |
|
craterla.tga |
We will combine these image maps next, but first, lets look at the craterla.tga
example. Return to the File:Import:TGA menu, but this time import
the craterla.tga sample file. Answer Yes to the Replace Image
dialog, and in the 3D Preview, it will produce results similiar to this.
The Displacement view will likely contain scroll bars, and only a portion of the image will ve visible. We can resize the window to show the entire image. Select the Image:Window From Image menu item, and the image view will be resized to match that of the image. |
|
(both active) |
Next, we will combine these two image maps using a second layer. Select the
Window:MuscleMap menu. In the View Properties dialog, again set the
view type to Displacement and select the Exterior Muscles layer
from the list box.
Set the image scaling for this layer to match that of the first layer. Select the Object:Muscle:Exterior Muscles menu item, and change the Image Scale to 0.25, then return to the File:Import:TGA menu, and import the arrowhe3.tga sample again. We now have two separate views with two different image maps. The two images have been added togeather and produce a height fields such as shown here. |
|
(Layer Scaling) |
In many cases, we will wish to provide scaling for the individual maps, either
as a simple 0.5 for each, or in some other fashion. Select the
Object:Layer menu, and set the scaling for each layer. This view shows
the results for setting the scaling to 0.25 and 0.75 for the craterla (Bone
Surfaces) and arrowhe3 (Exterior Muscles) layers respectively.
(Note that you can also change the layer names in this dialog to something more suitable.) The result has most of the characteristics of the arrowhe3 layer, (75% to be precise,) and the crater from the craterla layer is only vaguely discernable. |
|
| Some other possible scaling factors are shown below. Note that negative values are valid, and will result in one image map being subtracted from the other. | ||
(0.75 and 0.25) |
(1.00 and -1.00) |
(-1.00 and 1.00) |
| As a simple example of combining muscle maps with image maps, we can create the following terrain feature rather simply. Use File:Open to load the dragon1f.dmz file containing the muscle definitions for the toy dragon. For the initial view, choose Displacement and the Epidermal Distortions layer, (this layer currently has no muscle definitions.) | |
|
From the Object:Properties menu, change the resolution to 50X50, the
Base Shape to Planar, the Scaling for V to 1.00 and the Scaling for Height
to 0.25. Finally, from the Object:Muscle:Base Shape menu, change the
X-Section scaling to 0.00. (These steps will efectively change the mesh
parameters from their conic orientation, to values more suitable for planar
objects.) If we now open a 3D Preview window, we can see the musclulature
for the toy dragon as a planr object. (You may have to slightly rotate the
object for a better view.)
Now select the Displacement view window, and import the arrowhe3 image once again. The arrowhe3.tga terrain features are still noticeable, while the muscle defintions for the dragon effectively overlay the terrain, giving a sort of 'buried skeleton' appearance. |
For addtitional information regarding image maps and supported formats, see the Image Formats section in the documentation.
|
Under Construction |
|
| The remainder of the image editing features are currently disabled. Additional details will be added once these features are activated. |