Emitters#

../../_images/emitter_overview.jpg

Schematic overview of the emitters in 3. The arrows indicate the directional distribution of light.

Mitsuba 3 supports a number of different emitters/light sources, which can be classified into two main categories: emitters which are located somewhere within the scene, and emitters that surround the scene to simulate a distant environment.

Generally, light sources are specified as children of the <scene> element; for instance, the following snippet instantiates a point light emitter that illuminates a sphere:

<scene version=3.0.0>
    <!-- .. scene contents .. -->

    <emitter type="point">
        <rgb name="intensity" value="1"/>
        <point name="position" x="0" y="0" z="-2"/>
    </emitter>

    <shape type="sphere"/>
</scene>

An exception to this are area lights, which turn a geometric object into a light source. These are specified as children of the corresponding <shape> element:

<scene version=3.0.0>
    <!-- .. scene contents .. -->

    <shape type="sphere">
        <emitter type="area">
            <rgb name="radiance" value="1"/>
        </emitter>
    </shape>
</scene>

Area light (area)#

Parameter

Type

Description

Flags

radiance

spectrum or texture

Specifies the emitted radiance in units of power per unit area per unit steradian.

P,

This plugin implements an area light, i.e. a light source that emits diffuse illumination from the exterior of an arbitrary shape. Since the emission profile of an area light is completely diffuse, it has the same apparent brightness regardless of the observer’s viewing direction. Furthermore, since it occupies a nonzero amount of space, an area light generally causes scene objects to cast soft shadows.

To create an area light source, simply instantiate the desired emitter shape and specify an area instance as its child:

<shape type="sphere">
    <emitter type="area">
        <rgb name="radiance" value="1.0"/>
    </emitter>
</shape>

Point light source (point)#

Parameter

Type

Description

Flags

intensity

spectrum

Specifies the radiant intensity in units of power per unit steradian.

P,

position

point

Alternative parameter for specifying the light source position. Note that only one of the parameters to_world and position can be used at a time.

P

to_world

transform

Specifies an optional emitter-to-world transformation. (Default: none, i.e. emitter space = world space)

This emitter plugin implements a simple point light source, which uniformly radiates illumination into all directions.

<emitter type="point">
    <point name="position" value="0.0, 5.0, 0.0"/>
    <rgb name="intensity" value="1.0"/>
</emitter>

Constant environment emitter (constant)#

Parameter

Type

Description

Flags

radiance

spectrum

Specifies the emitted radiance in units of power per unit area per unit steradian.

P,

This plugin implements a constant environment emitter, which surrounds the scene and radiates diffuse illumination towards it. This is often a good default light source when the goal is to visualize some loaded geometry that uses basic (e.g. diffuse) materials.

<emitter type="constant">
    <rgb name="radiance" value="1.0"/>
</emitter>

Environment emitter (envmap)#

Parameter

Type

Description

Flags

filename

string

Filename of the radiance-valued input image to be loaded; must be in latitude-longitude format.

bitmap

Bitmap object

When creating a Environment emitter at runtime, e.g. from Python or C++, an existing Bitmap image instance can be passed directly rather than loading it from the filesystem with filename.

scale

float

A scale factor that is applied to the radiance values stored in the input image. (Default: 1.0)

P,

to_world

transform

Specifies an optional emitter-to-world transformation. (Default: none, i.e. emitter space = world space)

P

State parameters

mis_compensation

boolean

Compensate sampling for the presence of other Monte Carlo techniques that will be combined using multiple importance sampling (MIS)? This is extremely cheap to do and can slightly reduce variance. (Default: false)

data

tensor

Tensor array containing the radiance-valued data.

P, , D

This plugin provides a HDRI (high dynamic range imaging) environment map, which is a type of light source that is well-suited for representing “natural” illumination.

The implementation loads a captured illumination environment from a image in latitude-longitude format and turns it into an infinitely distant emitter. The conventions of this mapping are shown in this image:

../../_images/emitter_envmap_example.jpg

The museum environment map by Bernhard Vogl that is used in many example renderings in this documentation.#

../../_images/emitter_envmap_axes.jpg

Coordinate conventions used when mapping the input image onto the sphere.#

The plugin can work with all types of images that are natively supported by Mitsuba (i.e. JPEG, PNG, OpenEXR, RGBE, TGA, and BMP). In practice, a good environment map will contain high-dynamic range data that can only be represented using the OpenEXR or RGBE file formats. High quality free light probes are available on Bernhard Vogl’s website or Polyhaven.

<emitter type="envmap">
    <string name="filename" value="textures/museum.exr"/>
</emitter>

Spot light source (spot)#

Parameter

Type

Description

Flags

intensity

spectrum

Specifies the maximum radiant intensity at the center in units of power per unit steradian. (Default: 1). This cannot be spatially varying (e.g. have bitmap as type).

P,

cutoff_angle

float

Cutoff angle, beyond which the spot light is completely black (Default: 20 degrees)

beam_width

float

Subtended angle of the central beam portion (Default: \(cutoff_angle \times 3/4\))

texture

texture

An optional texture to be projected along the spot light. This must be spatially varying (e.g. have bitmap as type).

P,

to_world

transform

Specifies an optional emitter-to-world transformation. (Default: none, i.e. emitter space = world space)

P

This plugin provides a spot light with a linear falloff. In its local coordinate system, the spot light is positioned at the origin and points along the positive Z direction. It can be conveniently reoriented using the lookat tag, e.g.:

<emitter type="spot">
    <transform name="to_world">
        <!-- Orient the light so that points from (1, 1, 1) towards (1, 2, 1) -->
        <lookat origin="1, 1, 1" target="1, 2, 1" up="0, 0, 1"/>
    </transform>
    <rgb name="intensity" value="1.0"/>
</emitter>

The intensity linearly ramps up from cutoff_angle to beam_width (both specified in degrees), after which it remains at the maximum value. A projection texture may optionally be supplied.

../../_images/emitter_spot_no_texture.jpg

Two spot lights with different colors and no texture specified.#

../../_images/emitter_spot_texture.jpg

A spot light with a texture specified.#

Projection light source (projector)#

Parameter

Type

Description

Flags

irradiance

texture

2D texture specifying irradiance on the emitter’s virtual image plane, which lies at a distance of \(z=1\) from the pinhole. Note that this does not directly correspond to emitted radiance due to the presence of an additional directionally varying scale factor equal to to the inverse sensitivity profile (a.k.a. importance) of a perspective camera. This ensures that a projection of a constant texture onto a plane is truly constant.

P,

scale

float

A scale factor that is applied to the radiance values stored in the above parameter. (Default: 1.0)

P,

to_world

transform

Specifies an optional camera-to-world transformation. (Default: none (i.e. camera space = world space))

P

fov

float

Denotes the camera’s field of view in degrees—must be between 0 and 180, excluding the extremes. Alternatively, it is also possible to specify a field of view using the focal_length parameter.

focal_length

string

Denotes the camera’s focal length specified using 35mm film equivalent units. Alternatively, it is also possible to specify a field of view using the fov parameter. See the main description for further details. (Default: 50mm)

fov_axis

string

When the parameter fov is given (and only then), this parameter further specifies the image axis, to which it applies.

  1. x: fov maps to the x-axis in screen space.

  2. y: fov maps to the y-axis in screen space.

  3. diagonal: fov maps to the screen diagonal.

  4. smaller: fov maps to the smaller dimension (e.g. x when width < height)

  5. larger: fov maps to the larger dimension (e.g. y when width < height)

The default is x.

This emitter is the reciprocal counterpart of the perspective camera implemented by the perspective plugin. It accepts exactly the same parameters and employs the same pixel-to-direction mapping. In contrast to the perspective camera, it takes an extra texture (typically of type bitmap) as input that it then projects into the scene, with an optional scaling factor.

Pixels are importance sampled according to their density, hence this operation remains efficient even if only a single pixel is turned on.

../../_images/emitter_projector_constant.jpg

A projector lights with constant irradiance (no texture specified).#

../../_images/emitter_projector_textured.jpg

A projector light with a texture specified.#

<emitter type="projector">
    <rgb name="irradiance" value="1.0"/>
    <float name="fov" value="45"/>
    <transform name="to_world">
        <lookat origin="1, 1, 1"
                target="1, 2, 1"
                up="0, 0, 1"/>
    </transform>
</emitter>

Distant directional emitter (directional)#

Parameter

Type

Description

Flags

irradiance

spectrum

Spectral irradiance, which corresponds to the amount of spectral power per unit area received by a hypothetical surface normal to the specified direction.

P,

to_world

transform

Emitter-to-world transformation matrix.

P

direction

vector

Alternative (and exclusive) to to_world. Direction towards which the emitter is radiating in world coordinates.

This emitter plugin implements a distant directional source which radiates a specified power per unit area along a fixed direction. By default, the emitter radiates in the direction of the positive Z axis, i.e. \((0, 0, 1)\).

<emitter type="directional">
    <vector name="direction" value="1.0, 0.0, 0.0"/>
    <rgb name="irradiance" value="1.0"/>
</emitter>

Directional area light (directionalarea)#

Parameter

Type

Description

Flags

radiance

spectrum

Specifies the emitted radiance in units of power per unit area per unit steradian.

P,

Similar to an area light, but emitting only in the normal direction.

Note

This can only be rendered correctly with a particle tracer, since rays traced from the camera and surfaces have zero probability of connecting with this emitter at exactly the correct angle.

<shape type="sphere">
    <emitter type="directionalarea">
        <rgb name="radiance" value="1.0"/>
    </emitter>
</shape>