fresnel.light¶
Overview
Define a single 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 provide light to a fresnel.Scene
.
Without lights, nothing will be visible in the scene. Fresnel provides a number of quality lighting setups for your use, and you can always define custom lights.
-
class
fresnel.light.
Light
(direction, color=(1, 1, 1), theta=0.375)¶ Define a single light
- Parameters
direction (
numpy.ndarray
orarray_like
) – (3
,float32
) - Vector direction the light points (in camera space).color (
numpy.ndarray
orarray_like
) – (3
,float32
) - Linear RGB color and intensity of the light.theta (float) – Half angle of the cone that defines the area of the light (radians).
The direction vector may have any non-zero length, but only the direction the vector points matters.
The color also sets the light intensity. A
(0.5, 0.5, 0.5)
light is twice as bright as(0.25, 0.25, 0.25)
.
-
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.
- Returns
A list of lights.
-
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.
- Returns
A list of lights.
-
fresnel.light.
lightbox
()¶ Create a light box lighting setup.
The light box lighting setup places a single massive area light that covers the top, bottom, left, and right. Use path tracing for best results with this setup.
- Returns
A list of lights.
-
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).
- Parameters
side (str) – ‘right’ or ‘left’ to choose which side of the camera to place the key light.
- Returns
A list of lights.
-
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).
- Parameters
side (str) – ‘right’ or ‘left’ to choose which side of the camera to place the key light.
- Returns
A list of lights.
-
fresnel.light.
ring
()¶ Create a ring lighting setup.
The ring lighting setup provides a strong front area light. This type of lighting is common in fashion photography. Use path tracing for best results with this setup.
- Returns
A list of lights.