3D Graphics Rendering Pipeline
description
Transcript of 3D Graphics Rendering Pipeline
3D GRAPHICS RENDERING PIPELINE
CS 490.006/582.001TECHNICAL
BACKGROUNDPAGE 1
COORDINATES TRANSFORMATION
CS 490.006/582.001TECHNICAL
BACKGROUNDPAGE 2
Objects are typically created in their local spaces. We need to bring them into the common world space, via a series of affine transformations (translation, rotation, and scaling).
Camera is defined via view parameters EYE, AT, and UP,
measured in world space. It is located at EYE, pointing at AT, with upward orientation of UP.
In the camera space, the camera is located at the
origin, pointing at –zc, with upward orientation of yc,
where zc is opposite of AT and yc is roughly UP.
COORDINATES TRANSFORMATION
CS 490.006/582.001TECHNICAL
BACKGROUNDPAGE 3
The camera’s view frustum is defined via a perspective projection using 4 view parameters: fovy (the total vertical angle of view), aspect (the ratio of width vs. height), zNear (the near plane), and zFar (the far plane).
A projection matrix is applied to transform the view frustum into an axis-aligned cuboid clipping volume of 2x2x1 centered on the near plane (at
z=0) with the far plane (after flipping) at z=1. The planes have dimensions of 2x2, with range from -
1 to +1.
LIGHTING
CS 490.006/582.001TECHNICAL
BACKGROUNDPAGE 4
TEXTURE FILTERING
CS 490.006/582.001TECHNICAL
BACKGROUNDPAGE 5
GEOMETRY SHADERS
CS 490.006/582.001TECHNICAL
BACKGROUNDPAGE 6
TESSELLATION SHADERS
CS 490.006/582.001TECHNICAL
BACKGROUNDPAGE 7
ORIENTATION REPRESENTATION
CS 490.006/582.001TECHNICAL
BACKGROUNDPAGE 8
Animating continuous reorientations of traditional Euler angles produces strange discontinuities and apparent reversals in the accumulated motion, as illustrated with “gimbal lock”.
LINEAR SKINNING
CS 490.006/582.001TECHNICAL
BACKGROUNDPAGE 9
In traditional linear skinning, meshes are bound to
skeletons by binding each mesh vertex to one or more
bones, maintaining their position relative to the moving bones during
animation.
When a joint bends, mesh vertices that are attached to both bones are
repositioned at the average location between where they would be placed if
attached to only one bone.
This produces an undesired collapsing and pinching
effect at the joint.
DUAL QUATERNION SKINNING
CS 490.006/582.001TECHNICAL
BACKGROUNDPAGE 10
By blending the vertices rotationally instead of linearly, a vertex that is weighted half towards one bone and half towards another does not
collapse towards the joint.
While this avoids the shrinkage associated with linear skinning, rotational blending does cause the bent area to inflate a bit,
with an overly smooth pinch on the inside of the fold.
Adjusting the weighting of the different bones and
altering the vertex density of the mesh can address
this problem.