fresnel.light¶
Overview
A light. |
|
Create a butterfly lighting setup. |
|
Create a cloudy day lighting setup. |
|
Create a light box lighting setup. |
|
Create a loop lighting setup. |
|
Create a Rembrandt lighting setup. |
|
Create a ring lighting setup. |
Details
Lights.
Light objects in a Scene
.
-
class
fresnel.light.
Light
(direction, color=(1, 1, 1), theta=0.375)¶ A light.
- Parameters
direction ((3, )
numpy.ndarray
offloat32
) – Vector direction the light points (inCamera
space).color ((3, )
numpy.ndarray
offloat32
) – Linear RGB color and intensity of the light.theta (float) – Half angle of the cone that defines the area of the light (in radians).
In fresnel, lights are area lights at an infinite distance away in the given direction and are circular with the size set by theta. color sets the light intensity. A
(0.5, 0.5, 0.5)
light is twice as bright as(0.25, 0.25, 0.25)
. Lights are normalized so thatcolor = (1, 1, 1)
should provide approximately a correct exposure. Color values greater than 1 are allowed.Note
direction is in
Camera
space. A direction of (1, 0, 0) sets a light coming from the right in the image, regardless of the camera position.
-
fresnel.light.
butterfly
()¶ Create a butterfly lighting setup.
The butterfly portrait lighting setup is front lighting with the key light (index 0) placed high above the camera and the fill light (index 1) below the camera.
-
fresnel.light.
cloudy
()¶ Create a cloudy day lighting setup.
The cloudy lighting setup mimics a cloudy day. A strong light comes from all directions above. A weaker light comes from all directions below (accounting for light reflected off the ground). Use
Path
tracing for best results with this setup.
-
fresnel.light.
lightbox
()¶ Create a light box lighting setup.
The light box lighting setup places a single area light that covers the top, bottom, left, and right. Use
Path
tracing for best results with this setup.
-
fresnel.light.
loop
(side='right')¶ Create a loop lighting setup.
The loop portrait lighting setup places the key light slightly to one side of the camera and slightly up (index 0). The fill light is on the other side of the camera at the level of the camera (index 1).
-
fresnel.light.
rembrandt
(side='right')¶ Create a Rembrandt lighting setup.
The Rembrandt portrait lighting setup places the key light 45 degrees to one side of the camera and slightly up (index 0). The fill light is on the other side of the camera at the level of the camera (index 1).