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.

Friday, June 4, 2010

Common rendering technology in todays games

Common rendering technology in today's games
notes by Matt Dudley

this is meant to be a short list of common rendering features found in many games/game engines being made today. These notes cover the "base line"/ most common rendering techniques, how they work and why they are important to artists.


First some history:

In the previous generation of 3d games, rendering consisted of lighting based on vertices and usually a single texture to represent the final look of the asset.
the sphere example above has static lighting based on vertices. (common in ps2 era game environments)

vertex lighting has some charm, its the ps2 directX7 look.

-dynamic lighting was expensive performance wise, so static lighting was used.
-lots of vertices is expensive performance wise, so the lighting usually looks chunky and lo-fi.

character art usually had even fewer vertices than environment art because skinning vertices for animation is expensive for perf.
For this reason most ps2 games used no lighting at all on characters so all lighting info was represented/implied in a single diffuse color texture. (painted shadows and highlights)

Present day:
Current graphics and related art center around the use of shaders/materials.
Shaders can be used and described in many ways, but for artists concerns they can be thought of in this way: shaders define how a (polygonal) surface looks when rendered onscreen.

Today it is common to have lighting based on pixel/texel (texture pixel) and where one texture was used before, its common to have 5 textures or more associated with the final look of an asset. (a really good looking asset!)

Basic Features:

A typical fancy shader has features like:
ambient light: not fancy, a fixed number that sets the darkest darks (dark value range)
diffuse light: color that is added/lightened based on directional light ex: a directional light placed in the scene/game engine (midtone)
specular highlight: a highlight that is added/lightened based on directional light and angle of surface relative to the camera/viewer (highlights)
reflection/cube map/environment map: a texture that is added/lightened across the surface, oriented based on camera/viewer (shiny)
shadow: a color that is multiplied/darkened based on a projection from the directional light in the scene. (dark value range)
all together.

Important Stuff:

the features above are usually calculated in the order they are listed.

All adds up to white:
all of the features besides shadow add/lighten starting from the ambient color -so if your ambient is grey, black values are already ruled out.
Each step narrows the value range towards white, diffuse adds up closer to white, leaving less range for specular, more so with reflections.

Shadows:
after all the adding/lightening is done, the shadows get multiplied in. It gets more complicated if the shader has self shadowing (ie on a character where his raised arm casts a shadow across his chest).

its common to see the self shadow look darker on the raised arm than the cast shadow falling across the character's chest. this is because the shadow facing pixels on the arm are already receiving less light than the light facing pixels on the chest.

this is one of the reasons black or near black shadows are common, it hides the oddness of seeing darker shadows between surfaces.

Patience:
Its common to spend some time tuning all the associated values in order to get a final result that looks "right" -or just not totally blown out.

Thursday, June 3, 2010

more fuel for the internet bonfire of the future

I made a blog. its a place where I can post stuff I make. As a general rule I try to make stuff that I think is cool. I hope you enjoy.