CS 431/636 Advanced Rendering Techniques Dr. David Breen Matheson 308

27 Slides1.61 MB

CS 431/636 Advanced Rendering Techniques Dr. David Breen Matheson 308 Thursday 6PM 8:50PM Presentation 3 4/18/06

Logistics Read research paper and prepare written summary and question L.M. Sobierajski and A.E. Kaufman, "Volumetric Ray Tracing," 1994 Symposium on Volume Visualization Proceedings, Oct. 1994, pp. 11-18 Art Widmann presents next week Assignment due dates Making Effective Artistic Renderings Doug DeCarlo; UCross 153; Friday 2PM

Slide Credits Jonathan Cohen - Johns Hopkins Yizhou Yu - University of Illinois Kevin Suffern -University of Technology, Sydney, Australia G. Drew Kessler, Larry Hodges - Georgia Institute of Technology

Color Models

Light Models

Spot Light Pl Dl Position, Direction Cone angle, sharpness L Pl - Ps if Ps Specified by IL 0 else IL cosn(( /2)( / ))

Shading Models

Calculating the Reflected Ray r (2 (n · L) n) - L Derivation left for the students Clamp all dot products to zero. They shouldn’t be negative, but they can be MAX (0, n · L)

Including Surface Color I for all lights { IL kd C cos( ) IL ks C cosn( ) } Ia ka C C - RGB surface color Could define Cd, Cs and Ca, but you don’t have to

Calculating Normals vertices triangles v v v v v v v v f f f f f f f f f f f f -1 -1 1 -1 -1 1 1 1 -1 -1 1 -1 -1 1 1 1 1 3 4 1 4 2 5 6 8 5 8 7 1 2 6 1 6 5 3 7 8 3 8 4 1 5 7 1 7 3 2 4 8 2 8 6 -1 -1 -1 -1 1 1 1 1 Create vector structure (for normals) same size as vertex structure For each face Calculate unit normal Add to normal structure using vertex index Normalize all the normals N( , , ) Na Nb Nc

Shading Pixels Overview for (i 0; i ; i hres) for (j 0; j ; j vres) { Calculate Ray for (k 0; k ; k NumObject) { Attempt to intersect Ray with Objectk for all intersections Save t, ObjectID & xsect pt/param } Perform shading calculation on closest point (intersection with the lowest non-negative t) Set pixel value at Image[i,j] }

Supersample & Average Image hres and vres are even for (i 0; i ; i hres/2) for (j 0; j ; j vres/2) { offset 2 [i,j]; newImage[i,j] (oldImage[offset] oldImage[offset [0,1]] oldImage[offset [1,0]] oldImage[offset [1,1]])/4; }

Wrap Up Discuss next week’s programming assignment Add point lights with color Add color, shading parameters and normals to models Phong shading Supersample image Discuss status/problems/issues with this week’s programming assignment

Back to top button