CookieLightFilter

Overview


Why the name? Cookie is a nickname for Cucoloris - a device used in live action lighting to create shadow patterns.

The cookie light filter projects a pattern from either an orthographic or perspective camera. The filter takes as its input a Moonray map shader, so any of the image generators, noise, checkerboard, image map will work.

Cookie light filter. Example render using the light filter.
Orthographic projection. Example render using orthographic projection.
Perspective projection. Example render using perspective projection.

The cookie texture inherits the wrap mode on the map shader, e.g. “extend” or “repeat”:

“extend” wrap mode. “repeat” wrap mode.

Attribute Reference

Properties attributes

blur_far_distance

Float
default: 1.0

Distance from cookie filter

blur_far_value

Float
default: 0.0

Blur filter radius (in texture UV space) at the far distance

blur_mid_value

Float
default: 0.0

Blur filter radius (in texture UV space) at the mid distance

blur_midpoint

Float
default: 0.5

Distance from cookie filter

blur_near_distance

Float
default: 0.0

Distance from cookie filter

blur_near_value

Float
default: 0.0

Blur filter radius (in texture UV space) at the near distance

blur_type

Int enum
  0 = “gaussian” (default)
  1 = “circular”

Gaussian or circular blur

density

Float
default: 1.0

Controls how much of the cookie is added to the light

invert

Bool
default: False

Inverts the map

outside_projection

Int enum
  0 = “black” (default)
  1 = “white”
  2 = “default”

What happens outside the frustum of the projection camera. Black (default), White, or Default (This uses the mode set on the Moonray map shader)

projector

Camera
default: None

If a projector is specified, it overrides the node_xform and projector_* attributes

texture_map

Map
default: None

Moonray map. Any Moonray map generator, checkerboard, noise, image map. You may also add any of the map modifiers, color correct for example. The default is an image map.

General attributes

node_xform

Mat4d blurrable
default: [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ]

Filter orientation

on

Bool
default: True

Turns the light filter on/off.

projector_film_width_aperture

Float
default: 24.0

Size of the camera image plane

projector_focal

Float
default: 30.0

Focal length of the lens when using perspective projection

projector_pixel_aspect_ratio

Float
default: 1.0

Aspect ratio of the projection

projector_type

Int enum
  0 = “perspective” (default)
  1 = “orthographic”

Perspective or orthographic projection