Intro To Computer Graphics Geb Thomas Learning Objectives
Intro To Computer Graphics Geb Thomas
Learning Objectives w Learn the differences between image-order, objectorder and volume rendering. w Learn how the eye perceives color and how monitors present color. w Learn how light and objects interact and how to mathematically define ambient, diffuse and specular reflections. w Learn the difference between flat and Gouraud shading.
How Does a VR System Use Graphics? w Processor talks to graphics card about geometry and lighting w Graphics card crunches geometry and lighting calculations w Stores this in a buffer w Another circuit converts the buffer to the video signal
Illustrated Graphics Card
The Graphics Pipeline
How Do We See Things?
Ray Tracing
Object Order
Volume Rendering w Similar to ray-tracing, but instead of being obstructed by intervening objects, the ray may just be attenuated, or color-filtered.
Color w Light hits the eye in a continuous spectrum of color from different frequencies. w Our eyes have three different types of cones to receive data. Each cone is sensitive to different frequencies. w The signals from our color-sensitive cones provide the perception of color. w By providing emitters designed to stimulate each type of cone, the monitor can fool our eye into believing it is perceiving natural color.
Eye Details
Light Is Reflected/Absorbed in All Spectra
The Absorption Characteristic of the 3 Types of Cones
Simulating Colors
For Example Natural Reflected Light Cone response: Blue ->. 8 Red ->. 7 Green ->. 5 Intensity Wavelength Simulated with a Monitor Blue ->. 8 Red ->. 7 Green ->. 5 Cone response: Blue ->. 8 Red ->. 7 Green ->. 5
Lights w Infinitely distant point light creates parallel rays n n Constant direction across field of view No radiant energy drop-off w Local light sources n n n 1/R 2 energy drop-off Radial directions from source Even more complex if the source is distributed rather than point-like
Ambient Light w A general surround light that represents the random light rays resulting from multiple reflections. w Generally provides the colors of objects in shadows. n n n R c = L c Oc Where Rc is resultant color, Lc is the light intensity curve, and Oc is the object intensity curve. Also works Rc = ambient*RGBo where ambient ranges from 0 -1 and RGBo is the RGB values of the object color.
Diffuse Light (Lambertian reflection) w This is light from the light source, determined by the angle of incidence. w Objects are brighter when they directly face the light n n Rc= Lc Oc(-Ln. On) Where Ln On are the light normal and object normal, respectively (normalized length). w Gouraud shading interpolates the object normal across adjacent faces to make the object look smooth. n http: //www. wiley. com/legacy/compbooks/vrml 2 sbk/toc/ch 20. htm
Specular Reflection w Add hot spots characteristic of shiny objects. Ln Light On -Ln Rc=Lc. Oc[S . (-C n )]Osp S = 2[On. (-Ln)] On+ Ln S -Cn Object Cn Camera
Exercise 1 w Given an object with RGB values of [. 5. 2. 1] and an ambient light of. 5, what is the color of a pixel containing the object (assuming no other light sources).
Exercise 2 w Try to calculate color in 2 D. Assume that a bright white light (intensity 1) reflects off a plane oriented at 35 degrees with a color of RGB values [1 0 0]. What is the color of a pixel showing the plane, if the camera is off to the right?
Exercise #3 w Same situation as Exercise #2, but calculate the specular reflection, if the specular power is. 08 35 o
Learning Objectives w Learn the differences between image-order, objectorder and volume rendering. w Learn how the eye perceives color and how monitors present color. w Learn how light and objects interact and how to mathematically define ambient, diffuse and specular reflections. w Learn the difference between flat and Gouraud shading.
- Slides: 24