Fat Demigod (Priest)

Fat Demigod (Priest)
Priest character rendered w fancy lighting. Created model, textures, materials and rendering. Design by Steve Snoey

Spirit

Spirit
created character design, model, textures, materials and rendering

Torchbearer

Torchbearer
character design by Nate Simpson

Vampire Lord

Vampire Lord
character design by Nate Simpson and Steve Snoey

Saturday, June 5, 2010

displacementmapping10_directx10_sample

Post Mortem
Direct3D 10 Sample: Displacement Mapping 10
Date: 5_16_06




Objectives:
Enhance art and presentation of existing Direct3D10 sample.
The Displacement Mapping10 sample was created to showcase real-time displacement of surface detail on a deformable (skinned character) model.
Team members:
Art Director: Cyrus Kanga
Developer: Shanon Drone
Lead Artist: Matt Dudley
Duration of Project: 4 weeks
Technology used:
D3D10 reference rasterizer (software emulation)
Concept Process:
The existing sample was of an animated spiny fish, with the spines on the fish’s surface existing entirely from a displacement map. The original sample scene was constructed and conceived by the Dev.
(image of existing sample, showing displaced detail.)
After reviewing the existing sample the team identified key areas that an updated sample would need to address:
Overall more complexity was needed across all elements in the sample in order to further prove out the technique.
The team also discussed and categorized limitations of the technique. With notes in hand, art set out to concept and refine a direction.
The focus of the sample was displaced surface detail across the surface of a complex animating model.
The concept process started with the requirement of having a limbed character that would provide a context to the displacement detail.
The art needed to show the limits and benefits of the technique. After some brainstorming it was decided that a spiny scale covered lizard would meet all of the requirements of the sample.
Pre Production:
Pre production time was spent up front researching various lizard varieties for interesting forms and details that would help illustrate the high detail displacement mapping.
Horned and frilled lizards as well as iguana provided inspiration during pre production.


Rough sketches were created and refined to explore shape and features of the lizard.
The details of the concept evolved and were refined during production.
(above: early color & value concept)
Concept of pose and possible environment
Production Process:
Requirements and Limitations:
The shader/material attributes and textures were limited to the following: diffuse color, specular mask, normal map and displacement map.
The displacement mapping10 technique will only displace outward from the existing mesh, many offline/non-realtime displacement techniques have the ability to displace inward as well.
The value for a typical displacement map is represented with 50% grey in the areas of the map that show no change, lighter values show outward displacement and darker values show inward displacement.
Because displacement mapping10 only uses outward displacement it was important to keep track of the type of detail being created during production, and in the end only half of the usable value range of the displacement map would be used.
Poly limit was capped at ~10k for the lizard and rock perch together.
Tools and Techniques:
How the technique works:
The Displacement Mapping 10 technique uses the Geometry Shader (GS) to extrude a volume out at each triangle on the source/base mesh, followed by having the pixel shader raytrace/raymarch into the extruded volume in order to draw pixels representing the displaced surface.
The pixels are placed according to a texture (displacement map). The displacement map texture consists of a grey scale image where the value range represents the height difference between the underlying mesh and displaced pixels.
(left image: example map shown with UV’s. -50% grey representing no displacement.
right image: extruded volume with displaced pixels drawn inside.)
Existing Sample:
The art for the existing sample was created by Dev. The geometry was modeled in wings3d, exported to zbrush where it was subdivided and detailed with spines. The added detail was then exported as a displacement map.
The displacement map was used to create a corresponding normal map with the nvidia normal map filter in photoshop.
Lizard Geometry:
Software used: Maya and Zbrush for geometry, Photoshop for textures.
To create the first pass of the lizard geometry Zspheres were used create a simple volume of torso and limbs. Zspheres were chosen because of their flexible nature, allowing the proportion of limbs and general form to change while still providing relatively clean and evenly spaced geometry. The lowest subdivision level was exported from Zbrush as .obj for refinement and UV projection in Maya.
The exported mesh from Zbrush was brought into maya to add detail and improve the even spacing of vertices.
The technique involves extruding faces from the base mesh at the time of render, then ray tracing into the extruded volume, using the displacement map to determine where what detail exists within the volume.
Due to the nature of the real-time displacement technique there were several issues that had to be figured out during modeling.
One issue surrounds the areas concave areas of the model, such as the inside of elbows or behind knees etc. Without careful planning artifacts could be expected in these areas as the extrusions would likely clip through the base mesh entirely and then draw inverted.
UV’s:
In an effort to push what the technique could achieve there were many revisions to the model as well as the UV coordinates in order to get more surface detail.
The displaced detail only exists as a 2d map, so surface detail across the displacement requires more UV space than the same surface area on the base geometry.
UV’s were created in maya using planar projections based on camera view. Projections were stitched together, leaving seams where they were least likely to be seen.
After UV’s were projected the model was exported back to Zbrush for added detail.
Zbrush was then used to add surface details like spines and folds/wrinkles etc.
Once the general surface was complete with major folds and spines added, a final high detail bump map was created to add scales and fine wrinkles.
Rock Geometry:
The rock that the lizard sits on started out as a sphere primitive in maya. The sphere was scaled and the default UV’s were replaced with UV’s that provided more surface area to the top of the model.
Afterwards the rock was exported to Zbrush for added detail and exported back to Maya for scene placement.
Textures:
With geometry complete, the next step was to create final textures.
(above: displacement map for lizard)
The displacement map was generated in zbrush. By Default Zbrush outputs a 16bit grayscale map, with 50%grey representing zero displacement. For our sample black represented zero displacement so a multiplier in the sample code was used to compensate for the difference.
(diffuse color, specular mask, normal map for lizard)
(diffuse color and normal map for rock)
The diffuse texture for the lizard was created using photoshop through the zbrush zapplink plugin. Later it was combined with a cavity map that was generated in zbrush with the zmapper plugin.
The specular mask was created by adjusting values in the high detail bump map used earlier.
The normal map combines the normal information from the model as well as the high detail bumpmap. This combined map was generated in zbrush using the zmapper plugin.
The rock textures were based on one image of a desert rock and made to tile seamlessly.
Summary of key technological requirements and concepts:
This displacement technique only displaces outward.
Key consideration should be taken to plan for a design that benefits from the technique instead of being limited by it.

Extremely tall or subtle/smooth displacements should be avoided. In the case of tall displacements the extrusions created by the GS can begin to intersect with each other as the model “inflates”, creating artifacts. In the case of very subtle or smooth transitioning displacements the detail can end up being clipped due to lack of precision.

Areas on the base mesh that deform a lot (for example joints like shoulders, elbows, knees) should be avoided when creating detail for the displacement map. When the underlying mesh deforms it affects the extruded volume created by the GS, often causing artifacts.

No comments:

Post a Comment