CS 551/651:
Advanced Computer Graphics
Accelerating Ray Tracing Continued
Antialiasing
David Luebke
1
Recap: Accelerating Ray Tracing
q
Problem:
s
s
s
q
Lots of pixels = lots of rays
Computing shadows generates even more rays
Supersampling generates even
CS 551/651:
Advanced Computer Graphics
Accelerating Ray Tracing
David Luebke
1
Ray-Sphere Intersection
q
Ray R = O + tD
x = Ox + t * Dx
y = Oy + t * Dy
z = Oz + t * Dz
q
Sphere at (l, m, n) of radius r is:
(x - l)2 + (y - m)2 + (z - n)2 = r 2
q
Substitute
CS 551/651:
Advanced Computer Graphics
Ray Tracing Continued
David Luebke
1
Basic Algorithm: Code
Color TraceRay(Ray R)
if rayHitsObjects(R) then
Color localC, reflectC, refractC;
Object O = findNearestObject(R);
localC = shade(O,R); / shadow rays?
Ray re
CS 551/651:
Advanced Computer Graphics
Welcome, Introductions, and Ray Tracing
David Luebke
1
Syllabus
q
A.k.a. the web page:
http:/www.cs.virginia.edu/cs551
David Luebke
2
Realism?
David Luebke
3
Realism?
David Luebke
4
Realism?
David Luebke
5
Realism?
D