CS 184: COMPUTER GRAPHICS

Warm-up Exercises:

1.)  In an "idealized Manhattan"  how many city blocks would you have to walk to get
from  the corner of 8th Avenue and 35th Street  to  the corner of 3rd Avenue and 55th Street?
How is this related to one of the questions on your recent CS 184 exam?

2.) 
Given a plane defined implicitly by all points  p  satisfying  (p-a) n = 0, where  a  and  n  are vectors.
How would you calculate efficiently, whether a sphere S, with radius r, centered at location  c 
is cut by the above plane?



PREVIOUS < - - - - > CS 184 HOME < - - - - > CURRENT < - - - - > NEXT

Lecture #10 -- Wed 2/23/2011.

Ray-Tracing (cont.)

A practical raytracer system has many different aspects:

We are concerned with all those issues in assignments A#5 and A#6.

Structural Aspects: Hierarchically Composed Scenes:

The Sphere-World of Assignment #5  and an inspirational sculpture by Chris Bathgate

Such scenes involve a lot of compound transformations (=> matrix multiplications).
Get familiar with those -- and with their inverses, so that you can move up an down this scene hierarchy easily!
Move the rays going from the camera into the scene  all the way down to the leaves of the scene-tree,
where you find just unit spheres as the leaves of the tree, -- which are easy targets for intersection calculations.
Transform the found intersection points and the normals at those points back up to the WORLD coordinate system.
From those points, shadow rays are cast towards all the lights, and possibly secondary rays, if surface is reflective / refractive.
Need to calculate proper reflection and refraction angles -- and from those: the direction vectors for the secondary rays.
Need to calculate relative intensities for the reflection and refraction paths, to sum up the contributions with proper weights.

Later we will start moving the camera around this world, too!
==> Build a robust transformation data structure and become proficient with it. (As#5)

Physical Aspects: Illumination Models

What we talked about in the last two lectures.
See also: Extension of the Scene Description format  SCD09 posted at the end of last lecture.

Now we can also handle shadows quite efficiently (which is harder to do in the classical rendering pipeline):
Cast shadow rays from all "seen" points, to find out what light contributions should be added up. (As#5)

Statistical Aspect: Distribution Ray-tracing -- improving resolution quality, reducing aliasing

Shooting only a single ray per pixel can result in objectionable aliasing effects;
these can be reduced by shooting multiple rays per pixels and averaging the returned (r,g,b) intensities.
In the simplest case, each pixel is sampled according to a regular grid (i.e. 2, 3, or 4 samples per pixel edge).
This is equivalent of assuming that you have a display screen in which the number of pixels
in the horizontal and vertical directions are increased by an interger multiple. (As#5)
In a more sophisticated program the individual super-sampling rays would be randomized in their positions within a pixel.

This one basic trick: shooting several distributed rays and then averaging the result,
can simulate several useful effects:
(slides of Prof. O'Brien's lectures):
Anti-aliasing of high spatial frequencies;
Smooth reflections and refractions;
Soft Shadows;
Fuzzy Reflections on brushed aluminium, brushed table top;
Caustics from reflections, from refractions, in swimming pool;
Depth of Field   -- distribution sampling over aperture of lens;
Motion Blur  -- distribution sampling over inter-frame time interval
.


Hand back exam.  Discuss solutions for pages 2 and 3


Postponed till next lecture:

Geometrical Aspect: Ray - Triangle Intersections

Eficiency Aspects: Exploiting Locality and Coherence; Bounding Volume Hierarchies


Reading Assignments:

Study: ( i.e., try to understand fully, so that you can answer questions on an exam): 
Shirley: [ 2nd Ed: Ch 6.2-6.5; Ch 9.1-9.2; Chapter 10] 
Shirley: { 3rd Ed: Chapters 4, 10, 13; Ch 12.2-12.3}



Programming Assignment #5: To be done individually; due (electronically submitted) before Saturday 2/26, 11:00pm.
Programming Assignment
#6
: May be done in pairs; due (electronically submitted) before Saturday 3/5, 11:00pm.


PREVIOUS < - - - - > CS 184 HOME < - - - - > CURRENT < - - - - > NEXT
Page Editor: Carlo H. Séquin