Advanced Skinning

Click here to load reader

  • date post

    14-Feb-2016
  • Category

    Documents

  • view

    32
  • download

    1

Embed Size (px)

description

Advanced Skinning. CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2004. Project 2. Load a .skin file and attach it to a skeleton using the smooth skin algorithm Render it shaded using at least 2 different colored lights - PowerPoint PPT Presentation

Transcript of Advanced Skinning

  • Advanced SkinningCSE169: Computer AnimationInstructor: Steve RotenbergUCSD, Winter 2004

  • Project 2Load a .skin file and attach it to a skeleton using the smooth skin algorithmRender it shaded using at least 2 different colored lightsAdd a simple interface for selecting a DOF and adjusting it within its limitsTake a .skin and .skel file name from the command lineDue Monday, 11:59pm, 2/2/04

  • Project 2: Extra CreditRender the skin with a texture map. A version of a .skin file with texture information and texture coordinates will be supplied (1 point)Load several .morph files and add vertex blending. Add additional user controlled DOFs to blend the morph targets (2 points)

  • Skin File (part 1)positions [numverts] {[x] [y] [z]}normals [numverts] { [x] [y] [z]}skinweights [numverts] { [numattachments] [joint0] [weight0] [jN-1] [wN-1]}

  • Skin File (part 2)triangles [numtriangles] { [index0] [index1] [index2]}bindings [numjoints] { matrix { [ax] [ay] [az] [bx] [by] [bz] [cx] [cy] [cz] [dx] [dy] [dz] }}

  • Skinning

  • Morphing & Smooth Skinning

  • Weighted Blending & AveragingWeighted sum:

    Weighted average:

    Convex average:

    Additive blend:

  • Shape Interpolation AlgorithmTo compute a blended vertex position:

    The blended position is the base position plus a contribution from each target whose DOF value is greater than 0To blend the normals, we use a similar equation:

    We dont need to normalize them now, as that will happen later in the skinning phase

  • Smooth Skin AlgorithmThe deformed vertex position is a weighted average over all of the joints that the vertex is attached to:

    W is a joints world matrix and B is a joints binding matrix that describes where its world matrix was when it was attached to the skin model (at skin creation time)Each joint transforms the vertex as if it were rigidly attached, and then those results are blended based on user specified weightsAll of the weights must add up to 1:Blending normals is essentially the same, except we transform them as directions (x,y,z,0) and then renormalize the results

  • Layered ApproachWe use a simple layered approachSkeleton KinematicsShape InterpolationSmooth SkinningMost character rigging systems are based on some sort of layered system approach combined with general purpose data flow to allow for customization

  • Equation SummarySkeleton

    Morphing

    Skinning

  • Skeleton, Morph, & Skin Data Flow

  • Rig Data FlowRiggingSystem

  • Rigging and Animation AnimationSystemPoseRiggingSystemTriangles Renderer

  • Pose Space Deformation

  • Pose Space DeformationPose Space Deformation: A Unified Approach to Shape Interpolation and Skeleton-Driven DeformationJ. P. Lewis, Matt Cordner, Nickson Fong

  • Paper Outline1. Introduction2. Background3. Deformation as Scattered Interpolation4. Pose Space Deformation5. Applications and Discussion6. Conclusion

  • Key Goals of a Skinning SystemThe algorithm should handle the general problem of skeleton-influenced deformation rather than treating each area of anatomy as a special case. New creature topologies should be accommodated without programming or considerable setup efforts.

  • Key Goals of a Skinning SystemIt should be possible to specify arbitrary desired deformations at arbitrary points in the parameter space, with smooth interpolation of the deformation between these points.

  • Key Goals of a Skinning SystemThe system should allow direct manipulation of the desired deformations

  • Key Goals of a Skinning SystemThe locality of deformation should be controllable, both spatially and in the skeletons configuration space (pose space).

  • Key Goals of a Skinning SystemIn addition, we target a conventional animator-controlled work process rather than an approach based on automatic simulation. As such we require that animators be able to visualize the interaction of a reasonably high-resolution model with an environment in real time. Real time synthesis is also required for applications such as avatars and computer games

  • Paper Outline (section 2)2. Background2.1 Surface Deformation Models2.2 Multi-Layered and Physically Inspired Models2.3 Common Practice2.3.1 Shape Interpolation

    2.3.2 Skeleton-Subspace Deformation

    2.3.3 Unified Approaches2.4 Kinematic or Physical Simulation?

  • Key TechnologyScattered Data Interpolation Using Radial Basis Functions

  • Key TechnologyScattered Data Interpolation Using Radial Basis FunctionsHuh?

  • InterpolationInterpolation vs. ExtrapolationLinear Interpolation vs. Higher OrderStructured vs. Scattered1-Dimensional vs. Multi-DimensionalInterpolation vs. Approximation

  • Interpolation TechniquesSplines (cubic, B-splines, NURBS)Series (polynomial, Fourier, radial basis functions, wavelets)Rational functions

    Exact solution, minimization, fitting, approximation

  • Radial Basis FunctionsWhat is a radial basis function?How do we use them to interpolate data?

  • What is an RBF?A radial basis function (RBF) is simply a function based on a scalar radius:(r)We can use it as a spherically symmetric function based on the distance from a pointIn 3D space, for example, you can think of a field emanating from a point that is symmetric in every direction (like a gravitational field of a planet)The value of that field is based entirely on the distance from the point (i.e., the radius)

  • Radial Basis FunctionsIf we placed a RBF at location xk in space, and we want to know the value of the field at location x, we just compute:

    (|x-xk|)

    This works with an x of any number of dimensions

  • Radial Basis FunctionsWhat function should we use for (r) ?Well, technically, we could use any function we wantWe will choose to use a Gaussian:

  • Gaussian RBFWhy use a Gaussian RBF?We want a function that has a localized influence that drops off to 0 at a distanceWe want to be able to adjust the range of influence (thats what is for)We want a smooth functionWe want a function whose value is 1 at r=0We want the first derivative to be 0 at r=0. This causes the function to be flat across the top and avoids spikesWe want to use something that is relatively fast to compute

  • How Do We Use RBFs?How do we use radial basis functions to interpolate scattered data?We define the interpolated value at a point as a weighted sum of radial basis functions:

    The RBFs must be positioned and the weights adjusted so that the result best approximates the scattered data and smoothly interpolates the space between the data points

  • Example in One Dimension

  • Solving For Weight Values

  • Solving For Weight Values

  • Solving For Weight Values

  • Solving For Weight Values

  • Note on SDI in PSD PaperI use:

    Where the paper uses:

    The two are equivalent, and I dont know why they do it the other way. It looks slower and more prone to numerical error, but Ill look into it.Besides, the matrix is symmetric, so:

  • SDI, RBFs, and PSDPSD uses SDI as an improved technique for shape interpolationAs RBFs drop to 0 away from the data points, its nice if you use them to interpolate functions that are close to 0. Therefore, they subtract off the default pose and treat all other poses as deviations from the default pose.They describe several other details of the implementation in sections 4 & 5

  • Performance of PSDAt runtime, to compute a deformed vertex position, one must evaluate:

    for each component of the vertex.We can expand this to:

  • Performance of PSDCompare to simple morphing:

    PSD:

  • Memory Usage of PSDWith morphing, every vertex must store Mx3 floats, where M is the number of targets that affect that vertexWith PSD, every vertex must store Nx3+NxR floats, where N is the number of poses for the vertex and R is the number of DOFs affecting the vertex

  • Surface Oriented Free Form Deformations

  • Surface Oriented Free Form DeformationSkinning Characters using Surface-Oriented Free-Form DeformationsKaran SinghEvangelos Kokkevis

  • Paper Outline1. Introduction2. Free-Form Deformation Techniques3. Surface-Oriented Deformations3.1 Overview of the Algorithm3.2 Registration3.3 Deformation4. Algorithm Analysis5. Skinning Workflow6. Results and Conclusion

  • Registration PhaseWhen the model is set up, every vertex in the high detail mesh must be attached to nearby triangles in the low detail meshThe attachment weights are based on a distance function

    And then normalized (so they sum up to 1)A vertex will generally only attach to a small number of trianglesFor every attachment, we find the coordinates in the triangles space

  • RegistrationTo find the vertex position relative to the control triangle i, we build a registration matrix Ri that defines the triangles space

    Note: I use different notation than the paper

  • RegistrationBoth the high detail skin and the low detail control mesh are constructed in the skin local spaceIf a vertex on the high detail skin is v, then its position v* in triangle is space is:

  • DeformationWhen the triangles of the control mesh get positioned into world space, we compute a new deformation matrix D using the same technique as we used to compute RThen, we transform the triangle-local vertex by this matrixThis is done for all triangles affecting a vertex, and then we take a weighted sum

  • DeformationThis looks familiar

  • DeformationThis look