Download Lighting and Shading

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Grow light wikipedia , lookup

Bicycle lighting wikipedia , lookup

Photopolymer wikipedia , lookup

Gravitational lens wikipedia , lookup

Light pollution wikipedia , lookup

Doctor Light (Kimiyo Hoshi) wikipedia , lookup

Bioluminescence wikipedia , lookup

Lighting wikipedia , lookup

Daylighting wikipedia , lookup

Photoelectric effect wikipedia , lookup

Architectural lighting design wikipedia , lookup

Doctor Light (Arthur Light) wikipedia , lookup

Transcript
Lighting
CSIS 5838:
Graphics and Animation for Gaming
Terminology
• ϴL: Incident light angle to point on surface
• ϴV: Incident viewing angle to point on surface
• K: Intensity of light source
Image
plane
Light source
(intensity I)
Focal point of camera
ϴV
ϴL
Surface in image
Reflected Light
• Amount of light received by surface proportional to
K cos(ϴL)
Light source
Light concentrated in
smallest area at ϴL = 90°
Light more “spread out”
at smaller ϴL
Shape from Shading
• Brain reverses this process, interpolating shape from
shading across surface
– No variation in lighting  flat surface
– Slow variation in lighting  curved surface
– Sharp variation in lighting  corners
Smooth Shading
• Can create illusion that non-curved surface is curved
– More efficient than adding large number of vertices
• Interpolate curve through series of edges
– Often done with Bezier curves (built into Blender)
• Render image based on interpolated curves, not
actual surface
Diffuse Reflection
• Portion of light “scattered” from surface, reflecting in
all directions ϴV
Image
plane
Light source
Focal point of camera
ϴV
ϴL
Surface in image
Specular Reflection
• Portion of light directly reflected from surface,
only visible if ϴV = ϴL (Snell’s law)
Light source
Not visible
visible
ϴL
ϴV
Surface in image
Specular Reflection in Blender
• “Hardness” parameter defines additional angles at
which specular light visible
• Light intensity function of |ϴL - ϴv|/hardness
Intensity
Hardness = 2
Hardness
= 20
ϴL - ϴ V
Lambertian Model
• Assumption:
Amount of light reflected in direction ϴV = K cos(ϴV)
– Most light reflected
normal to surface
– Less light reflected
parallel to surface
Lambertian Model
• Amount of surface projected to camera inversely
proportional to ϴV
• = 1/cos(ϴV)
Light source
Smallest surface
at ϴv = 90°
More surface at smaller ϴV
Lambertian Model
• Amount of light received by camera =
K cos(ϴV) * 1/cos(ϴV)
• Lambertian assumption: Amount of light percieved
independent of viewing direction
– Simplest to compute
– Close to being true for many surfaces (moon)