240 likes | 259 Views
Learn the fundamentals of computer graphics, including image-order, object-order, and volume rendering. Understand how the eye perceives color and how monitors present color. Explore the interaction between light and objects, and how to define ambient, diffuse, and specular reflections mathematically. Gain knowledge about flat and Gouraud shading techniques.
E N D
Intro To Computer Graphics Geb Thomas
Learning Objectives • Learn the differences between image-order, object-order and volume rendering. • Learn how the eye perceives color and how monitors present color. • Learn how light and objects interact and how to mathematically define ambient, diffuse and specular reflections. • Learn the difference between flat and Gouraud shading.
How Does a VR System Use Graphics? • Processor talks to graphics card about geometry and lighting • Graphics card crunches geometry and lighting calculations • Stores this in a buffer • Another circuit converts the buffer to the video signal
Volume Rendering • Similar to ray-tracing, but instead of being obstructed by intervening objects, the ray may just be attenuated, or color-filtered.
Color • Light hits the eye in a continuous spectrum of color from different frequencies. • Our eyes have three different types of cones to receive data. Each cone is sensitive to different frequencies. • The signals from our color-sensitive cones provide the perception of color. • By providing emitters designed to stimulate each type of cone, the monitor can fool our eye into believing it is perceiving natural color.
For Example Natural Reflected Light Cone response: Blue -> .8 Red -> .7 Green -> .5 Intensity Wavelength Simulated with a Monitor Cone response: Blue -> .8 Red -> .7 Green -> .5 Blue -> .8 Red -> .7 Green -> .5
Lights • Infinitely distant point light creates parallel rays • Constant direction across field of view • No radiant energy drop-off • Local light sources • 1/R2 energy drop-off • Radial directions from source • Even more complex if the source is distributed rather than point-like
Ambient Light • A general surround light that represents the random light rays resulting from multiple reflections. • Generally provides the colors of objects in shadows. • Rc= Lc 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) • This is light from the light source, determined by the angle of incidence. • Objects are brighter when they directly face the light • Rc= Lc Oc(-Ln.On) • Where LnOn are the light normal and object normal, respectively (normalized length). • Gouraud shading interpolates the object normal across adjacent faces to make the object look smooth. • http://www.wiley.com/legacy/compbooks/vrml2sbk/toc/ch20.htm
Specular Reflection • Add hot spots characteristic of shiny objects. Ln Light On S -Ln Cn -Cn Object Camera Rc=LcOc[S . (-Cn)]Osp S = 2[On.(-Ln)] On+Ln
Exercise 1 • 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 • Try to calculate color in 2D. 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 • Same situation as Exercise #2, but calculate the specular reflection, if the specular power is .08 35o
Learning Objectives • Learn the differences between image-order, object-order and volume rendering. • Learn how the eye perceives color and how monitors present color. • Learn how light and objects interact and how to mathematically define ambient, diffuse and specular reflections. • Learn the difference between flat and Gouraud shading.