Computer Graphics (Fall 2008) Computer Graphics (Fall 2008)
COMS 4160, Lectures 16, 17: Nuts and bolts of Ray Tracing Ravi Ramamoorthi
http://www.cs.columbia.edu/~cs4160
Acknowledgements: Thomas Funkhouser and Greg Humphreys
Ray Casting Finding Ray Direction Finding Ray Direction Goal is to - - PDF document
Heckbert Heckbert s s Business Card Ray Tracer Business Card Ray Tracer Computer Graphics (Fall 2008) Computer Graphics (Fall 2008) COMS 4160, Lectures 16, 17: Nuts and bolts of Ray Tracing Ravi Ramamoorthi
Acknowledgements: Thomas Funkhouser and Greg Humphreys
Eye Up vector Center
From 4160 lecture 4 on deriving gluLookAt
Eye Up vector Center
αu βv
1 2
1 2
1 2 1 1
2 2 1 1 1
2 2 1 1 1
1
A B C
( ) ( ) ( ) ( ) C A B A n C A B A − × − = − × −
A B C
( ) ( ) ( ) ( ) C A B A n C A B A − × − = − × −
1 1
1
A B C P α β γ
0, 0, 1 P A B C α β γ α β γ α β γ = + + ≥ ≥ ≥ + + =
A B C P α β γ
0, 0, 1 P A B C α β γ α β γ α β γ = + + ≥ ≥ ≥ + + = ( ) ( ) P A B A C A β γ − = − + − 1 , 0 1 1 β γ β γ ≤ ≤ ≤ ≤ + ≤
2
* * L L const lin d quad d = + +
1
n s a e i d i s i i i
=
Color = Visible ? Illumination Model : 0 ;
Color += reflectivity * Color of reflected ray
1
n s a e i d i s s i i R T T i
=
Adaptive sampling, depth control
Beam tracing, cone tracing, pencil tracing etc.
Optimized Ray-Object Intersections Fewer Intersections
If no intersection bounding box, needn’t check objects