Chapter 2 Lighting Basics and Good Practices พื้นฐานของแสง และ

Download Report

Transcript Chapter 2 Lighting Basics and Good Practices พื้นฐานของแสง และ

1
Chapter 2
Lighting Basics and Good Practices
พืน้ ฐานของแสง และทักษะการออกแบบ
อ.พิพฒั ศรัณย์ โพธิ์บุญ : คณะเทคโนโลยีสารสนเทศ
Pipatsarun
13/04/58
2
Pipatsarun
Starting Points
• Where does the lighting process start?
จุดเริ่ มต้นของการออกแบบขึ้นอยูก่ บั ปัจจัย...
- companies and projects
- client or director
สิ่ งที่เราต้องทาหลังจากปัจจัยดังกล่าว
adding, collecting and discussing
จากแหล่งข้อมูลภาพที่เป็ นไปได้
13/04/58
3
Pipatsarun
13/04/58
Starting Points…Con,
แหล่ งข้ อมูล
• rented movies that contain similar scenes
• and books, magazines, and stock photography catalogs.
Present to Director
จะได้ ......แนวทางและบทสรุ ปในการออกแบบ
(right direction)
4
Pipatsarun
13/04/58
Starting Points…Con,
• ถ้าคุณทางานเกี่ยวกับ visual effects shots
คุณต้องพิจารณา เรื่ องเกี่ยวกับ
- angle and sharpness of the shadows,
- colors, tones, and level of contrast in the scene
และสุ ดท้าย
Matching the lighting from real locations
5
Pipatsarun
13/04/58
Starting Points…Con,
• ถ้าคุณทางานเกี่ยวกับ animated production
คุณต้องพิจารณา เรื่ องเกี่ยวกับ
- look of the scenes
- colors and tones ที่ปรากฏอยูใ่ นภาพ
และสุ ดท้าย
- implement the lighting design โดยใช้เทคนิค 3D Animation
6
Pipatsarun
13/04/58
Types of Lights
• เริ่ มต้นโดยการ setting up lighting in 3D scene โดยดูวา่ แสงชนิดใดที่จะถูกเพิ่ม
เข้าไป โดยพิจารณาจาก real-world types of light sources และเลือก Tools
ที่เหมาะสมในการสร้างแต่ละ Projects
7
Pipatsarun
13/04/58
Point Lights -- all directions
• A point light emits light uniformly in all directions, casting shadows that radiate
out from the light's position
(ปล่อยออกมาจากทุกทิศทางโดย
point light ใน 3D graphicsจะใช้วธิ ี
จาลอง light bulb ) Point light จะถูกปล่อย
ออกมาแบบไม่มีที่สิ้นสุ ดไม่มีทศทาง
8
Pipatsarun
13/04/58
Point Lights -- all directions
• Icons for a point light in Lightwave 3d, a Radial light in Electric Image, a point
light in Maya, and a point light in Softimage. All perform similar functions.
กาหนดข้อจากัดของทิศทาง และรู ปทรงของวัตถุได้ตามที่แสงสามารถส่ งถึงได้ดว้ ยโปรแกรมตาม
ชนิดของ effect เพราะ spotlightsในโปรแกรมสามารถควบคุมทิศทางได้
9
Pipatsarun
13/04/58
Point Lights -- all directions
• When positioned within a light fixture and set to cast shadows, a point light can
appear similar to a spotlight
10
Pipatsarun
13/04/58
Spotlights
ส่ วนใหญ่การออกแบบแสง Spotlights จะใช้วธิ ี computer graphics เพราะสามารถควบคุม
ความสมบูรณ์ได้ ไม่วา่ จะเป็ นทิศทาง จุดกาเนิดแสง และการปรับหมุนบริ เวณโดยรอบตาม
ทิศทางที่แตกต่างกัน
A spotlight's illumination is limited to a cone aimed in a specific direction.
11
Pipatsarun
Spotlights…Con,
Multiple spotlights can be aimed in different directions,
giving the appearance of an omnidirectional light while
allowing more control over where the lights are aimed.
** แสงที่ตกกระทบกับกาแพงเป็ นลักษณะ cone angle
(ความกว้างของลาแสง Spotlights ) และในขณะเดียว
กันก็เกิด penumbra angle (ส่ วนเงามัวที่ลอ้ มรอบเงามืด)
penumbra angle (ส่ วนเงามัวที่ลอ้ มรอบเงามืด) คือ
ความนุ่มนวลของแสงรอบๆของลาแสง Spotlights
13/04/58
12
Pipatsarun
13/04/58
Spotlights…Con,
With hard-edged lights (left), you can see every spotlight cone distinctly. As the penumbra angle is
increased (center), the lights begin to merge; when the lights are soft enough (right), they merge
together so that you cannot distinguish between the individual sources.
spotlights can add subtle illumination to a scene
Subtle : ความบาง
illumination : การส่องสว่าง
13
Pipatsarun
13/04/58
Spotlights…Con,
• Spotlights จะมี Option ที่เรี ยกว่า “ barn doors” ควบคุมแสงได้ท้ งั แนวนอนและ
แนวตั้ง
Besides having control over aiming a light, barn doors also allow a cinematographer to limit
the coverage of a spotlight to less than its natural
cone angle.
• Barn doors in 3D graphics give you the same
kind of creative control
Spotlights นิยมใช้มากใน computer Graphic
เพราะมีผลอย่างมากเกี่ยวกับเรื่ องชนิ ดของเงา
14
Pipatsarun
13/04/58
Directional Lights
• which is particularly useful for simulating direct sunlight distant, direct, infinite,
or sun light in different programs
A 3D Studio Max target direct light, directional lights
in Alias Power Animator and Maya, and an Infinite
light in Softimage, all serve the same purpose
15
Pipatsarun
13/04/58
Directional Lights..Con,
• the directional light aims down and to the left
• A directional light creates parallel shadows and illumination that strikes each
object from the same angle
• you normally would only see in shadows from a very distant light source such as the sun
16
Pipatsarun
13/04/58
Area Lights
• An area light is a type of light that simulates the size of a physical light
source in real life With …
“ point, spot, and directional lights, scaling up”
• area light ขึ้นอยูก่ บั ความแตกต่างของรู ปทรงวัตถุ ประกอบด้วย
▫ spherical area lights, rectangles, discs, and linear lights
17
Pipatsarun
13/04/58
Models Serving as Lights
• โปรแกรมบางตัว 3D Model สามารถออกแบบโดยใช้ Function light source
• such as a neon sign, can be used as a true light source
Using an object as a light allows for odd shapes such as fluorescent rings or neon
tubes. “professionals avoid it because it makes rendering too slow”
18
Pipatsarun
13/04/58
Environment Spheres
• environment sphere (อาจเรี ยกได้วา่ sky dome)
special light source that surrounds and provides illumination จะเหมือนกับแสง
จากท้องฟ้ า
• เมื่อเราสร้าง environment sphere กับภาพ ..สี ของภาพจะสว่าง และจะ illumination ทัว่ ทุก
ทิศทางด้วย เทคนิคนี้เรี ยกว่า image based lighting (IBL)
19
Pipatsarun
13/04/58
Ambient Light
• ambient light แสงที่อยูร่ อบๆ ถ้าเป็ นแสงจากท้องฟ้ า ก็จะเกิดแสงตกกระทบไปที่
สนามหรื อพื้น
• คอมพิวเตอร์ กราฟิ ก ส่ วนมากจะใช้ คุณสมบัติ global ambience
• shows the flat, unrealistic shading that comes from using ambient light as a fill
light.
Ambience : สิ่ งแวดล้อม
20
Pipatsarun
13/04/58
Controls and Options
• หลังจากที่เราเพิ่มแสงแล้ว ขั้นตอนต่อไป สามารถคุณสมบัติของแสงให้ดียงิ่ ขึ้น
และเพิ่มคุณสมบัติของเงา โดยสามารถควบคุมและเลือกคุณสมบัติได้ ดังนี้
Decay : ทาให้ต่าลง
หรื อ อาจเรี ยกว่า “attenuation” or “distance fall off” ควบคุมโดยวิธีการลดแสงลง
ด้วยระยะทาง
ตัวอย่าง
ซ้าย : Without decay
ขวา: inverse square/quadratic
21
Pipatsarun
13/04/58
Controls and Options…Con,
• Some software offers a multiple-choice setting between three or four specific
types of decay
22
Pipatsarun
13/04/58
Controls and Options…Con,
• Inverse Square Decay
inverse square decay (also called quadratic or a decay rate of 2) เป็ นลักษณะ
real light เป็ นการแผ่รังสี ของแสงที่กระจายออกเกินกว่าพื้นที่วา่ ง รังสี ของแสงจะ
แผ่กระจายออกไปในระยะทางที่กว้างมาก
Six rays of light hit a nearby surface, while half as many hit a surface at twice the distance. This
difference over the height and width of a surface makes an object twice as far away receive one-quarter
as much light
23
Pipatsarun
13/04/58
Controls and Options…Con,
• Inverse Square Decay ต่ อ
แต่ถา้ แหล่งกาเนิดแสงเห็นได้ในระยะสั้นๆ เช่น แสงจากไม้ขีดไฟ หรื อตะเกียงที่ถูกเปิ ดอยูบ่ น
โต๊ะ ก็ถือว่าเป็ นรู ปแบบ Inverse Square Decay ที่เห็นได้ชดั ที่สุด
An inverse square decay is useful when a light source (such as this match) is
visible within a scene. (Character by Rini Sugianto)
24
Pipatsarun
13/04/58
Controls and Options…Con,
• Using No Decay ไม่มีคุณสมบัติของ Inverse Square หรื อการให้แสงกับพื้นที่
ขนาดกว้างๆ คล้ายกับแสงพระอาทิตย์ จากตัวอย่าง เป็ นแสงพระอาทิตย์ที่ส่องเข้า
ไปในห้องตามธรรมชาติ ไม่มีแสงไฟหรื อจุดกาเนิดแสงอื่นๆ
25
Pipatsarun
13/04/58
Controls and Options…Con,
• Other Decay Settings
▫ decay of 3 (cubic)
 แสงที่อยูใ่ นหมอกหนา,ใต้น้ าลึก จะเป็ น Very high decays
▫ decay of 1 (linear)
 คล้ายแสงที่สะท้อนจากพื้น
• ลักษณะของการกาหนด decay ในโปรแกรมส่ วนใหญ่กาหนดด้วยคุณสมบัติของ
ค่า distance
26
Pipatsarun
13/04/58
Diffuse and Specular (กระจายและสะท้ อน)
• Diffuse : การที่แสงสะท้อนหรื อกระทบตัวกลางที่มีพ้ืนผิวไม่
เรี ยบ และกระจายทิศทางการสะท้อนหรื อการนาแสง โดยไม่
อิงกับ แนวฉาก ทาให้วตั ถุที่สะท้อนมีความสว่างเท่าๆโดยไม่
ขึ้นกับทิศทางของผูส้ ังเกตเหมือนการสะท้อนแบบกระจกหรื อ
specular เช่นการสะท้อนแบบ diffuse ของแป้ ง หรื อในการวิ่ง
ผ่ า นการที่ แสงวิ่ ง ผ่ า นเทฟลอนหรื อกระดาษ (diffuse
transmission) โดยทั่ว ไปวัส ดุ จ ะสะท้อ นแสงได้ท้ งั แบบ
specular และแบบ diffuse ผสมกันในสัดส่ วนต่างๆกันไปตาม
ชนิ ดของวัสดุ ซึ่ งถ้าวัสดุสะท้อนแบบ diffuse ทั้งหมด (ไม่มี
แบบ specular ผสม) แสงสะท้อนจะกระจายทัว่ ครึ่ งทรงกลม
โดยรอบพื้นผิวนั้น
27
Pipatsarun
13/04/58
Diffuse and Specular (กระจายและสะท้ อนแสง) Con,
• Specular เป็ นลักษณะการสะท้อนแสงที่สมบูรณ์เช่ น
การสะท้ อ นของกระจกเงา หรื ออาจหมายถึ ง การ
สะท้อนบางช่วงของสเปกตรัมที่มีลกั ษณะดังกล่าวก็ได้
โดยการสะท้อนแบบนี้ จะแตกต่างจากการสะท้อนแบบ
Diffuse reflection ที่ความสว่างจะไม่ข้ ึนกับมุมมอง เช่น
ถ้าเราเดินผ่านตัวถังรถยนต์ซ่ ึ งมักใช้สีสะท้อนแสงเป็ น
เงาวาวแบบ specular เราจะเห็นแสงสะท้อนเปลี่ยนไป
ในแต่ ล ะมุ ม มอง ต่ า งจากถนนคอนกรี ตที่ เ ป็ นการ
สะท้อนแบบ diffuse มากกว่า specular โดยเราจะเห็น
พื้นผิวคอนกรี ตเป็ นสี เดิมไม่วา่ จะมองมาจากทิศทางใด
28
Pipatsarun
13/04/58
light can emit diffuse illumination (left), specular
illumination (center), or both (right). Con,
29
Pipatsarun
13/04/58
Light Linking
Light linking allows you to cheat, and illuminate some objects using a light with a
different angle, color, or intensity than what illuminates other objects
30
Pipatsarun
13/04/58
Cookies
A real-life cookie has holes cut out to shape or dapple a spotlight's illumination
31
Pipatsarun
13/04/58
Cookies ใน 3D คือสี ของแสงที่ mappable กับภาพที่เลือก
A texture map used as a cookie (left) breaks up your lighting as if the sun had
filtered through the trees (right)