CS488 - Introduction to Computer Graphics - Lecture 23
Ray Tracing
Distribution Ray Tracing
What's wrong with
- Beam tracing
- Super sampling
- Stochastic sampling
It doesn't try explicitly to put the work into the places that make the
most difference.
Trying to do so we should get heuristics like
- If <xxx> is important, then put extra rays into <yyy>.
Here are a few such heuristics
Distribute carefully over
- Reflection directions <==>
- you want better highlights.
- Put extra rays in the highlight
- How?
- Ray-trace a coarse image
- find the pixels/rays that contribute to the highlight
- Send extra rays between and near them
- Area lights <==>
- you want soft shadows
- Put extra rays at the edges of the shadows
- How?
- Ray-trace coarsely with a point light source
- determine pixels/rays that are near the edges of shadows
- Send extra rays doing a more complex lighting calculation near
shadow edges
- How would you get them?
- Time <==>
- you want motion blur.
- Concentrate on the objects that are moving
- How?
- Ray-trace coarsely for different times
- Determine pixels/rays that change between the images
- Cast extra rays there for even more times
- Average
- Anti-aliasing
- You want better anti-aliasing
- Put extra rays where more than one primitive contributes to an
object
- How?
- Ray trace coarsely
- Run an edge detector to find pixels/rays on edges
- Cast extra rays for those pixels and their neighbours.
These techniques are hard!
- Not to cast the extra rays
- But to find out where extra rays are needed.
Modelling
Constructive Solid Geometry (CSG)
Geometric primitives can make other geometric primitives by
- union
- intersection
- subtraction
This is like sculpting.
The result of doing CSG modelling is a complex Boolean expression to be
evaluated.
- Idea. Do it not on the volumes of objects but on the rays.
- Then work out the Boolean expression
E.g. Cylinder, A, with stretched cube, B, subtracted unioned with a small
sphere, C.
build the expression tree
for each CSG primitive
find entry and exit intersections
recursively evaluate the expression tree
Texture Mapping
Basic
- Start with a 2D image: pixellated or procedural
- Map 2D image onto primitive using a 2D affine transformation
- Simple if the surface of the primitive is flat
- otherwise, ...
- Backwards map intersection point with ray into the image to get the
surface properties
Normal Mapping, aka Bump Mapping
- Start with a difference surface, defined with respect to the
surface
- Calculate the normals to the difference surface and map them onto the
surface of the primitive
- Use the mapped surface models for lighting
- No occlusion, shadows are wrong, silhouettes are wrong, nobody
notices!
Solid Textures
- Solution to mapping texture onto curved surfaces
- or objects like wood or marble where we see differently oriented
surfaces
- Usually procedural
Return to: