Download presentation
Presentation is loading. Please wait.
1
14th Lecture – Final Lecture
CPT 450 Computer Graphics 14th Lecture – Final Lecture
2
Rendering Goal – To produce realistic photo like renderings Used by
Designers Engineers Architects Animators People want to know what will it look like before they build it.
3
Visual cues to 3D geometry
Size (perspective – distant objects appear smaller) Occlusion (one object covering another) Binocular versus monocular vision 3D glasses Shading Very important
4
Physics of Light What happens when light hits an object? It can be:
Reflected specular or diffuse Transmitted and refracted (bent), for dielectrics, i.e. water, glass… Absorbed and then turned into heat. (Some radiation is then re-emitted, but mostly not in the visible wavelengths)
5
Types of Reflection Math Models are used to approximate real-world phenomenon. Physics based. Diffuse Reflection – a dull, matte surface emits light equally in all directions. Most real surfaces are rough, on a microscopic level. Lambert’s law Kd * max(N * L, 0) Specular Reflection - from smooth, shiny surfaces, i.e. a mirror. Highlights are visible Angle of incidence = angle of reflection R (for a mirror) Ks * max(N * R, 0) ^ n Models spread out this reflected light over a range of angles Combinations are possible
6
Refraction Medium Index of Refraction Air n ~ 1 Water n = 1.33 Glass
Index of Refraction = Ratio of speed of light in a vacuum divided by the speed of light in the medium. Snell’s Law: n1*sin(theta1) = n2*sin(theta2) Occurs at the interface between 2 different materials Medium Index of Refraction Air n ~ 1 Water n = 1.33 Glass n = 1.4 to 1.5
7
Lighting sources Direct Indirect Point light sources
Directional lighting (sunlight) Ambient Light Indirect Diffuse Reflection Specular Reflection Refracted light
8
Smooth Shading Curved surfaces are approximated by many small flat polygons (facets) Think of a mirrored disco ball To smooth over the facets, interpolation is used. Gourand shading (intensity interpolation) Phong shading (normal vector interpolation) Phong shading produces better rendering, but is slower than Gourand
9
2 approaches Fast Rendering Ray Tracing
Represent curved surfaces as many small facets Transform all facets on the 2D plane of projection, using a transformation matrix Use algorithms to remove hidden surfaces Ray Tracing For each pixel on the screen, compute where a ray from the observer through that pixel, will intersect the scene and use that info to compute the brightness of the pixel Slower rendering, but better quality
10
Ray Tracing Very complicated math, compute intensive
Recursive reflection and refraction (can be very time consuming) Results: Beautifully rendered images You can have multiple light sources, textured surfaces, and lots of options.
11
Ray Tracing algorithm For each pixel,
Compute the projector (ray from focus) Intersect the ray with the scene Compute illumination at visible point Put resulting pixel into image
12
Try Ray Tracing software
You can download Stephen’s demo program. You can Download Maya Personal Learning Edition from Alias for free for non-commercial use. See: Maya is used by profession animators
13
VRML- Virtual Reality Modeling Language
Markup language for viewing 3D scenes Browser plug-in required for viewing Not as popular as before.
14
Final Exam 2 weeks from today
Like midterm. Open book and notes. Go through links on class schedule.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.