fresnel.light#

Overview

Light

A light.

butterfly

Create a butterfly lighting setup.

cloudy

Create a cloudy day lighting setup.

lightbox

Create a light box lighting setup.

loop

Create a loop lighting setup.

rembrandt

Create a Rembrandt lighting setup.

ring

Create a ring lighting setup.

Details

Lights.

Light objects in a Scene.

See also

Tutorials:

class fresnel.light.Light(direction, color=(1, 1, 1), theta=0.375)#

A light.

Parameters:
  • direction ((3, ) numpy.ndarray of float32) – Vector direction the light points (in Camera space).

  • color ((3, ) numpy.ndarray of float32) – 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 that color = (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.

Returns:

The lights.

Return type:

list[Light]

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:

The lights.

Return type:

list[Light]

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.

Returns:

The lights.

Return type:

list[Light]

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:

The lights.

Return type:

list[Light]

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:

The lights.

Return type:

list[Light]

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:

The lights.

Return type:

list[Light]