DOC PREVIEW
UCSD CSE 169 - Skin

This preview shows page 1-2-3-19-20-39-40-41 out of 41 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

SkinCSE169: Computer AnimationInstructor: Steve RotenbergUCSD, Winter 2008Rendering ReviewRendering Renderable surfaces are built up from simple primitives such as triangles They can also use smooth surfaces such as NURBS or subdivision surfaces, but these are often just turned into triangles by an automatic tessellation algorithm before renderingLighting We can compute the interaction of light with surfaces to achieve realistic shading For lighting computations, we usually require a position on the surface and the normal GL does some relatively simple local illumination computations For higher quality images, we can compute global illumination, where complete light interaction is computed within an environment to achieve effects like shadows, reflections, caustics, and diffuse bounced lightGouraud & Phong Shading We can use triangles to give the appearance of a smooth surface by faking the normals a little Gouraud shading is a technique where we compute the lighting at each vertex and interpolate the resulting color across the triangle Phong shading is more expensive and interpolates the normal across the triangle and recomputes the lighting for every pixelMaterials When an incoming beam of light hits a surface, some of the light will be absorbed, and some will scatter in various directionsMaterials In high quality rendering, we use a function called a BRDF (bidirectional reflectance distribution function) to represent the scattering of light at the surface:fr(θi, φi, θr, φr, λ) The BRDF is a 5 dimensional function of the incoming light direction (2 dimensions), the outgoing direction (2 dimensions), and the wavelengthTranslucency Skin is a translucent material. If we want to render skin realistically, we need to account for subsurface light scattering. We can extend the BRDF to a BSSRDF by adding two more dimensions representing the translation in surface coordinates. This way, we can account for light that enters the surface at one location and leaves at another. Learn more about these in CSE168!Texture We may wish to ‘map’ various properties across the polygonal surface We can do this through texture mapping, or other more general mapping techniques Usually, this will require explicitly storing texture coordinate information at the vertices For higher quality rendering, we may combine several different maps in complex ways, each with their own mapping coordinates Related features include bump mapping, displacement mapping, illumination mapping…Smooth Skin AlgorithmWeighted Blending & Averaging Weighted sum: Weighted average: Convex average:10100≤≤==′∑∑==iiiiiiwwxwxRigid Parts Robots and mechanical creatures can usually be rendered with rigid parts and don’t require a smooth skin To render rigid parts, each part is transformed by its joint matrix independently In this situation, every vertex of the character’s geometry is transformed by exactly one matrixwhere v is defined in joint’s local spacevWv ⋅=′Simple Skin A simple improvement for low-medium quality characters is to rigidly bind a skin to the skeleton. This means that every vertex of the continuous skin mesh is attached to a joint. In this method, as with rigid parts, every vertex is transformed exactly once and should therefore have similar performance to rendering with rigid parts.vWv ⋅=′Smooth Skin With the smooth skin algorithm, a vertex can be attached to more than one joint with adjustable weights that control how much each joint affects it Verts rarely need to be attached to more than three joints Each vertex is transformed a few times and the results are blended The smooth skin algorithm has many other names: blended skin, skeletal subspace deformation (SSD), multi-matrix skin, matrix palette skinning…Smooth Skin Algorithm The deformed vertex position is a weighted average:()()()()∑∑=⋅=′⋅+⋅+⋅=′1...2211iiiNNwwhereworwwwvMvvMvMvMvBinding Matrices With rigid parts or simple skin, v can be defined local to the joint that transforms it With smooth skin, several joints transform a vertex, but it can’t be defined local to all of them Instead, we must first transform it to be local to the joint that will then transform it to the world To do this, we use a binding matrix B for each joint that defines where the joint was when the skin was attached and premultiply its inverse with the world matrix:1−⋅=iiiBWMNormals To compute shading, we need to transform the normals to world space also Because the normal is a direction vector, we don’t want it to get the translation from the matrix, so we only need to multiply the normal by the upper 3x3 portion of the matrix For a normal bound to only one joint:nWn ⋅=′Normals For smooth skin, we must blend the normal as with the positions, but the normal must then be renormalized: If the matrices have non-rigid transformations, then technically, we should use:()()∑∑⋅⋅=′nMnMniiiiww()()∑∑⋅⋅=′−−nMnMnTiiTiiww11Algorithm OverviewSkin::Update() (view independent processing) Compute skinning matrix for each joint: M=W·B-1(you can precompute and store B-1instead of B) Loop through vertices and compute blended position & normalSkin::Draw() (view dependent processing) Set matrix state to Identity (world) Loop through triangles and draw using world space positions & normalsQuestions:- Why not deal with B in Skeleton::Update() ?- Why not just transform vertices within Skin::Draw() ?Rig Data Flow Input DOFs Rigging system(skeleton, skin…) Output renderable mesh(vertices, normals…)[]Nφφφ...21=Φnv′′,RigSkeleton Forward Kinematics Every joint computes a local matrix based on its DOFs and any other constants necessary (joint offsets…) To find the joint’s world matrix, we compute the dot product of the local matrix with the parent’s world matrix Normally, we would do this in a depth-first order starting from the root, so that we can be sure that the parent’s world matrix is available when its needed()Njntφφφ,...,,21LL =LWW⋅=parentSmooth Skin Algorithm The deformed vertex position is a weighted average over all of the joints that the vertex is attached to: W is a joint’s world matrix and B is a joint’s binding matrix that describes where it’s world matrix was when it was attached to the skin model (at skin creation time)


View Full Document

UCSD CSE 169 - Skin

Download Skin
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Skin and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Skin 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?