Download presentation

Presentation is loading. Please wait.

Published byTia Munson Modified about 1 year ago

1
Week 5 - Friday

2
What did we talk about last time? Quaternions Vertex blending Morphing Projections

3

4

5

6

7

8
[L]ight …travels so fast that it takes most races thousands of years to realise that it travels at all…. Douglas Adams Light is one of the most complex phenomena in the universe There are quantum effects, its dual wave/particle nature We will constantly be approximating the effect of light, since figuring out its real effect is virtually impossible

9
We will consider three processes in lighting a scene Emitting light ▪ From the sun or light bulbs or whatever Interaction of light ▪ Light is absorbed by and scatters off objects in a scene Detection by a sensor ▪ A human eye (or a robot eye), camera, piece of film will sense the light We have to give at least cursory attention to each process to get realistic rendering

10
One of the easiest light sources to model are directional lights, such as the sun With directional lights, all the light travels the same direction, which we can model with a light vector l We assume that l is a unit vector l is defined in the opposite direction the light is traveling

11
Besides direction, we need to know the amount of light Radiometry is the science of measuring light, and we'll talk more about it in two weeks Irradiance is the light's power passing through a unit area surface perpendicular to l Light can be colored by using RGB components

12
Most light is not perpendicular to your surface The surface irradiance is the perpendicular irradiance times cos θ, where θ is the angle between l and the surface normal n This is why l is the opposite of the direction of light flowing (so that we don't have to negate it) Also, we clamp the cos θ to [0,1] (no negative values)

13
Real light is coming from many different directions The final effects of irradiance is additive Just sum up all the individual light effects Although we use RGB for light, there is not necessarily a maximum value Light is perceived logarithmically by humans High dynamic range displays and floating point color models can allow a better expression of light energy

14

15
Once we know how much and what direction of light we're dealing with, the material it hits impacts the final effect a great deal These impacts are of two kinds: Scattering Absorption

16
Scattering is caused by an optical discontinuity Difference in structure Change in density Scattering does not change the amount of light, only its direction There are two types of scattering Refraction (or transmission) Reflection

17
With refraction (or transmission) in (partially) transparent objects, the light continues to go through the object and may light other objects There are light bending effects Plus the Z-buffer algorithm doesn't work anymore We won't deal with that now

18
Light that is reflected will have a different direction and color than light that was transmitted into the surface, partially absorbed, and scattered back out We simplify by dividing into two terms Specular term (the reflected light) Diffuse term (the re-transmitted light)

19
Illumination reaching a surface is irradiance Illumination leaving a surface is exitance (M) Although our perception of light is logarithmic, light-matter interaction is linear: Double the irradiance and you'll double the exitance The ratio between exitance and irradiance is essentially the surface color that you see back Surface color c = specular color + diffuse color

20
We will often assume that diffuse light has no directionality Specular light, however, bounces off a surface and spreads out less if the surface is smoother Color, texture, and the smoothness parameter are not absolute We may change them depending on how far we are from the object

21

22
We are going to describe mathematical models of sensors But how did humans investigate the nature of sensors in the first place? Can you trust your own sensors? Consider the following slide

23

24
That slide is an example of Mach banding In Mach banding, a lighter color on the edge of a darker color will appear to grow lighter as you get close to the border between them The darker color will do the reverse It's part of our brain's edge detection algorithm

25
In general, sensors are made up of many tiny sensors Rods and cones in the eye Photodiodes attached to a CCD in a digital camera Dye particles in traditional film Typically, an aperture restricts the directions from which the light can come Then, a lens focuses the light onto the sensor elements

26
Irradiance sensors can't produce an image because they average over all directions Lens + aperture = directionally specific Consequently, the sensors measure radiance (L), the density of light per flow area AND incoming direction

27
In a rendering system, radiance is computed rather than measured A radiance sample for each imaginary sensor element is made along a ray that goes through the point representing the sensor and point p, the center of projection for the perspective transform The sample is computed by using a shading equation along the view ray v

28

29
After all this hoopla is done, we need a mathematical equation to say what the color (radiance) at a particular pixel is There are many equations to use and people still do research on how to make them better Remember, these are all rule of thumb approximations and are only distantly related to physical law

30
Diffuse exitance M diff = c diff E L cos θ Lambertian (diffuse) shading assumes that outgoing radiance is (linearly) proportional to irradiance Because diffuse radiance is assumed to be the same in all directions, we divide by π (explained later) Final Lambertian radiance L diff =

31

32
Shading Lambertian Gouraud Phong Anti-aliasing

33
Keep working on Project 2, due Friday, March 13 Keep reading Chapter 5 Exam 1 is next Friday in class Start reviewing everything up to today

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google