Professional Documents
Culture Documents
RENDERING TECHNIQUES
22 Mar. 2012
Yanir Kleiman
What is 3D Graphics?
Why 3D?
A lot of reuse
What is 3D Graphics?
Create Model
Texture (Color)
Rig (Bones)
Lighting
Animation
Bones
Controls
Texture Files
Camera
Lights
Rendering
Keyframes
Post Processing
What is Rendering?
Bones
Controls
3D Model
Texture Files
Lights
Camera
???
Image
Keyframes
What is Rendering?
3D Model
Bones
Controls
Keyframes
Geometry
Geometry
Texture Files
Lights
Camera
???
Image
What is Rendering?
Lights
Consider:
Perspective
Occlusion
Color / Texture
Lighting
Shadows
Reflections / Refractions
Indirect illumination
Sampling / Antialiasing
Texture Files
???
Image
Geometry
Camera
Two Approaches
Is it
visible?
Where is it?
What color is it?
Rasterization
Which object
Ray Tracing
RASTERIZATION
22 Mar. 2012
Rasterization
Image
Lighting
Projection
Clipping
Scan Conversion
Image
Backface culling
Lighting
Projection
Clipping
Scan Conversion
Image
Image
Lighting
Projection
Clipping
Scan Conversion
Image
Calculate Z-Buffer
Projection
Clipping
Scan Conversion
Image
Lighting
Projection
Clipping
Scan Conversion
Image
Image
Projection
Clipping
Scan Conversion
Image
Transformation
Transformation
Lighting
Transformation
Lighting
Projection
Transformation
Lighting
Projection
Clipping
Transformation
Lighting
Projection
Clipping
Scan Conversion
Transformation
Lighting
Projection
Clipping
Scan Conversion
Transformation
Lighting
Projection
Clipping
Scan Conversion
Shadows?
Reflections?
Refractions?
Antialiasing?
Indirect illumination?
Rasterization Antialiasing
Aliasing examples
Rasterization Antialiasing
Aliasing examples
Aliasing
Anti-aliased
Rasterization Antialiasing
Blurred hard
shadows
(shadow map)
True soft
shadows
(ray tracing)
Examples:
Reflection Map
Rasterization Refractions
Rasterization Refractions
Refraction Map
Distort Background
Results:
Results of equal render time
Photon mapping
(ray tracing)
Rasterizer (GPU)
TRANSFORMATIONS
22 Mar. 2012
Transformations
? ? ? x
? ? ? y
? ? ? z
? ? ? 1
Viewing Transformations
Types of transformations
Scale
x' a
y' 0
z ' 0
w' 0
0 0 0 x
b 0 0 y
0 c 0 z
0 0 1 1
Translate (move)
x' 1
y ' 0
z ' 0
w' 0
0 0
1 0
0 1
0 0
x0 x
y0 y
z0 z
1 1
Rotations
x' cos
y ' sin
z' 0
w' 0
sin
0 0 x
0 0 y
1 0 z
0 1 1
cos
x' cos
y' 0
z ' sin
w' 0
0
x' 1
y ' 0 cos
z ' 0 sin
0
w' 0
0
0
0 sin
1
0 cos
0
0
sin
cos
0
0 x
0 y
0 z
1 1
0 x
0 y
0 z
1 1
Viewing Transformations
Viewing Transformations
Viewing Transformations
Viewing Transformations
Examples:
(0, 0, 0) -> Eye Position
Projections
Perspective Projections
Perspective Projections
0
0
0
d
0
0
0
0
d
1
0x
d
0y
d
x
y d
z [dx dy dz z]
z
0
z
Divide by 4th coordinate
0
(the w coordinate)
LIGHTING
22 Mar. 2012
RAY TRACING
22 Mar. 2012
Ray Tracing
Ray Tracing
Ray Tracing
Ray Tracing
Ray Tracing
Ray Tracing
Finding intersections
Intersecting spheres
Intersecting triangles
(polygons)
Intersecting other primitives
Finding the closest intersection in a group
of objects / all scene
Solve for t
Solve for t
Not necessary
parallel to ray
Illumination formula:
Shadow term
penumbra
umbra
penumbra
Surface
Illumination formula:
Example:
Top image uses direct lighting only
Bottom image uses indirect
illumination
Notice the ground is reflected
naturally on the character
Not because of reflective material
but because of lighting contribution
Very expensive!
Summary
Rasterization
Ray Tracing
Fast renderer
Antialiasing is expensive
What Artists Do
What Artists Do