Download presentation
Presentation is loading. Please wait.
1
CS 431/636 Advanced Rendering Techniques
Dr. David Breen Matheson 308 Thursday 6PM 8:50PM Presentation 3 4/18/06
2
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 Art Widmann presents next week Assignment due dates Making Effective Artistic Renderings - Doug DeCarlo; UCross 153; Friday 2PM
3
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
4
Color Models
5
Light Models
6
Spot Light Specified by L = Pl - Ps if > else
Position, Direction Cone angle, sharpness L = Pl - Ps if > IL= 0 else IL= cosn((/2)(/)) Dl Pl Ps
7
Shading Models
14
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)
23
Including Surface Color
for all lights { ILkd C cos() + ILks C cosn() } + Iaka C C - RGB surface color Could define Cd, Cs and Ca, but you don’t have to
24
Calculating Normals 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 v v v v v v v v f 1 3 4 f 1 4 2 f 5 6 8 f 5 8 7 f 1 2 6 f 1 6 5 f 3 7 8 f 3 8 4 f 1 5 7 f 1 7 3 f 2 4 8 f 2 8 6 vertices triangles
25
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]
26
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; }
27
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.