

































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


































CSE169: Computer Animation
Instructor: Steve Rotenberg
UCSD, Winter 2008
We can compute the interaction of light withsurfaces to achieve realistic shading
For lighting computations, we usually require aposition 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 toachieve effects like shadows, reflections,caustics, and diffuse bounced light
We can use triangles to give the appearance of asmooth surface by faking the normals a little
Gouraud shading is a technique where we compute thelighting at each vertex and interpolate the resulting coloracross the triangle
Phong shading is more expensive and interpolates thenormal across the triangle and recomputes the lightingfor every pixel
In high quality rendering, we use a functioncalled a BRDF (bidirectional reflectancedistribution function) to represent the scatteringof light at the surface:
f
(r^
θ
,i
φ
,i
θ
,r
φ
,r
λ
)
The BRDF is a 5 dimensional function of theincoming light direction (2 dimensions), theoutgoing direction (2 dimensions), and thewavelength
Skin is a translucent material. If we want torender skin realistically, we need to account forsubsurface light scattering.
We can extend the BRDF to a BSSRDF byadding two more dimensions representing thetranslation in surface coordinates. This way, wecan account for light that enters the surface atone location and leaves at another.
Learn more about these in CSE168!
Weighted sum:
Weighted average:
Convex average:
0
∑
∑
=
=^ i
i
i i
i
i
w w
x
w
x
A simple improvement for low-medium qualitycharacters is to rigidly bind a skin to theskeleton. This means that every vertex of thecontinuous skin mesh is attached to a joint.
In this method, as with rigid parts, every vertexis transformed exactly once and shouldtherefore have similar performance to renderingwith rigid parts.
v
v
With the smooth skin algorithm, a vertex can beattached to more than one joint with adjustableweights that control how much each joint affectsit
Verts rarely need to be attached to more thanthree joints
Each vertex is transformed a few times and theresults are blended
The smooth skin algorithm has many othernames: blended skin, skeletal subspacedeformation (SSD), multi-matrix skin, matrixpalette skinning…
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 itcan’t be defined local to all of them
Instead, we must first transform it to be local to the jointthat 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 attachedand premultiply its inverse with the world matrix:
1 −
i
i
i^
n
n
(view independent processing)
Compute skinning matrix for each joint:
M=W
· B
-
(you can
precompute and store
B
instead of
B
)
Loop through vertices and compute blended position & normal
Skin::Draw()
(view dependent processing)
Set matrix state to Identity (world)
Loop through triangles and draw using world space positions &normals
Questions:-^
Why not deal with
B
in Skeleton::Update()?
-^
Why not just transform vertices within Skin::Draw()?
Input DOFs
Rigging system(skeleton, skin…)
Output renderable mesh(vertices, normals…)
[
] N
2
1
n
v