Core API Reference

Object

class mitsuba.core.Object

Object base class with builtin reference counting

This class (in conjunction with the ‘ref’ reference counter) constitutes the foundation of an efficient reference-counted object hierarchy. The implementation here is an alternative to standard mechanisms for reference counting such as std::shared_ptr from the STL.

Why not simply use std::shared_ptr? To be spec-compliant, such shared pointers must associate a special record with every instance, which stores at least two counters plus a deletion function. Allocating this record naturally incurs further overheads to maintain data structures within the memory allocator. In addition to this, the size of an individual shared_ptr references is at least two data words. All of this quickly adds up and leads to significant overheads for large collections of instances, hence the need for an alternative in Mitsuba.

In contrast, the Object class allows for a highly efficient implementation that only adds 32 bits to the base object (for the counter) and has no overhead for references.

__init__(self)

Default constructor

__init__(self, arg0)

Copy constructor

Parameter arg0 (mitsuba.core.Object):

no description available

class_(self)

Return a Class instance containing run-time type information about this Object

See also:

Class

Returns → mitsuba.core.Class:

no description available

dec_ref(self, dealloc=True)

Decrease the reference count of the object and possibly deallocate it.

The object will automatically be deallocated once the reference count reaches zero.

Parameter dealloc (bool):

no description available

Returns → None:

no description available

expand(self)

Expand the object into a list of sub-objects and return them

In some cases, an Object instance is merely a container for a number of sub-objects. In the context of Mitsuba, an example would be a combined sun & sky emitter instantiated via XML, which recursively expands into a separate sun & sky instance. This functionality is supported by any Mitsuba object, hence it is located this level.

Returns → list:

no description available

id(self)

Return an identifier of the current instance (if available)

Returns → str:

no description available

inc_ref(self)

Increase the object’s reference count by one

Returns → None:

no description available

parameters_changed(self, keys=[])

Update internal state after applying changes to parameters

This function should be invoked when attributes (obtained via traverse) are modified in some way. The obect can then update its internal state so that derived quantities are consistent with the change.

Parameter keys (List[str]):

Optional list of names (obtained via traverse) corresponding to the attributes that have been modified. Can also be used to notify when this function is called from a parent object by adding a “parent” key to the list. When empty, the object should assume that any attribute might have changed.

Remark:

The default implementation does nothing.

See also:

TraversalCallback

Returns → None:

no description available

ref_count(self)

Return the current reference count

Returns → int:

no description available

traverse(self, cb)

Traverse the attributes and object graph of this instance

Implementing this function enables recursive traversal of C++ scene graphs. It is e.g. used to determine the set of differentiable parameters when using Mitsuba for optimization.

Remark:

The default implementation does nothing.

See also:

TraversalCallback

Parameter cb (mitsuba.core.TraversalCallback):

no description available

Returns → None:

no description available


Properties

class mitsuba.core.Properties

Associative parameter map for constructing subclasses of Object.

Note that the Python bindings for this class do not implement the various type-dependent getters and setters. Instead, they are accessed just like a normal Python map, e.g:

TODO update

myProps = mitsuba.core.Properties("plugin_name")
myProps["stringProperty"] = "hello"
myProps["spectrumProperty"] = mitsuba.core.Spectrum(1.0)
__init__(self)

Construct an empty property container

__init__(self, arg0)

Construct an empty property container with a specific plugin name

Parameter arg0 (str):

no description available

__init__(self, arg0)

Copy constructor

Parameter arg0 (mitsuba.core.Properties):

no description available

copy_attribute(self, arg0, arg1, arg2)

Copy a single attribute from another Properties object and potentially rename it

Parameter arg0 (mitsuba.core.Properties):

no description available

Parameter arg1 (str):

no description available

Parameter arg2 (str):

no description available

Returns → None:

no description available

has_property(self, arg0)

Verify if a value with the specified name exists

Parameter arg0 (str):

no description available

Returns → bool:

no description available

id(self)

Returns a unique identifier associated with this instance (or an empty string)

Returns → str:

no description available

mark_queried(self, arg0)

Manually mark a certain property as queried

Parameter arg0 (str):

no description available

Returns → bool:

True upon success

merge(self, arg0)

Merge another properties record into the current one.

Existing properties will be overwritten with the values from props if they have the same name.

Parameter arg0 (mitsuba.core.Properties):

no description available

Returns → None:

no description available

plugin_name(self)

Get the associated plugin name

Returns → str:

no description available

property_names(self)

Return an array containing the names of all stored properties

Returns → List[str]:

no description available

remove_property(self, arg0)

Remove a property with the specified name

Parameter arg0 (str):

no description available

Returns → bool:

True upon success

set_id(self, arg0)

Set the unique identifier associated with this instance

Parameter arg0 (str):

no description available

Returns → None:

no description available

set_plugin_name(self, arg0)

Set the associated plugin name

Parameter arg0 (str):

no description available

Returns → None:

no description available

unqueried(self)

Return the list of un-queried attributed

Returns → List[str]:

no description available

was_queried(self, arg0)

Check if a certain property was queried

Parameter arg0 (str):

no description available

Returns → bool:

no description available


Bitmap

class mitsuba.core.Bitmap

Base class: mitsuba.core.Object

General-purpose bitmap class with read and write support for several common file formats.

This class handles loading of PNG, JPEG, BMP, TGA, as well as OpenEXR files, and it supports writing of PNG, JPEG and OpenEXR files.

PNG and OpenEXR files are optionally annotated with string-valued metadata, and the gamma setting can be stored as well. Please see the class methods and enumerations for further detail.

__init__(self, pixel_format, component_format, size, channel_count=0)

Create a bitmap of the specified type and allocate the necessary amount of memory

Parameter pixel_format (mitsuba.core.Bitmap.PixelFormat):

Specifies the pixel format (e.g. RGBA or Luminance-only)

Parameter component_format (mitsuba.core.Struct.Type):

Specifies how the per-pixel components are encoded (e.g. unsigned 8 bit integers or 32-bit floating point values). The component format struct_type_v<Float> will be translated to the corresponding compile-time precision type (Float32 or Float64).

Parameter size (enoki.scalar.Vector2u):

Specifies the horizontal and vertical bitmap size in pixels

Parameter channel_count (int):

Channel count of the image. This parameter is only required when pixel_format = PixelFormat::MultiChannel

Parameter data:

External pointer to the image data. If set to nullptr, the implementation will allocate memory itself.

__init__(self, array, pixel_format=None)

Initialize a Bitmap from a NumPy array

Parameter array (array):

no description available

Parameter pixel_format (object):

no description available

__init__(self, arg0)
Parameter arg0 (mitsuba.core.Bitmap):

no description available

__init__(self, path, format=FileFormat.Auto)
Parameter path (mitsuba.core.filesystem.path):

no description available

Parameter format (mitsuba.core.Bitmap.FileFormat):

no description available

__init__(self, stream, format=FileFormat.Auto)
Parameter stream (mitsuba.core.Stream):

no description available

Parameter format (mitsuba.core.Bitmap.FileFormat):

no description available

class AlphaTransform

Members:

None : No transformation (default)

Premultiply : No transformation (default)

Unpremultiply : No transformation (default)

__init__(self, arg0)
Parameter arg0 (int):

no description available

class FileFormat

Supported image file formats

Members:

PNG

Portable network graphics

The following is supported:

  • Loading and saving of 8/16-bit per component bitmaps for all pixel formats (Y, YA, RGB, RGBA)

  • Loading and saving of 1-bit per component mask bitmaps

  • Loading and saving of string-valued metadata fields

OpenEXR

OpenEXR high dynamic range file format developed by Industrial Light & Magic (ILM)

The following is supported:

  • Loading and saving of Float16 / Float32/ UInt32 bitmaps with all supported RGB/Luminance/Alpha combinations

  • Loading and saving of spectral bitmaps

  • Loading and saving of XYZ tristimulus bitmaps

  • Loading and saving of string-valued metadata fields

The following is not supported:

  • Saving of tiled images, tile-based read access

  • Display windows that are different than the data window

  • Loading of spectrum-valued bitmaps

RGBE

RGBE image format by Greg Ward

The following is supported

  • Loading and saving of Float32 - based RGB bitmaps

PFM

PFM (Portable Float Map) image format

The following is supported

  • Loading and saving of Float32 - based Luminance or RGB bitmaps

PPM

PPM (Portable Pixel Map) image format

The following is supported

  • Loading and saving of UInt8 and UInt16 - based RGB bitmaps

JPEG

Joint Photographic Experts Group file format

The following is supported:

  • Loading and saving of 8 bit per component RGB and luminance bitmaps

TGA

Truevision Advanced Raster Graphics Array file format

The following is supported:

  • Loading of uncompressed 8-bit RGB/RGBA files

BMP

Windows Bitmap file format

The following is supported:

  • Loading of uncompressed 8-bit luminance and RGBA bitmaps

Unknown

Unknown file format

Auto

Automatically detect the file format

Note: this flag only applies when loading a file. In this case, the source stream must support the seek() operation.

__init__(self, arg0)
Parameter arg0 (int):

no description available

class PixelFormat

This enumeration lists all pixel format types supported by the Bitmap class. This both determines the number of channels, and how they should be interpreted

Members:

Y

Single-channel luminance bitmap

YA

Two-channel luminance + alpha bitmap

RGB

RGB bitmap

RGBA

RGB bitmap + alpha channel

XYZ

XYZ tristimulus bitmap

XYZA

XYZ tristimulus + alpha channel

XYZAW

XYZ tristimulus + alpha channel + weight

MultiChannel

Arbitrary multi-channel bitmap without a fixed interpretation

__init__(self, arg0)
Parameter arg0 (int):

no description available

accumulate(overloaded)
accumulate(self, bitmap, source_offset, target_offset, size)

Accumulate the contents of another bitmap into the region with the specified offset

Out-of-bounds regions are safely ignored. It is assumed that bitmap != this.

Remark:

This function throws an exception when the bitmaps use different component formats or channels.

Parameter bitmap (mitsuba.core.Bitmap):

no description available

Parameter source_offset (enoki.scalar.Vector2i):

no description available

Parameter target_offset (enoki.scalar.Vector2i):

no description available

Parameter size (enoki.scalar.Vector2i):

no description available

accumulate(self, bitmap, target_offset)

Accumulate the contents of another bitmap into the region with the specified offset

This convenience function calls the main accumulate() implementation with size set to bitmap->size() and source_offset set to zero. Out-of-bounds regions are ignored. It is assumed that bitmap != this.

Remark:

This function throws an exception when the bitmaps use different component formats or channels.

Parameter bitmap (mitsuba.core.Bitmap):

no description available

Parameter target_offset (enoki.scalar.Vector2i):

no description available

accumulate(self, bitmap)

Accumulate the contents of another bitmap into the region with the specified offset

This convenience function calls the main accumulate() implementation with size set to bitmap->size() and source_offset and target_offset set to zero. Out-of-bounds regions are ignored. It is assumed that bitmap != this.

Remark:

This function throws an exception when the bitmaps use different component formats or channels.

Parameter bitmap (mitsuba.core.Bitmap):

no description available

buffer_size(self)

Return the bitmap size in bytes (excluding metadata)

Returns → int:

no description available

bytes_per_pixel(self)

Return the number bytes of storage used per pixel

Returns → int:

no description available

channel_count(self)

Return the number of channels used by this bitmap

Returns → int:

no description available

clear(self)

Clear the bitmap to zero

Returns → None:

no description available

component_format(self)

Return the component format of this bitmap

Returns → mitsuba.core.Struct.Type:

no description available

convert(overloaded)
convert(self, pixel_format, component_format, srgb_gamma, alpha_transform=AlphaTransform.None)

Convert the bitmap into another pixel and/or component format

This helper function can be used to efficiently convert a bitmap between different underlying representations. For instance, it can translate a uint8 sRGB bitmap to a linear float32 XYZ bitmap based on half-, single- or double-precision floating point-backed storage.

This function roughly does the following:

  • For each pixel and channel, it converts the associated value into a normalized linear-space form (any gamma of the source bitmap is removed)

  • gamma correction (sRGB ramp) is applied if srgb_gamma is True

  • The corrected value is clamped against the representable range of the desired component format.

  • The clamped gamma-corrected value is then written to the new bitmap

If the pixel formats differ, this function will also perform basic conversions (e.g. spectrum to rgb, luminance to uniform spectrum values, etc.)

Note that the alpha channel is assumed to be linear in both the source and target bitmap, hence it won’t be affected by any gamma-related transformations.

Remark:

This convert() variant usually returns a new bitmap instance. When the conversion would just involve copying the original bitmap, the function becomes a no-op and returns the current instance.

pixel_format Specifies the desired pixel format

component_format Specifies the desired component format

srgb_gamma Specifies whether a sRGB gamma ramp should be applied to the ouutput values.

Parameter pixel_format (mitsuba.core.Bitmap.PixelFormat):

no description available

Parameter component_format (mitsuba.core.Struct.Type):

no description available

Parameter srgb_gamma (bool):

no description available

Parameter alpha_transform (mitsuba.core.Bitmap.AlphaTransform):

no description available

Returns → mitsuba.core.Bitmap:

no description available

convert(self, target)
Parameter target (mitsuba.core.Bitmap):

no description available

detect_file_format(arg0)

Attempt to detect the bitmap file format in a given stream

Parameter arg0 (mitsuba.core.Stream):

no description available

Returns → mitsuba.core.Bitmap.FileFormat:

no description available

has_alpha(self)

Return whether this image has an alpha channel

Returns → bool:

no description available

height(self)

Return the bitmap’s height in pixels

Returns → int:

no description available

metadata(self)

Return a Properties object containing the image metadata

Returns → mitsuba::Properties:

no description available

pixel_count(self)

Return the total number of pixels

Returns → int:

no description available

pixel_format(self)

Return the pixel format of this bitmap

Returns → mitsuba.core.Bitmap.PixelFormat:

no description available

premultiplied_alpha(self)

Return whether the bitmap uses premultiplied alpha

Returns → bool:

no description available

resample(overloaded)
resample(self, target, rfilter=None, bc=FilterBoundaryCondition.Clamp, FilterBoundaryCondition.Clamp, clamp=- inf, inf, temp=None)

Up- or down-sample this image to a different resolution

Uses the provided reconstruction filter and accounts for the requested horizontal and vertical boundary conditions when looking up data outside of the input domain.

A minimum and maximum image value can be specified to prevent to prevent out-of-range values that are created by the resampling process.

The optional temp parameter can be used to pass an image of resolution Vector2u(target->width(), this->height()) to avoid intermediate memory allocations.

Parameter target (mitsuba.core.Bitmap):

Pre-allocated bitmap of the desired target resolution

Parameter rfilter (mitsuba.render.ReconstructionFilter):

A separable image reconstruction filter (default: 2-lobe Lanczos filter)

Parameter bch:

Horizontal and vertical boundary conditions (default: clamp)

Parameter clamp (Tuple[float, float]):

Filtered image pixels will be clamped to the following range. Default: -infinity..infinity (i.e. no clamping is used)

Parameter temp (mitsuba.core.Bitmap):

Optional: image for intermediate computations

Parameter bc (Tuple[mitsuba.core.FilterBoundaryCondition, mitsuba.core.FilterBoundaryCondition]):

no description available

resample(self, res, rfilter=None, bc=FilterBoundaryCondition.Clamp, FilterBoundaryCondition.Clamp, clamp=- inf, inf)

Up- or down-sample this image to a different resolution

This version is similar to the above resample() function – the main difference is that it does not work with preallocated bitmaps and takes the desired output resolution as first argument.

Uses the provided reconstruction filter and accounts for the requested horizontal and vertical boundary conditions when looking up data outside of the input domain.

A minimum and maximum image value can be specified to prevent to prevent out-of-range values that are created by the resampling process.

Parameter res (enoki.scalar.Vector2u):

Desired output resolution

Parameter rfilter (mitsuba.render.ReconstructionFilter):

A separable image reconstruction filter (default: 2-lobe Lanczos filter)

Parameter bch:

Horizontal and vertical boundary conditions (default: clamp)

Parameter clamp (Tuple[float, float]):

Filtered image pixels will be clamped to the following range. Default: -infinity..infinity (i.e. no clamping is used)

Parameter bc (Tuple[mitsuba.core.FilterBoundaryCondition, mitsuba.core.FilterBoundaryCondition]):

no description available

Returns → mitsuba.core.Bitmap:

no description available

set_premultiplied_alpha(self, arg0)

Specify whether the bitmap uses premultiplied alpha

Parameter arg0 (bool):

no description available

Returns → None:

no description available

set_srgb_gamma(self, arg0)

Specify whether the bitmap uses an sRGB gamma encoding

Parameter arg0 (bool):

no description available

Returns → None:

no description available

size(self)

Return the bitmap dimensions in pixels

Returns → enoki.scalar.Vector2u:

no description available

split(self)

Split an multi-channel image buffer (e.g. from an OpenEXR image with lots of AOVs) into its constituent layers

Returns → List[Tuple[str, mitsuba.core.Bitmap]]:

no description available

srgb_gamma(self)

Return whether the bitmap uses an sRGB gamma encoding

Returns → bool:

no description available

struct_(self)

Return a Struct instance describing the contents of the bitmap (const version)

Returns → mitsuba.core.Struct:

no description available

vflip(self)

Vertically flip the bitmap

Returns → None:

no description available

width(self)

Return the bitmap’s width in pixels

Returns → int:

no description available

write(overloaded)
write(self, stream, format=FileFormat.Auto, quality=- 1)

Write an encoded form of the bitmap to a stream using the specified file format

Parameter stream (mitsuba.core.Stream):

Target stream that will receive the encoded output

Parameter format (mitsuba.core.Bitmap.FileFormat):

Target file format (OpenEXR, PNG, etc.) Detected from the filename by default.

Parameter quality (int):

Depending on the file format, this parameter takes on a slightly different meaning:

  • PNG images: Controls how much libpng will attempt to compress the output (with 1 being the lowest and 9 denoting the highest compression). The default argument uses the compression level 5.

  • JPEG images: denotes the desired quality (between 0 and 100). The default argument (-1) uses the highest quality (100).

  • OpenEXR images: denotes the quality level of the DWAB compressor, with higher values corresponding to a lower quality. A value of 45 is recommended as the default for lossy compression. The default argument (-1) causes the implementation to switch to the lossless PIZ compressor.

write(self, path, format=FileFormat.Auto, quality=- 1)

Write an encoded form of the bitmap to a file using the specified file format

Parameter stream:

Target stream that will receive the encoded output

Parameter format (mitsuba.core.Bitmap.FileFormat):

Target file format (FileFormat::OpenEXR, FileFormat::PNG, etc.) Detected from the filename by default.

Parameter quality (int):

Depending on the file format, this parameter takes on a slightly different meaning:

  • PNG images: Controls how much libpng will attempt to compress the output (with 1 being the lowest and 9 denoting the highest compression). The default argument uses the compression level 5.

  • JPEG images: denotes the desired quality (between 0 and 100). The default argument (-1) uses the highest quality (100).

  • OpenEXR images: denotes the quality level of the DWAB compressor, with higher values corresponding to a lower quality. A value of 45 is recommended as the default for lossy compression. The default argument (-1) causes the implementation to switch to the lossless PIZ compressor.

Parameter path (mitsuba.core.filesystem.path):

no description available

write_async(self, path, format=FileFormat.Auto, quality=- 1)

Equivalent to write(), but executes asynchronously on a different thread

Parameter path (mitsuba.core.filesystem.path):

no description available

Parameter format (mitsuba.core.Bitmap.FileFormat):

no description available

Parameter quality (int):

no description available

Returns → None:

no description available


XML

mitsuba.core.xml.load_dict(dict)

Load a Mitsuba scene or object from an Python dictionary

Parameter dict (dict):

Python dictionary containing the object description

Returns → object:

no description available


mitsuba.core.xml.load_file(path, update_scene=False, **kwargs)

Load a Mitsuba scene from an XML file

Parameter path (str):

Filename of the scene XML file

Parameter parameters:

Optional list of parameters that can be referenced as $varname in the scene.

Parameter variant:

Specifies the variant of plugins to instantiate (e.g. “scalar_rgb”)

Parameter update_scene (bool):

When Mitsuba updates scene to a newer version, should the updated XML file be written back to disk?

Returns → object:

no description available


mitsuba.core.xml.load_string(string)

Load a Mitsuba scene from an XML string

Parameter string (str, **kwargs):

no description available

Returns → object:

no description available


Warp

mitsuba.core.warp.beckmann_to_square(v, alpha)

Inverse of the mapping square_to_uniform_cone

Parameter v (enoki.scalar.Vector3f):

no description available

Parameter alpha (float):

no description available

Returns → enoki.scalar.Vector2f:

no description available


mitsuba.core.warp.bilinear_to_square(v00, v10, v01, v11, sample)

Inverse of square_to_bilinear

Parameter v00 (float):

no description available

Parameter v10 (float):

no description available

Parameter v01 (float):

no description available

Parameter v11 (float):

no description available

Parameter sample (enoki.scalar.Vector2f):

no description available

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available


mitsuba.core.warp.cosine_hemisphere_to_square(v)

Inverse of the mapping square_to_cosine_hemisphere

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → enoki.scalar.Vector2f:

no description available


mitsuba.core.warp.interval_to_linear(v0, v1, sample)

Importance sample a linear interpolant

Given a linear interpolant on the unit interval with boundary values v0, v1 (where v1 is the value at x=1), warp a uniformly distributed input sample sample so that the resulting probability distribution matches the linear interpolant.

Parameter v0 (float):

no description available

Parameter v1 (float):

no description available

Parameter sample (float):

no description available

Returns → float:

no description available


mitsuba.core.warp.interval_to_nonuniform_tent(a, b, c, d)

Warp a uniformly distributed sample on [0, 1] to a nonuniform tent distribution with nodes {a, b, c}

Parameter a (float):

no description available

Parameter b (float):

no description available

Parameter c (float):

no description available

Parameter d (float):

no description available

Returns → float:

no description available


mitsuba.core.warp.interval_to_tent(sample)

Warp a uniformly distributed sample on [0, 1] to a tent distribution

Parameter sample (float):

no description available

Returns → float:

no description available


mitsuba.core.warp.linear_to_interval(v0, v1, sample)

Inverse of interval_to_linear

Parameter v0 (float):

no description available

Parameter v1 (float):

no description available

Parameter sample (float):

no description available

Returns → float:

no description available


mitsuba.core.warp.square_to_beckmann(sample, alpha)

Warp a uniformly distributed square sample to a Beckmann distribution

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter alpha (float):

no description available

Returns → enoki.scalar.Vector3f:

no description available


mitsuba.core.warp.square_to_beckmann_pdf(v, alpha)

Probability density of square_to_beckmann()

Parameter v (enoki.scalar.Vector3f):

no description available

Parameter alpha (float):

no description available

Returns → float:

no description available


mitsuba.core.warp.square_to_bilinear(v00, v10, v01, v11, sample)

Importance sample a bilinear interpolant

Given a bilinear interpolant on the unit square with corner values v00, v10, v01, v11 (where v10 is the value at (x,y) == (0, 0)), warp a uniformly distributed input sample sample so that the resulting probability distribution matches the linear interpolant.

The implementation first samples the marginal distribution to obtain y, followed by sampling the conditional distribution to obtain x.

Returns the sampled point and PDF for convenience.

Parameter v00 (float):

no description available

Parameter v10 (float):

no description available

Parameter v01 (float):

no description available

Parameter v11 (float):

no description available

Parameter sample (enoki.scalar.Vector2f):

no description available

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available


mitsuba.core.warp.square_to_bilinear_pdf(v00, v10, v01, v11, sample)
Parameter v00 (float):

no description available

Parameter v10 (float):

no description available

Parameter v01 (float):

no description available

Parameter v11 (float):

no description available

Parameter sample (enoki.scalar.Vector2f):

no description available

Returns → float:

no description available


mitsuba.core.warp.square_to_cosine_hemisphere(sample)

Sample a cosine-weighted vector on the unit hemisphere with respect to solid angles

Parameter sample (enoki.scalar.Vector2f):

no description available

Returns → enoki.scalar.Vector3f:

no description available


mitsuba.core.warp.square_to_cosine_hemisphere_pdf(v)

Density of square_to_cosine_hemisphere() with respect to solid angles

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → float:

no description available


mitsuba.core.warp.square_to_rough_fiber(sample, wi, tangent, kappa)

Warp a uniformly distributed square sample to a rough fiber distribution

Parameter sample (enoki.scalar.Vector3f):

no description available

Parameter wi (enoki.scalar.Vector3f):

no description available

Parameter tangent (enoki.scalar.Vector3f):

no description available

Parameter kappa (float):

no description available

Returns → enoki.scalar.Vector3f:

no description available


mitsuba.core.warp.square_to_rough_fiber_pdf(v, wi, tangent, kappa)

Probability density of square_to_rough_fiber()

Parameter v (enoki.scalar.Vector3f):

no description available

Parameter wi (enoki.scalar.Vector3f):

no description available

Parameter tangent (enoki.scalar.Vector3f):

no description available

Parameter kappa (float):

no description available

Returns → float:

no description available


mitsuba.core.warp.square_to_std_normal(v)

Sample a point on a 2D standard normal distribution. Internally uses the Box-Muller transformation

Parameter v (enoki.scalar.Vector2f):

no description available

Returns → enoki.scalar.Vector2f:

no description available


mitsuba.core.warp.square_to_std_normal_pdf(v)
Parameter v (enoki.scalar.Vector2f):

no description available

Returns → float:

no description available


mitsuba.core.warp.square_to_tent(sample)

Warp a uniformly distributed square sample to a 2D tent distribution

Parameter sample (enoki.scalar.Vector2f):

no description available

Returns → enoki.scalar.Vector2f:

no description available


mitsuba.core.warp.square_to_tent_pdf(v)

Density of square_to_tent per unit area.

Parameter v (enoki.scalar.Vector2f):

no description available

Returns → float:

no description available


mitsuba.core.warp.square_to_uniform_cone(v, cos_cutoff)

Uniformly sample a vector that lies within a given cone of angles around the Z axis

Parameter cos_cutoff (float):

Cosine of the cutoff angle

Parameter sample:

A uniformly distributed sample on $[0,1]^2$

Parameter v (enoki.scalar.Vector2f):

no description available

Returns → enoki.scalar.Vector3f:

no description available


mitsuba.core.warp.square_to_uniform_cone_pdf(v, cos_cutoff)

Density of square_to_uniform_cone per unit area.

Parameter cos_cutoff (float):

Cosine of the cutoff angle

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → float:

no description available


mitsuba.core.warp.square_to_uniform_disk(sample)

Uniformly sample a vector on a 2D disk

Parameter sample (enoki.scalar.Vector2f):

no description available

Returns → enoki.scalar.Vector2f:

no description available


mitsuba.core.warp.square_to_uniform_disk_concentric(sample)

Low-distortion concentric square to disk mapping by Peter Shirley

Parameter sample (enoki.scalar.Vector2f):

no description available

Returns → enoki.scalar.Vector2f:

no description available


mitsuba.core.warp.square_to_uniform_disk_concentric_pdf(p)

Density of square_to_uniform_disk per unit area

Parameter p (enoki.scalar.Vector2f):

no description available

Returns → float:

no description available


mitsuba.core.warp.square_to_uniform_disk_pdf(p)

Density of square_to_uniform_disk per unit area

Parameter p (enoki.scalar.Vector2f):

no description available

Returns → float:

no description available


mitsuba.core.warp.square_to_uniform_hemisphere(sample)

Uniformly sample a vector on the unit hemisphere with respect to solid angles

Parameter sample (enoki.scalar.Vector2f):

no description available

Returns → enoki.scalar.Vector3f:

no description available


mitsuba.core.warp.square_to_uniform_hemisphere_pdf(v)

Density of square_to_uniform_hemisphere() with respect to solid angles

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → float:

no description available


mitsuba.core.warp.square_to_uniform_sphere(sample)

Uniformly sample a vector on the unit sphere with respect to solid angles

Parameter sample (enoki.scalar.Vector2f):

no description available

Returns → enoki.scalar.Vector3f:

no description available


mitsuba.core.warp.square_to_uniform_sphere_pdf(v)

Density of square_to_uniform_sphere() with respect to solid angles

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → float:

no description available


mitsuba.core.warp.square_to_uniform_square_concentric(sample)

Low-distortion concentric square to square mapping (meant to be used in conjunction with another warping method that maps to the sphere)

Parameter sample (enoki.scalar.Vector2f):

no description available

Returns → enoki.scalar.Vector2f:

no description available


mitsuba.core.warp.square_to_uniform_triangle(sample)

Convert an uniformly distributed square sample into barycentric coordinates

Parameter sample (enoki.scalar.Vector2f):

no description available

Returns → enoki.scalar.Vector2f:

no description available


mitsuba.core.warp.square_to_uniform_triangle_pdf(p)

Density of square_to_uniform_triangle per unit area.

Parameter p (enoki.scalar.Vector2f):

no description available

Returns → float:

no description available


mitsuba.core.warp.square_to_von_mises_fisher(sample, kappa)

Warp a uniformly distributed square sample to a von Mises Fisher distribution

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter kappa (float):

no description available

Returns → enoki.scalar.Vector3f:

no description available


mitsuba.core.warp.square_to_von_mises_fisher_pdf(v, kappa)

Probability density of square_to_von_mises_fisher()

Parameter v (enoki.scalar.Vector3f):

no description available

Parameter kappa (float):

no description available

Returns → float:

no description available


mitsuba.core.warp.tent_to_interval(value)

Warp a uniformly distributed sample on [0, 1] to a tent distribution

Parameter value (float):

no description available

Returns → float:

no description available


mitsuba.core.warp.tent_to_square(value)

Warp a uniformly distributed square sample to a 2D tent distribution

Parameter value (enoki.scalar.Vector2f):

no description available

Returns → enoki.scalar.Vector2f:

no description available


mitsuba.core.warp.uniform_cone_to_square(v, cos_cutoff)

Inverse of the mapping square_to_uniform_cone

Parameter v (enoki.scalar.Vector3f):

no description available

Parameter cos_cutoff (float):

no description available

Returns → enoki.scalar.Vector2f:

no description available


mitsuba.core.warp.uniform_disk_to_square(p)

Inverse of the mapping square_to_uniform_disk

Parameter p (enoki.scalar.Vector2f):

no description available

Returns → enoki.scalar.Vector2f:

no description available


mitsuba.core.warp.uniform_disk_to_square_concentric(p)

Inverse of the mapping square_to_uniform_disk_concentric

Parameter p (enoki.scalar.Vector2f):

no description available

Returns → enoki.scalar.Vector2f:

no description available


mitsuba.core.warp.uniform_hemisphere_to_square(v)

Inverse of the mapping square_to_uniform_hemisphere

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → enoki.scalar.Vector2f:

no description available


mitsuba.core.warp.uniform_sphere_to_square(sample)

Inverse of the mapping square_to_uniform_sphere

Parameter sample (enoki.scalar.Vector3f):

no description available

Returns → enoki.scalar.Vector2f:

no description available


mitsuba.core.warp.uniform_triangle_to_square(p)

Inverse of the mapping square_to_uniform_triangle

Parameter p (enoki.scalar.Vector2f):

no description available

Returns → enoki.scalar.Vector2f:

no description available


mitsuba.core.warp.von_mises_fisher_to_square(v, kappa)

Inverse of the mapping von_mises_fisher_to_square

Parameter v (enoki.scalar.Vector3f):

no description available

Parameter kappa (float):

no description available

Returns → enoki.scalar.Vector2f:

no description available


Distributions

class mitsuba.core.ContinuousDistribution

Continuous 1D probability distribution defined in terms of a regularly sampled linear interpolant

This data structure represents a continuous 1D probability distribution that is defined as a linear interpolant of a regularly discretized signal. The class provides various routines for transforming uniformly distributed samples so that they follow the stored distribution. Note that unnormalized probability density functions (PDFs) will automatically be normalized during initialization. The associated scale factor can be retrieved using the function normalization().

__init__(self)

Continuous 1D probability distribution defined in terms of a regularly sampled linear interpolant

This data structure represents a continuous 1D probability distribution that is defined as a linear interpolant of a regularly discretized signal. The class provides various routines for transforming uniformly distributed samples so that they follow the stored distribution. Note that unnormalized probability density functions (PDFs) will automatically be normalized during initialization. The associated scale factor can be retrieved using the function normalization().

__init__(self, arg0)

Copy constructor

Parameter arg0 (mitsuba.core.ContinuousDistribution):

no description available

__init__(self, range, pdf)

Initialize from a given density function on the interval range

Parameter range (enoki.scalar.Vector2f):

no description available

Parameter pdf (enoki.dynamic.Float32):

no description available

cdf(self)

Return the unnormalized discrete cumulative distribution function over intervals

Returns → enoki.dynamic.Float32:

no description available

empty(self)

Is the distribution object empty/uninitialized?

Returns → bool:

no description available

eval_cdf(self, x, active=True)

Evaluate the unnormalized cumulative distribution function (CDF) at position p

Parameter x (float):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

eval_cdf_normalized(self, x, active=True)

Evaluate the unnormalized cumulative distribution function (CDF) at position p

Parameter x (float):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

eval_pdf(self, x, active=True)

Evaluate the unnormalized probability mass function (PDF) at position x

Parameter x (float):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

eval_pdf_normalized(self, x, active=True)

Evaluate the normalized probability mass function (PDF) at position x

Parameter x (float):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

integral(self)

Return the original integral of PDF entries before normalization

Returns → float:

no description available

normalization(self)

Return the normalization factor (i.e. the inverse of sum())

Returns → float:

no description available

pdf(self)

Return the unnormalized discretized probability density function

Returns → enoki.dynamic.Float32:

no description available

range(self)

Return the range of the distribution

Returns → enoki.scalar.Vector2f:

no description available

sample(self, value, active=True)

%Transform a uniformly distributed sample to the stored distribution

Parameter value (float):

A uniformly distributed sample on the interval [0, 1].

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

The sampled position.

sample_pdf(self, value, active=True)

%Transform a uniformly distributed sample to the stored distribution

Parameter value (float):

A uniformly distributed sample on the interval [0, 1].

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[float, float]:

A tuple consisting of

1. the sampled position. 2. the normalized probability density of the sample.

size(self)

Return the number of discretizations

Returns → int:

no description available

update(self)

Update the internal state. Must be invoked when changing the pdf or range.

Returns → None:

no description available


class mitsuba.core.DiscreteDistribution

Discrete 1D probability distribution

This data structure represents a discrete 1D probability distribution and provides various routines for transforming uniformly distributed samples so that they follow the stored distribution. Note that unnormalized probability mass functions (PMFs) will automatically be normalized during initialization. The associated scale factor can be retrieved using the function normalization().

__init__(self)

Discrete 1D probability distribution

This data structure represents a discrete 1D probability distribution and provides various routines for transforming uniformly distributed samples so that they follow the stored distribution. Note that unnormalized probability mass functions (PMFs) will automatically be normalized during initialization. The associated scale factor can be retrieved using the function normalization().

__init__(self, arg0)

Copy constructor

Parameter arg0 (mitsuba.core.DiscreteDistribution):

no description available

__init__(self, pmf)

Initialize from a given probability mass function

Parameter pmf (enoki.dynamic.Float32):

no description available

cdf(self)

Return the unnormalized cumulative distribution function

Returns → enoki.dynamic.Float32:

no description available

empty(self)

Is the distribution object empty/uninitialized?

Returns → bool:

no description available

eval_cdf(self, index, active=True)

Evaluate the unnormalized cumulative distribution function (CDF) at index index

Parameter index (int):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

eval_cdf_normalized(self, index, active=True)

Evaluate the normalized cumulative distribution function (CDF) at index index

Parameter index (int):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

eval_pmf(self, index, active=True)

Evaluate the unnormalized probability mass function (PMF) at index index

Parameter index (int):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

eval_pmf_normalized(self, index, active=True)

Evaluate the normalized probability mass function (PMF) at index index

Parameter index (int):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

normalization(self)

Return the normalization factor (i.e. the inverse of sum())

Returns → float:

no description available

pmf(self)

Return the unnormalized probability mass function

Returns → enoki.dynamic.Float32:

no description available

sample(self, value, active=True)

%Transform a uniformly distributed sample to the stored distribution

Parameter value (float):

A uniformly distributed sample on the interval [0, 1].

Parameter active (bool):

Mask to specify active lanes.

Returns → int:

The discrete index associated with the sample

sample_pmf(self, value, active=True)

%Transform a uniformly distributed sample to the stored distribution

Parameter value (float):

A uniformly distributed sample on the interval [0, 1].

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[int, float]:

A tuple consisting of

1. the discrete index associated with the sample, and 2. the normalized probability value of the sample.

sample_reuse(self, value, active=True)

%Transform a uniformly distributed sample to the stored distribution

The original sample is value adjusted so that it can be reused as a uniform variate.

Parameter value (float):

A uniformly distributed sample on the interval [0, 1].

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[int, float]:

A tuple consisting of

1. the discrete index associated with the sample, and 2. the re-scaled sample value.

sample_reuse_pmf(self, value, active=True)

%Transform a uniformly distributed sample to the stored distribution.

The original sample is value adjusted so that it can be reused as a uniform variate.

Parameter value (float):

A uniformly distributed sample on the interval [0, 1].

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[int, float, float]:

A tuple consisting of

1. the discrete index associated with the sample 2. the re-scaled sample value 3. the normalized probability value of the sample

size(self)

Return the number of entries

Returns → int:

no description available

sum(self)

Return the original sum of PMF entries before normalization

Returns → float:

no description available

update(self)

Update the internal state. Must be invoked when changing the pmf.

Returns → None:

no description available


class mitsuba.core.IrregularContinuousDistribution

Continuous 1D probability distribution defined in terms of an irregularly sampled linear interpolant

This data structure represents a continuous 1D probability distribution that is defined as a linear interpolant of an irregularly discretized signal. The class provides various routines for transforming uniformly distributed samples so that they follow the stored distribution. Note that unnormalized probability density functions (PDFs) will automatically be normalized during initialization. The associated scale factor can be retrieved using the function normalization().

__init__(self)

Continuous 1D probability distribution defined in terms of an irregularly sampled linear interpolant

This data structure represents a continuous 1D probability distribution that is defined as a linear interpolant of an irregularly discretized signal. The class provides various routines for transforming uniformly distributed samples so that they follow the stored distribution. Note that unnormalized probability density functions (PDFs) will automatically be normalized during initialization. The associated scale factor can be retrieved using the function normalization().

__init__(self, arg0)

Copy constructor

Parameter arg0 (mitsuba.core.IrregularContinuousDistribution):

no description available

__init__(self, nodes, pdf)

Initialize from a given density function discretized on nodes nodes

Parameter nodes (enoki.dynamic.Float32):

no description available

Parameter pdf (enoki.dynamic.Float32):

no description available

cdf(self)

Return the unnormalized discrete cumulative distribution function over intervals

Returns → enoki.dynamic.Float32:

no description available

empty(self)

Is the distribution object empty/uninitialized?

Returns → bool:

no description available

eval_cdf(self, x, active=True)

Evaluate the unnormalized cumulative distribution function (CDF) at position p

Parameter x (float):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

eval_cdf_normalized(self, x, active=True)

Evaluate the unnormalized cumulative distribution function (CDF) at position p

Parameter x (float):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

eval_pdf(self, x, active=True)

Evaluate the unnormalized probability mass function (PDF) at position x

Parameter x (float):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

eval_pdf_normalized(self, x, active=True)

Evaluate the normalized probability mass function (PDF) at position x

Parameter x (float):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

integral(self)

Return the original integral of PDF entries before normalization

Returns → float:

no description available

nodes(self)

Return the nodes of the underlying discretization

Returns → enoki.dynamic.Float32:

no description available

normalization(self)

Return the normalization factor (i.e. the inverse of sum())

Returns → float:

no description available

pdf(self)

Return the unnormalized discretized probability density function

Returns → enoki.dynamic.Float32:

no description available

sample(self, value, active=True)

%Transform a uniformly distributed sample to the stored distribution

Parameter value (float):

A uniformly distributed sample on the interval [0, 1].

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

The sampled position.

sample_pdf(self, value, active=True)

%Transform a uniformly distributed sample to the stored distribution

Parameter value (float):

A uniformly distributed sample on the interval [0, 1].

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[float, float]:

A tuple consisting of

1. the sampled position. 2. the normalized probability density of the sample.

size(self)

Return the number of discretizations

Returns → int:

no description available

update(self)

Update the internal state. Must be invoked when changing the pdf or range.

Returns → None:

no description available


class mitsuba.core.Hierarchical2D0

Implements a hierarchical sample warping scheme for 2D distributions with linear interpolation and an optional dependence on additional parameters

This class takes a rectangular floating point array as input and constructs internal data structures to efficiently map uniform variates from the unit square [0, 1]^2 to a function on [0, 1]^2 that linearly interpolates the input array.

The mapping is constructed from a sequence of log2(hmax(res)) hierarchical sample warping steps, where res is the input array resolution. It is bijective and generally very well-behaved (i.e. low distortion), which makes it a good choice for structured point sets such as the Halton or Sobol sequence.

The implementation also supports conditional distributions, i.e. 2D distributions that depend on an arbitrary number of parameters (indicated via the Dimension template parameter).

In this case, the input array should have dimensions N0 x N1 x ... x Nn x res.y() x res.x() (where the last dimension is contiguous in memory), and the param_res should be set to { N0, N1, ..., Nn }, and param_values should contain the parameter values where the distribution is discretized. Linear interpolation is used when sampling or evaluating the distribution for in-between parameter values.

Remark:

The Python API exposes explicitly instantiated versions of this class named Hierarchical2D0, Hierarchical2D1, and Hierarchical2D2 for data that depends on 0, 1, and 2 parameters, respectively.

__init__(self, data, param_values=[], normalize=True, enable_sampling=True)

Construct a hierarchical sample warping scheme for floating point data of resolution size.

param_res and param_values are only needed for conditional distributions (see the text describing the Hierarchical2D class).

If normalize is set to False, the implementation will not re- scale the distribution so that it integrates to 1. It can still be sampled (proportionally), but returned density values will reflect the unnormalized values.

If enable_sampling is set to False, the implementation will not construct the hierarchy needed for sample warping, which saves memory in case this functionality is not needed (e.g. if only the interpolation in eval() is used). In this case, sample() and invert() can still be called without triggering undefined behavior, but they will not return meaningful results.

Parameter data (numpy.ndarray[float32]):

no description available

Parameter param_values (List[List[float][0]]):

no description available

Parameter normalize (bool):

no description available

Parameter enable_sampling (bool):

no description available

eval(self, pos, param=[], active=True)

Evaluate the density at position pos. The distribution is parameterized by param if applicable.

Parameter pos (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector0f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

invert(self, sample, param=[], active=True)

Inverse of the mapping implemented in sample()

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector0f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available

sample(self, sample, param=[], active=True)

Given a uniformly distributed 2D sample, draw a sample from the distribution (parameterized by param if applicable)

Returns the warped sample and associated probability density.

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector0f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available


class mitsuba.core.Hierarchical2D1

Implements a hierarchical sample warping scheme for 2D distributions with linear interpolation and an optional dependence on additional parameters

This class takes a rectangular floating point array as input and constructs internal data structures to efficiently map uniform variates from the unit square [0, 1]^2 to a function on [0, 1]^2 that linearly interpolates the input array.

The mapping is constructed from a sequence of log2(hmax(res)) hierarchical sample warping steps, where res is the input array resolution. It is bijective and generally very well-behaved (i.e. low distortion), which makes it a good choice for structured point sets such as the Halton or Sobol sequence.

The implementation also supports conditional distributions, i.e. 2D distributions that depend on an arbitrary number of parameters (indicated via the Dimension template parameter).

In this case, the input array should have dimensions N0 x N1 x ... x Nn x res.y() x res.x() (where the last dimension is contiguous in memory), and the param_res should be set to { N0, N1, ..., Nn }, and param_values should contain the parameter values where the distribution is discretized. Linear interpolation is used when sampling or evaluating the distribution for in-between parameter values.

Remark:

The Python API exposes explicitly instantiated versions of this class named Hierarchical2D0, Hierarchical2D1, and Hierarchical2D2 for data that depends on 0, 1, and 2 parameters, respectively.

__init__(self, data, param_values, normalize=True, build_hierarchy=True)

Construct a hierarchical sample warping scheme for floating point data of resolution size.

param_res and param_values are only needed for conditional distributions (see the text describing the Hierarchical2D class).

If normalize is set to False, the implementation will not re- scale the distribution so that it integrates to 1. It can still be sampled (proportionally), but returned density values will reflect the unnormalized values.

If enable_sampling is set to False, the implementation will not construct the hierarchy needed for sample warping, which saves memory in case this functionality is not needed (e.g. if only the interpolation in eval() is used). In this case, sample() and invert() can still be called without triggering undefined behavior, but they will not return meaningful results.

Parameter data (numpy.ndarray[float32]):

no description available

Parameter param_values (List[List[float][1]]):

no description available

Parameter normalize (bool):

no description available

Parameter build_hierarchy (bool):

no description available

eval(self, pos, param=[0], active=True)

Evaluate the density at position pos. The distribution is parameterized by param if applicable.

Parameter pos (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector1f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

invert(self, sample, param=[0], active=True)

Inverse of the mapping implemented in sample()

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector1f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available

sample(self, sample, param=[0], active=True)

Given a uniformly distributed 2D sample, draw a sample from the distribution (parameterized by param if applicable)

Returns the warped sample and associated probability density.

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector1f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available


class mitsuba.core.Hierarchical2D2

Implements a hierarchical sample warping scheme for 2D distributions with linear interpolation and an optional dependence on additional parameters

This class takes a rectangular floating point array as input and constructs internal data structures to efficiently map uniform variates from the unit square [0, 1]^2 to a function on [0, 1]^2 that linearly interpolates the input array.

The mapping is constructed from a sequence of log2(hmax(res)) hierarchical sample warping steps, where res is the input array resolution. It is bijective and generally very well-behaved (i.e. low distortion), which makes it a good choice for structured point sets such as the Halton or Sobol sequence.

The implementation also supports conditional distributions, i.e. 2D distributions that depend on an arbitrary number of parameters (indicated via the Dimension template parameter).

In this case, the input array should have dimensions N0 x N1 x ... x Nn x res.y() x res.x() (where the last dimension is contiguous in memory), and the param_res should be set to { N0, N1, ..., Nn }, and param_values should contain the parameter values where the distribution is discretized. Linear interpolation is used when sampling or evaluating the distribution for in-between parameter values.

Remark:

The Python API exposes explicitly instantiated versions of this class named Hierarchical2D0, Hierarchical2D1, and Hierarchical2D2 for data that depends on 0, 1, and 2 parameters, respectively.

__init__(self, data, param_values, normalize=True, build_hierarchy=True)

Construct a hierarchical sample warping scheme for floating point data of resolution size.

param_res and param_values are only needed for conditional distributions (see the text describing the Hierarchical2D class).

If normalize is set to False, the implementation will not re- scale the distribution so that it integrates to 1. It can still be sampled (proportionally), but returned density values will reflect the unnormalized values.

If enable_sampling is set to False, the implementation will not construct the hierarchy needed for sample warping, which saves memory in case this functionality is not needed (e.g. if only the interpolation in eval() is used). In this case, sample() and invert() can still be called without triggering undefined behavior, but they will not return meaningful results.

Parameter data (numpy.ndarray[float32]):

no description available

Parameter param_values (List[List[float][2]]):

no description available

Parameter normalize (bool):

no description available

Parameter build_hierarchy (bool):

no description available

eval(self, pos, param=[0, 0], active=True)

Evaluate the density at position pos. The distribution is parameterized by param if applicable.

Parameter pos (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector2f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

invert(self, sample, param=[0, 0], active=True)

Inverse of the mapping implemented in sample()

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector2f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available

sample(self, sample, param=[0, 0], active=True)

Given a uniformly distributed 2D sample, draw a sample from the distribution (parameterized by param if applicable)

Returns the warped sample and associated probability density.

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector2f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available


class mitsuba.core.Hierarchical2D3

Implements a hierarchical sample warping scheme for 2D distributions with linear interpolation and an optional dependence on additional parameters

This class takes a rectangular floating point array as input and constructs internal data structures to efficiently map uniform variates from the unit square [0, 1]^2 to a function on [0, 1]^2 that linearly interpolates the input array.

The mapping is constructed from a sequence of log2(hmax(res)) hierarchical sample warping steps, where res is the input array resolution. It is bijective and generally very well-behaved (i.e. low distortion), which makes it a good choice for structured point sets such as the Halton or Sobol sequence.

The implementation also supports conditional distributions, i.e. 2D distributions that depend on an arbitrary number of parameters (indicated via the Dimension template parameter).

In this case, the input array should have dimensions N0 x N1 x ... x Nn x res.y() x res.x() (where the last dimension is contiguous in memory), and the param_res should be set to { N0, N1, ..., Nn }, and param_values should contain the parameter values where the distribution is discretized. Linear interpolation is used when sampling or evaluating the distribution for in-between parameter values.

Remark:

The Python API exposes explicitly instantiated versions of this class named Hierarchical2D0, Hierarchical2D1, and Hierarchical2D2 for data that depends on 0, 1, and 2 parameters, respectively.

__init__(self, data, param_values, normalize=True, build_hierarchy=True)

Construct a hierarchical sample warping scheme for floating point data of resolution size.

param_res and param_values are only needed for conditional distributions (see the text describing the Hierarchical2D class).

If normalize is set to False, the implementation will not re- scale the distribution so that it integrates to 1. It can still be sampled (proportionally), but returned density values will reflect the unnormalized values.

If enable_sampling is set to False, the implementation will not construct the hierarchy needed for sample warping, which saves memory in case this functionality is not needed (e.g. if only the interpolation in eval() is used). In this case, sample() and invert() can still be called without triggering undefined behavior, but they will not return meaningful results.

Parameter data (numpy.ndarray[float32]):

no description available

Parameter param_values (List[List[float][3]]):

no description available

Parameter normalize (bool):

no description available

Parameter build_hierarchy (bool):

no description available

eval(self, pos, param=[0, 0, 0], active=True)

Evaluate the density at position pos. The distribution is parameterized by param if applicable.

Parameter pos (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector3f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

invert(self, sample, param=[0, 0, 0], active=True)

Inverse of the mapping implemented in sample()

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector3f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available

sample(self, sample, param=[0, 0, 0], active=True)

Given a uniformly distributed 2D sample, draw a sample from the distribution (parameterized by param if applicable)

Returns the warped sample and associated probability density.

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector3f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available


class mitsuba.core.MarginalContinuous2D0

Implements a marginal sample warping scheme for 2D distributions with linear interpolation and an optional dependence on additional parameters

This class takes a rectangular floating point array as input and constructs internal data structures to efficiently map uniform variates from the unit square [0, 1]^2 to a function on [0, 1]^2 that linearly interpolates the input array.

The mapping is constructed via the inversion method, which is applied to a marginal distribution over rows, followed by a conditional distribution over columns.

The implementation also supports conditional distributions, i.e. 2D distributions that depend on an arbitrary number of parameters (indicated via the Dimension template parameter).

In this case, the input array should have dimensions N0 x N1 x ... x Nn x res.y() x res.x() (where the last dimension is contiguous in memory), and the param_res should be set to { N0, N1, ..., Nn }, and param_values should contain the parameter values where the distribution is discretized. Linear interpolation is used when sampling or evaluating the distribution for in-between parameter values.

Remark:

The Python API exposes explicitly instantiated versions of this class named MarginalDiscrete2D0 to MarginalDiscrete2D3 and MarginalContinuous2D0 to MarginalContinuous2D3 for data that depends on 0 to 3 parameters.

__init__(self, data, param_values=[], normalize=True, enable_sampling=True)

Construct a marginal sample warping scheme for floating point data of resolution size.

param_res and param_values are only needed for conditional distributions (see the text describing the Marginal2D class).

If normalize is set to False, the implementation will not re- scale the distribution so that it integrates to 1. It can still be sampled (proportionally), but returned density values will reflect the unnormalized values.

If enable_sampling is set to False, the implementation will not construct the cdf needed for sample warping, which saves memory in case this functionality is not needed (e.g. if only the interpolation in eval() is used).

Parameter data (numpy.ndarray[float32]):

no description available

Parameter param_values (List[List[float][0]]):

no description available

Parameter normalize (bool):

no description available

Parameter enable_sampling (bool):

no description available

eval(self, pos, param=[], active=True)

Evaluate the density at position pos. The distribution is parameterized by param if applicable.

Parameter pos (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector0f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

invert(self, sample, param=[], active=True)

Inverse of the mapping implemented in sample()

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector0f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available

sample(self, sample, param=[], active=True)

Given a uniformly distributed 2D sample, draw a sample from the distribution (parameterized by param if applicable)

Returns the warped sample and associated probability density.

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector0f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available


class mitsuba.core.MarginalContinuous2D1

Implements a marginal sample warping scheme for 2D distributions with linear interpolation and an optional dependence on additional parameters

This class takes a rectangular floating point array as input and constructs internal data structures to efficiently map uniform variates from the unit square [0, 1]^2 to a function on [0, 1]^2 that linearly interpolates the input array.

The mapping is constructed via the inversion method, which is applied to a marginal distribution over rows, followed by a conditional distribution over columns.

The implementation also supports conditional distributions, i.e. 2D distributions that depend on an arbitrary number of parameters (indicated via the Dimension template parameter).

In this case, the input array should have dimensions N0 x N1 x ... x Nn x res.y() x res.x() (where the last dimension is contiguous in memory), and the param_res should be set to { N0, N1, ..., Nn }, and param_values should contain the parameter values where the distribution is discretized. Linear interpolation is used when sampling or evaluating the distribution for in-between parameter values.

Remark:

The Python API exposes explicitly instantiated versions of this class named MarginalDiscrete2D0 to MarginalDiscrete2D3 and MarginalContinuous2D0 to MarginalContinuous2D3 for data that depends on 0 to 3 parameters.

__init__(self, data, param_values, normalize=True, build_hierarchy=True)

Construct a marginal sample warping scheme for floating point data of resolution size.

param_res and param_values are only needed for conditional distributions (see the text describing the Marginal2D class).

If normalize is set to False, the implementation will not re- scale the distribution so that it integrates to 1. It can still be sampled (proportionally), but returned density values will reflect the unnormalized values.

If enable_sampling is set to False, the implementation will not construct the cdf needed for sample warping, which saves memory in case this functionality is not needed (e.g. if only the interpolation in eval() is used).

Parameter data (numpy.ndarray[float32]):

no description available

Parameter param_values (List[List[float][1]]):

no description available

Parameter normalize (bool):

no description available

Parameter build_hierarchy (bool):

no description available

eval(self, pos, param=[0], active=True)

Evaluate the density at position pos. The distribution is parameterized by param if applicable.

Parameter pos (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector1f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

invert(self, sample, param=[0], active=True)

Inverse of the mapping implemented in sample()

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector1f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available

sample(self, sample, param=[0], active=True)

Given a uniformly distributed 2D sample, draw a sample from the distribution (parameterized by param if applicable)

Returns the warped sample and associated probability density.

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector1f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available


class mitsuba.core.MarginalContinuous2D2

Implements a marginal sample warping scheme for 2D distributions with linear interpolation and an optional dependence on additional parameters

This class takes a rectangular floating point array as input and constructs internal data structures to efficiently map uniform variates from the unit square [0, 1]^2 to a function on [0, 1]^2 that linearly interpolates the input array.

The mapping is constructed via the inversion method, which is applied to a marginal distribution over rows, followed by a conditional distribution over columns.

The implementation also supports conditional distributions, i.e. 2D distributions that depend on an arbitrary number of parameters (indicated via the Dimension template parameter).

In this case, the input array should have dimensions N0 x N1 x ... x Nn x res.y() x res.x() (where the last dimension is contiguous in memory), and the param_res should be set to { N0, N1, ..., Nn }, and param_values should contain the parameter values where the distribution is discretized. Linear interpolation is used when sampling or evaluating the distribution for in-between parameter values.

Remark:

The Python API exposes explicitly instantiated versions of this class named MarginalDiscrete2D0 to MarginalDiscrete2D3 and MarginalContinuous2D0 to MarginalContinuous2D3 for data that depends on 0 to 3 parameters.

__init__(self, data, param_values, normalize=True, build_hierarchy=True)

Construct a marginal sample warping scheme for floating point data of resolution size.

param_res and param_values are only needed for conditional distributions (see the text describing the Marginal2D class).

If normalize is set to False, the implementation will not re- scale the distribution so that it integrates to 1. It can still be sampled (proportionally), but returned density values will reflect the unnormalized values.

If enable_sampling is set to False, the implementation will not construct the cdf needed for sample warping, which saves memory in case this functionality is not needed (e.g. if only the interpolation in eval() is used).

Parameter data (numpy.ndarray[float32]):

no description available

Parameter param_values (List[List[float][2]]):

no description available

Parameter normalize (bool):

no description available

Parameter build_hierarchy (bool):

no description available

eval(self, pos, param=[0, 0], active=True)

Evaluate the density at position pos. The distribution is parameterized by param if applicable.

Parameter pos (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector2f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

invert(self, sample, param=[0, 0], active=True)

Inverse of the mapping implemented in sample()

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector2f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available

sample(self, sample, param=[0, 0], active=True)

Given a uniformly distributed 2D sample, draw a sample from the distribution (parameterized by param if applicable)

Returns the warped sample and associated probability density.

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector2f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available


class mitsuba.core.MarginalContinuous2D3

Implements a marginal sample warping scheme for 2D distributions with linear interpolation and an optional dependence on additional parameters

This class takes a rectangular floating point array as input and constructs internal data structures to efficiently map uniform variates from the unit square [0, 1]^2 to a function on [0, 1]^2 that linearly interpolates the input array.

The mapping is constructed via the inversion method, which is applied to a marginal distribution over rows, followed by a conditional distribution over columns.

The implementation also supports conditional distributions, i.e. 2D distributions that depend on an arbitrary number of parameters (indicated via the Dimension template parameter).

In this case, the input array should have dimensions N0 x N1 x ... x Nn x res.y() x res.x() (where the last dimension is contiguous in memory), and the param_res should be set to { N0, N1, ..., Nn }, and param_values should contain the parameter values where the distribution is discretized. Linear interpolation is used when sampling or evaluating the distribution for in-between parameter values.

Remark:

The Python API exposes explicitly instantiated versions of this class named MarginalDiscrete2D0 to MarginalDiscrete2D3 and MarginalContinuous2D0 to MarginalContinuous2D3 for data that depends on 0 to 3 parameters.

__init__(self, data, param_values, normalize=True, build_hierarchy=True)

Construct a marginal sample warping scheme for floating point data of resolution size.

param_res and param_values are only needed for conditional distributions (see the text describing the Marginal2D class).

If normalize is set to False, the implementation will not re- scale the distribution so that it integrates to 1. It can still be sampled (proportionally), but returned density values will reflect the unnormalized values.

If enable_sampling is set to False, the implementation will not construct the cdf needed for sample warping, which saves memory in case this functionality is not needed (e.g. if only the interpolation in eval() is used).

Parameter data (numpy.ndarray[float32]):

no description available

Parameter param_values (List[List[float][3]]):

no description available

Parameter normalize (bool):

no description available

Parameter build_hierarchy (bool):

no description available

eval(self, pos, param=[0, 0, 0], active=True)

Evaluate the density at position pos. The distribution is parameterized by param if applicable.

Parameter pos (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector3f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

invert(self, sample, param=[0, 0, 0], active=True)

Inverse of the mapping implemented in sample()

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector3f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available

sample(self, sample, param=[0, 0, 0], active=True)

Given a uniformly distributed 2D sample, draw a sample from the distribution (parameterized by param if applicable)

Returns the warped sample and associated probability density.

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector3f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available


class mitsuba.core.MarginalDiscrete2D0

Implements a marginal sample warping scheme for 2D distributions with linear interpolation and an optional dependence on additional parameters

This class takes a rectangular floating point array as input and constructs internal data structures to efficiently map uniform variates from the unit square [0, 1]^2 to a function on [0, 1]^2 that linearly interpolates the input array.

The mapping is constructed via the inversion method, which is applied to a marginal distribution over rows, followed by a conditional distribution over columns.

The implementation also supports conditional distributions, i.e. 2D distributions that depend on an arbitrary number of parameters (indicated via the Dimension template parameter).

In this case, the input array should have dimensions N0 x N1 x ... x Nn x res.y() x res.x() (where the last dimension is contiguous in memory), and the param_res should be set to { N0, N1, ..., Nn }, and param_values should contain the parameter values where the distribution is discretized. Linear interpolation is used when sampling or evaluating the distribution for in-between parameter values.

Remark:

The Python API exposes explicitly instantiated versions of this class named MarginalDiscrete2D0 to MarginalDiscrete2D3 and MarginalContinuous2D0 to MarginalContinuous2D3 for data that depends on 0 to 3 parameters.

__init__(self, data, param_values=[], normalize=True, enable_sampling=True)

Construct a marginal sample warping scheme for floating point data of resolution size.

param_res and param_values are only needed for conditional distributions (see the text describing the Marginal2D class).

If normalize is set to False, the implementation will not re- scale the distribution so that it integrates to 1. It can still be sampled (proportionally), but returned density values will reflect the unnormalized values.

If enable_sampling is set to False, the implementation will not construct the cdf needed for sample warping, which saves memory in case this functionality is not needed (e.g. if only the interpolation in eval() is used).

Parameter data (numpy.ndarray[float32]):

no description available

Parameter param_values (List[List[float][0]]):

no description available

Parameter normalize (bool):

no description available

Parameter enable_sampling (bool):

no description available

eval(self, pos, param=[], active=True)

Evaluate the density at position pos. The distribution is parameterized by param if applicable.

Parameter pos (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector0f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

invert(self, sample, param=[], active=True)

Inverse of the mapping implemented in sample()

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector0f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available

sample(self, sample, param=[], active=True)

Given a uniformly distributed 2D sample, draw a sample from the distribution (parameterized by param if applicable)

Returns the warped sample and associated probability density.

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector0f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available


class mitsuba.core.MarginalDiscrete2D1

Implements a marginal sample warping scheme for 2D distributions with linear interpolation and an optional dependence on additional parameters

This class takes a rectangular floating point array as input and constructs internal data structures to efficiently map uniform variates from the unit square [0, 1]^2 to a function on [0, 1]^2 that linearly interpolates the input array.

The mapping is constructed via the inversion method, which is applied to a marginal distribution over rows, followed by a conditional distribution over columns.

The implementation also supports conditional distributions, i.e. 2D distributions that depend on an arbitrary number of parameters (indicated via the Dimension template parameter).

In this case, the input array should have dimensions N0 x N1 x ... x Nn x res.y() x res.x() (where the last dimension is contiguous in memory), and the param_res should be set to { N0, N1, ..., Nn }, and param_values should contain the parameter values where the distribution is discretized. Linear interpolation is used when sampling or evaluating the distribution for in-between parameter values.

Remark:

The Python API exposes explicitly instantiated versions of this class named MarginalDiscrete2D0 to MarginalDiscrete2D3 and MarginalContinuous2D0 to MarginalContinuous2D3 for data that depends on 0 to 3 parameters.

__init__(self, data, param_values, normalize=True, build_hierarchy=True)

Construct a marginal sample warping scheme for floating point data of resolution size.

param_res and param_values are only needed for conditional distributions (see the text describing the Marginal2D class).

If normalize is set to False, the implementation will not re- scale the distribution so that it integrates to 1. It can still be sampled (proportionally), but returned density values will reflect the unnormalized values.

If enable_sampling is set to False, the implementation will not construct the cdf needed for sample warping, which saves memory in case this functionality is not needed (e.g. if only the interpolation in eval() is used).

Parameter data (numpy.ndarray[float32]):

no description available

Parameter param_values (List[List[float][1]]):

no description available

Parameter normalize (bool):

no description available

Parameter build_hierarchy (bool):

no description available

eval(self, pos, param=[0], active=True)

Evaluate the density at position pos. The distribution is parameterized by param if applicable.

Parameter pos (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector1f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

invert(self, sample, param=[0], active=True)

Inverse of the mapping implemented in sample()

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector1f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available

sample(self, sample, param=[0], active=True)

Given a uniformly distributed 2D sample, draw a sample from the distribution (parameterized by param if applicable)

Returns the warped sample and associated probability density.

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector1f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available


class mitsuba.core.MarginalDiscrete2D2

Implements a marginal sample warping scheme for 2D distributions with linear interpolation and an optional dependence on additional parameters

This class takes a rectangular floating point array as input and constructs internal data structures to efficiently map uniform variates from the unit square [0, 1]^2 to a function on [0, 1]^2 that linearly interpolates the input array.

The mapping is constructed via the inversion method, which is applied to a marginal distribution over rows, followed by a conditional distribution over columns.

The implementation also supports conditional distributions, i.e. 2D distributions that depend on an arbitrary number of parameters (indicated via the Dimension template parameter).

In this case, the input array should have dimensions N0 x N1 x ... x Nn x res.y() x res.x() (where the last dimension is contiguous in memory), and the param_res should be set to { N0, N1, ..., Nn }, and param_values should contain the parameter values where the distribution is discretized. Linear interpolation is used when sampling or evaluating the distribution for in-between parameter values.

Remark:

The Python API exposes explicitly instantiated versions of this class named MarginalDiscrete2D0 to MarginalDiscrete2D3 and MarginalContinuous2D0 to MarginalContinuous2D3 for data that depends on 0 to 3 parameters.

__init__(self, data, param_values, normalize=True, build_hierarchy=True)

Construct a marginal sample warping scheme for floating point data of resolution size.

param_res and param_values are only needed for conditional distributions (see the text describing the Marginal2D class).

If normalize is set to False, the implementation will not re- scale the distribution so that it integrates to 1. It can still be sampled (proportionally), but returned density values will reflect the unnormalized values.

If enable_sampling is set to False, the implementation will not construct the cdf needed for sample warping, which saves memory in case this functionality is not needed (e.g. if only the interpolation in eval() is used).

Parameter data (numpy.ndarray[float32]):

no description available

Parameter param_values (List[List[float][2]]):

no description available

Parameter normalize (bool):

no description available

Parameter build_hierarchy (bool):

no description available

eval(self, pos, param=[0, 0], active=True)

Evaluate the density at position pos. The distribution is parameterized by param if applicable.

Parameter pos (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector2f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

invert(self, sample, param=[0, 0], active=True)

Inverse of the mapping implemented in sample()

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector2f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available

sample(self, sample, param=[0, 0], active=True)

Given a uniformly distributed 2D sample, draw a sample from the distribution (parameterized by param if applicable)

Returns the warped sample and associated probability density.

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector2f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available


class mitsuba.core.MarginalDiscrete2D3

Implements a marginal sample warping scheme for 2D distributions with linear interpolation and an optional dependence on additional parameters

This class takes a rectangular floating point array as input and constructs internal data structures to efficiently map uniform variates from the unit square [0, 1]^2 to a function on [0, 1]^2 that linearly interpolates the input array.

The mapping is constructed via the inversion method, which is applied to a marginal distribution over rows, followed by a conditional distribution over columns.

The implementation also supports conditional distributions, i.e. 2D distributions that depend on an arbitrary number of parameters (indicated via the Dimension template parameter).

In this case, the input array should have dimensions N0 x N1 x ... x Nn x res.y() x res.x() (where the last dimension is contiguous in memory), and the param_res should be set to { N0, N1, ..., Nn }, and param_values should contain the parameter values where the distribution is discretized. Linear interpolation is used when sampling or evaluating the distribution for in-between parameter values.

Remark:

The Python API exposes explicitly instantiated versions of this class named MarginalDiscrete2D0 to MarginalDiscrete2D3 and MarginalContinuous2D0 to MarginalContinuous2D3 for data that depends on 0 to 3 parameters.

__init__(self, data, param_values, normalize=True, build_hierarchy=True)

Construct a marginal sample warping scheme for floating point data of resolution size.

param_res and param_values are only needed for conditional distributions (see the text describing the Marginal2D class).

If normalize is set to False, the implementation will not re- scale the distribution so that it integrates to 1. It can still be sampled (proportionally), but returned density values will reflect the unnormalized values.

If enable_sampling is set to False, the implementation will not construct the cdf needed for sample warping, which saves memory in case this functionality is not needed (e.g. if only the interpolation in eval() is used).

Parameter data (numpy.ndarray[float32]):

no description available

Parameter param_values (List[List[float][3]]):

no description available

Parameter normalize (bool):

no description available

Parameter build_hierarchy (bool):

no description available

eval(self, pos, param=[0, 0, 0], active=True)

Evaluate the density at position pos. The distribution is parameterized by param if applicable.

Parameter pos (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector3f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

invert(self, sample, param=[0, 0, 0], active=True)

Inverse of the mapping implemented in sample()

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector3f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available

sample(self, sample, param=[0, 0, 0], active=True)

Given a uniformly distributed 2D sample, draw a sample from the distribution (parameterized by param if applicable)

Returns the warped sample and associated probability density.

Parameter sample (enoki.scalar.Vector2f):

no description available

Parameter param (enoki.scalar.Vector3f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → Tuple[enoki.scalar.Vector2f, float]:

no description available


Math

mitsuba.core.math.E: float = 2.7182817459106445

mitsuba.core.math.Epsilon: float = 5.960464477539063e-08

mitsuba.core.math.Infinity: float = inf

mitsuba.core.math.InvFourPi: float = 0.07957746833562851

mitsuba.core.math.InvPi: float = 0.31830987334251404

mitsuba.core.math.InvSqrtPi: float = 0.564189612865448

mitsuba.core.math.InvSqrtTwo: float = 0.7071067690849304

mitsuba.core.math.InvSqrtTwoPi: float = 0.3989422917366028

mitsuba.core.math.InvTwoPi: float = 0.15915493667125702

mitsuba.core.math.Max: float = 3.4028234663852886e+38

mitsuba.core.math.Min: float = 1.1754943508222875e-38

mitsuba.core.math.OneMinusEpsilon: float = 0.9999999403953552

mitsuba.core.math.Pi: float = 3.1415927410125732

mitsuba.core.math.RayEpsilon: float = 8.940696716308594e-05

mitsuba.core.math.RecipOverflow: float = 2.938735877055719e-39

mitsuba.core.math.ShadowEpsilon: float = 0.0008940696716308594

mitsuba.core.math.SqrtPi: float = 1.7724539041519165

mitsuba.core.math.SqrtTwo: float = 1.4142135381698608

mitsuba.core.math.SqrtTwoPi: float = 2.5066282749176025

mitsuba.core.math.chi2(arg0, arg1, arg2)

Compute the Chi^2 statistic and degrees of freedom of the given arrays while pooling low-valued entries together

Given a list of observations counts (obs[i]) and expected observation counts (exp[i]), this function accumulates the Chi^2 statistic, that is, (obs-exp)^2 / exp for each element 0, ..., n-1.

Minimum expected cell frequency. The Chi^2 test statistic is not useful when when the expected frequency in a cell is low (e.g. less than 5), because normality assumptions break down in this case. Therefore, the implementation will merge such low-frequency cells when they fall below the threshold specified here. Specifically, low-valued cells with exp[i] < pool_threshold are pooled into larger groups that are above the threshold before their contents are added to the Chi^2 statistic.

The function returns the statistic value, degrees of freedom, below- treshold entries and resulting number of pooled regions.

Parameter arg0 (enoki.dynamic.Float64):

no description available

Parameter arg1 (enoki.dynamic.Float64):

no description available

Parameter arg2 (float):

no description available

Returns → Tuple[float, int, int, int]:

no description available


mitsuba.core.math.find_interval(size, pred)

Find an interval in an ordered set

This function performs a binary search to find an index i such that pred(i) is True and pred(i+1) is False, where pred is a user-specified predicate that monotonically decreases over this range (i.e. max one True -> False transition).

The predicate will be evaluated exactly <tt>floor(log2(size)) + 1<tt> times. Note that the template parameter Index is automatically inferred from the supplied predicate, which takes an index or an index vector of type Index as input argument and can (optionally) take a mask argument as well. In the vectorized case, each vector lane can use different predicate. When pred is False for all entries, the function returns 0, and when it is True for all cases, it returns <tt>size-2<tt>.

The main use case of this function is to locate an interval (i, i+1) in an ordered list.

float my_list[] = { 1, 1.5f, 4.f, ... };

UInt32 index = find_interval(
    sizeof(my_list) / sizeof(float),
    [](UInt32 index, mask_t<UInt32> active) {
        return gather<Float>(my_list, index, active) < x;
    }
);
Parameter size (int):

no description available

Parameter pred (Callable[[int], bool]):

no description available

Returns → int:

no description available


mitsuba.core.math.is_power_of_two(arg0)

Check whether the provided integer is a power of two

Parameter arg0 (int):

no description available

Returns → bool:

no description available


mitsuba.core.math.legendre_p(overloaded)
legendre_p(l, x)

Evaluate the l-th Legendre polynomial using recurrence

Parameter l (int):

no description available

Parameter x (float):

no description available

Returns → float:

no description available

legendre_p(l, m, x)

Evaluate the l-th Legendre polynomial using recurrence

Parameter l (int):

no description available

Parameter m (int):

no description available

Parameter x (float):

no description available

Returns → float:

no description available


mitsuba.core.math.legendre_pd(l, x)

Evaluate the l-th Legendre polynomial and its derivative using recurrence

Parameter l (int):

no description available

Parameter x (float):

no description available

Returns → Tuple[float, float]:

no description available


mitsuba.core.math.legendre_pd_diff(l, x)

Evaluate the function legendre_pd(l+1, x) - legendre_pd(l-1, x)

Parameter l (int):

no description available

Parameter x (float):

no description available

Returns → Tuple[float, float]:

no description available


mitsuba.core.math.linear_to_srgb(arg0)

Applies the sRGB gamma curve to the given argument.

Parameter arg0 (float):

no description available

Returns → float:

no description available


mitsuba.core.math.morton_decode2(m)
Parameter m (int):

no description available

Returns → enoki.scalar.Vector2u:

no description available


mitsuba.core.math.morton_decode3(m)
Parameter m (int):

no description available

Returns → enoki.scalar.Vector3u:

no description available


mitsuba.core.math.morton_encode2(v)
Parameter v (enoki.scalar.Vector2u):

no description available

Returns → int:

no description available


mitsuba.core.math.morton_encode3(v)
Parameter v (enoki.scalar.Vector3u):

no description available

Returns → int:

no description available


mitsuba.core.math.round_to_power_of_two(arg0)

Round an unsigned integer to the next integer power of two

Parameter arg0 (int):

no description available

Returns → int:

no description available


mitsuba.core.math.solve_quadratic(a, b, c)

Solve a quadratic equation of the form a*x^2 + b*x + c = 0.

Parameter a (float):

no description available

Parameter b (float):

no description available

Parameter c (float):

no description available

Returns → Tuple[bool, float, float]:

True if a solution could be found


mitsuba.core.math.srgb_to_linear(arg0)

Applies the inverse sRGB gamma curve to the given argument.

Parameter arg0 (float):

no description available

Returns → float:

no description available


mitsuba.core.math.ulpdiff(arg0, arg1)

Compare the difference in ULPs between a reference value and another given floating point number

Parameter arg0 (float):

no description available

Parameter arg1 (float):

no description available

Returns → float:

no description available


mitsuba.core.spline.eval_1d(overloaded)
eval_1d(min, max, values, x)

Evaluate a cubic spline interpolant of a uniformly sampled 1D function

The implementation relies on Catmull-Rom splines, i.e. it uses finite differences to approximate the derivatives at the endpoints of each spline segment.

Template parameter Extrapolate:

Extrapolate values when x is out of range? (default: False)

Parameter min (float):

Position of the first node

Parameter max (float):

Position of the last node

Parameter values (numpy.ndarray[float32]):

Array containing size regularly spaced evaluations in the range [min, max] of the approximated function.

Parameter size:

Denotes the size of the values array

Parameter x (float):

Evaluation point

Remark:

The Python API lacks the size parameter, which is inferred automatically from the size of the input array.

Remark:

The Python API provides a vectorized version which evaluates the function for many arguments x.

Returns → float:

The interpolated value or zero when Extrapolate=false and x lies outside of [min, max]

eval_1d(nodes, values, x)

Evaluate a cubic spline interpolant of a non-uniformly sampled 1D function

The implementation relies on Catmull-Rom splines, i.e. it uses finite differences to approximate the derivatives at the endpoints of each spline segment.

Template parameter Extrapolate:

Extrapolate values when x is out of range? (default: False)

Parameter nodes (numpy.ndarray[float32]):

Array containing size non-uniformly spaced values denoting positions the where the function to be interpolated was evaluated. They must be provided in increasing order.

Parameter values (numpy.ndarray[float32]):

Array containing function evaluations matched to the entries of nodes.

Parameter size:

Denotes the size of the nodes and values array

Parameter x (float):

Evaluation point

Remark:

The Python API lacks the size parameter, which is inferred automatically from the size of the input array

Remark:

The Python API provides a vectorized version which evaluates the function for many arguments x.

Returns → float:

The interpolated value or zero when Extrapolate=false and x lies outside of a [min, max]


mitsuba.core.spline.eval_2d(nodes1, nodes2, values, x, y)

Evaluate a cubic spline interpolant of a uniformly sampled 2D function

This implementation relies on a tensor product of Catmull-Rom splines, i.e. it uses finite differences to approximate the derivatives for each dimension at the endpoints of spline patches.

Template parameter Extrapolate:

Extrapolate values when p is out of range? (default: False)

Parameter nodes1 (numpy.ndarray[float32]):

Arrays containing size1 non-uniformly spaced values denoting positions the where the function to be interpolated was evaluated on the X axis (in increasing order)

Parameter size1:

Denotes the size of the nodes1 array

Parameter nodes:

Arrays containing size2 non-uniformly spaced values denoting positions the where the function to be interpolated was evaluated on the Y axis (in increasing order)

Parameter size2:

Denotes the size of the nodes2 array

Parameter values (numpy.ndarray[float32]):

A 2D floating point array of size1*size2 cells containing irregularly spaced evaluations of the function to be interpolated. Consecutive entries of this array correspond to increments in the X coordinate.

Parameter x (float):

X coordinate of the evaluation point

Parameter y (float):

Y coordinate of the evaluation point

Remark:

The Python API lacks the size1 and size2 parameters, which are inferred automatically from the size of the input arrays.

Parameter nodes2 (numpy.ndarray[float32]):

no description available

Returns → float:

The interpolated value or zero when Extrapolate=false``tt> and ``(x,y) lies outside of the node range


mitsuba.core.spline.eval_spline(f0, f1, d0, d1, t)

Compute the definite integral and derivative of a cubic spline that is parameterized by the function values and derivatives at the endpoints of the interval [0, 1].

Parameter f0 (float):

The function value at the left position

Parameter f1 (float):

The function value at the right position

Parameter d0 (float):

The function derivative at the left position

Parameter d1 (float):

The function derivative at the right position

Parameter t (float):

The parameter variable

Returns → float:

The interpolated function value at t


mitsuba.core.spline.eval_spline_d(f0, f1, d0, d1, t)

Compute the value and derivative of a cubic spline that is parameterized by the function values and derivatives of the interval [0, 1].

Parameter f0 (float):

The function value at the left position

Parameter f1 (float):

The function value at the right position

Parameter d0 (float):

The function derivative at the left position

Parameter d1 (float):

The function derivative at the right position

Parameter t (float):

The parameter variable

Returns → Tuple[float, float]:

The interpolated function value and its derivative at t


mitsuba.core.spline.eval_spline_i(f0, f1, d0, d1, t)

Compute the definite integral and value of a cubic spline that is parameterized by the function values and derivatives of the interval [0, 1].

Parameter f0 (float):

The function value at the left position

Parameter f1 (float):

The function value at the right position

Parameter d0 (float):

The function derivative at the left position

Parameter d1 (float):

The function derivative at the right position

Parameter t (float):

no description available

Returns → Tuple[float, float]:

The definite integral and the interpolated function value at t


mitsuba.core.spline.eval_spline_weights(overloaded)
eval_spline_weights(min, max, size, x)

Compute weights to perform a spline-interpolated lookup on a uniformly sampled 1D function.

The implementation relies on Catmull-Rom splines, i.e. it uses finite differences to approximate the derivatives at the endpoints of each spline segment. The resulting weights are identical those internally used by sample_1d().

Template parameter Extrapolate:

Extrapolate values when x is out of range? (default: False)

Parameter min (float):

Position of the first node

Parameter max (float):

Position of the last node

Parameter size (int):

Denotes the number of function samples

Parameter x (float):

Evaluation point

Parameter weights:

Pointer to a weight array of size 4 that will be populated

Remark:

In the Python API, the offset and weights parameters are returned as the second and third elements of a triple.

Returns → Tuple[bool, int, numpy.ndarray[float32]]:

A boolean set to True on success and False when Extrapolate=false and x lies outside of [min, max] and an offset into the function samples associated with weights[0]

eval_spline_weights(nodes, x)

Compute weights to perform a spline-interpolated lookup on a non-uniformly sampled 1D function.

The implementation relies on Catmull-Rom splines, i.e. it uses finite differences to approximate the derivatives at the endpoints of each spline segment. The resulting weights are identical those internally used by sample_1d().

Template parameter Extrapolate:

Extrapolate values when x is out of range? (default: False)

Parameter nodes (numpy.ndarray[float32]):

Array containing size non-uniformly spaced values denoting positions the where the function to be interpolated was evaluated. They must be provided in increasing order.

Parameter size:

Denotes the size of the nodes array

Parameter x (float):

Evaluation point

Parameter weights:

Pointer to a weight array of size 4 that will be populated

Remark:

The Python API lacks the size parameter, which is inferred automatically from the size of the input array. The offset and weights parameters are returned as the second and third elements of a triple.

Returns → Tuple[bool, int, numpy.ndarray[float32]]:

A boolean set to True on success and False when Extrapolate=false and x lies outside of [min, max] and an offset into the function samples associated with weights[0]


mitsuba.core.spline.integrate_1d(overloaded)
integrate_1d(min, max, values)

Computes a prefix sum of integrals over segments of a uniformly sampled 1D Catmull-Rom spline interpolant

This is useful for sampling spline segments as part of an importance sampling scheme (in conjunction with sample_1d)

Parameter min (float):

Position of the first node

Parameter max (float):

Position of the last node

Parameter values (numpy.ndarray[float32]):

Array containing size regularly spaced evaluations in the range [min, max] of the approximated function.

Parameter size:

Denotes the size of the values array

Parameter out:

An array with size entries, which will be used to store the prefix sum

Remark:

The Python API lacks the size and out parameters. The former is inferred automatically from the size of the input array, and out is returned as a list.

Returns → enoki.dynamic.Float32:

no description available

integrate_1d(nodes, values)

Computes a prefix sum of integrals over segments of a non-uniformly sampled 1D Catmull-Rom spline interpolant

This is useful for sampling spline segments as part of an importance sampling scheme (in conjunction with sample_1d)

Parameter nodes (numpy.ndarray[float32]):

Array containing size non-uniformly spaced values denoting positions the where the function to be interpolated was evaluated. They must be provided in increasing order.

Parameter values (numpy.ndarray[float32]):

Array containing function evaluations matched to the entries of nodes.

Parameter size:

Denotes the size of the values array

Parameter out:

An array with size entries, which will be used to store the prefix sum

Remark:

The Python API lacks the size and out parameters. The former is inferred automatically from the size of the input array, and out is returned as a list.

Returns → enoki.dynamic.Float32:

no description available


mitsuba.core.spline.invert_1d(overloaded)
invert_1d(min, max_, values, y, eps=9.999999974752427e-07)

Invert a cubic spline interpolant of a uniformly sampled 1D function. The spline interpolant must be monotonically increasing.

Parameter min (float):

Position of the first node

Parameter max:

Position of the last node

Parameter values (numpy.ndarray[float32]):

Array containing size regularly spaced evaluations in the range [min, max] of the approximated function.

Parameter size:

Denotes the size of the values array

Parameter y (float):

Input parameter for the inversion

Parameter eps (float):

Error tolerance (default: 1e-6f)

Returns → float:

The spline parameter t such that eval_1d(..., t)=y

Parameter max_ (float):

no description available

invert_1d(nodes, values, y, eps=9.999999974752427e-07)

Invert a cubic spline interpolant of a non-uniformly sampled 1D function. The spline interpolant must be monotonically increasing.

Parameter nodes (numpy.ndarray[float32]):

Array containing size non-uniformly spaced values denoting positions the where the function to be interpolated was evaluated. They must be provided in increasing order.

Parameter values (numpy.ndarray[float32]):

Array containing function evaluations matched to the entries of nodes.

Parameter size:

Denotes the size of the values array

Parameter y (float):

Input parameter for the inversion

Parameter eps (float):

Error tolerance (default: 1e-6f)

Returns → float:

The spline parameter t such that eval_1d(..., t)=y


mitsuba.core.spline.sample_1d(overloaded)
sample_1d(min, max, values, cdf, sample, eps=9.999999974752427e-07)

Importance sample a segment of a uniformly sampled 1D Catmull-Rom spline interpolant

Parameter min (float):

Position of the first node

Parameter max (float):

Position of the last node

Parameter values (numpy.ndarray[float32]):

Array containing size regularly spaced evaluations in the range [min, max] of the approximated function.

Parameter cdf (numpy.ndarray[float32]):

Array containing a cumulative distribution function computed by integrate_1d().

Parameter size:

Denotes the size of the values array

Parameter sample (float):

A uniformly distributed random sample in the interval [0,1]

Parameter eps (float):

Error tolerance (default: 1e-6f)

Returns → Tuple[float, float, float]:

1. The sampled position 2. The value of the spline evaluated at the sampled position 3. The probability density at the sampled position (which only differs from item 2. when the function does not integrate to one)

sample_1d(nodes, values, cdf, sample, eps=9.999999974752427e-07)

Importance sample a segment of a non-uniformly sampled 1D Catmull- Rom spline interpolant

Parameter nodes (numpy.ndarray[float32]):

Array containing size non-uniformly spaced values denoting positions the where the function to be interpolated was evaluated. They must be provided in increasing order.

Parameter values (numpy.ndarray[float32]):

Array containing function evaluations matched to the entries of nodes.

Parameter cdf (numpy.ndarray[float32]):

Array containing a cumulative distribution function computed by integrate_1d().

Parameter size:

Denotes the size of the values array

Parameter sample (float):

A uniformly distributed random sample in the interval [0,1]

Parameter eps (float):

Error tolerance (default: 1e-6f)

Returns → Tuple[float, float, float]:

1. The sampled position 2. The value of the spline evaluated at the sampled position 3. The probability density at the sampled position (which only differs from item 2. when the function does not integrate to one)


Log

class mitsuba.core.LogLevel

Available Log message types

Members:

Trace

< Trace message, for extremely verbose debugging

Debug

< Debug message, usually turned off

Info

< More relevant debug / information message

Warn

< Warning message

Error

< Error message, causes an exception to be thrown

__init__(self, arg0)
Parameter arg0 (int):

no description available


class mitsuba.core.Logger

Base class: mitsuba.core.Object

Responsible for processing log messages

Upon receiving a log message, the Logger class invokes a Formatter to convert it into a human-readable form. Following that, it sends this information to every registered Appender.

__init__(self, arg0)

Construct a new logger with the given minimum log level

Parameter arg0 (mitsuba.core.LogLevel):

no description available

add_appender(self, arg0)

Add an appender to this logger

Parameter arg0 (mitsuba.core.Appender):

no description available

Returns → None:

no description available

appender(self, arg0)

Return one of the appenders

Parameter arg0 (int):

no description available

Returns → mitsuba.core.Appender:

no description available

appender_count(self)

Return the number of registered appenders

Returns → int:

no description available

clear_appenders(self)

Remove all appenders from this logger

Returns → None:

no description available

error_level(self)

Return the current error level

Returns → mitsuba.core.LogLevel:

no description available

formatter(self)

Return the logger’s formatter implementation

Returns → mitsuba.core.Formatter:

no description available

log_level(self)

Return the current log level

Returns → mitsuba.core.LogLevel:

no description available

log_progress(self, progress, name, formatted, eta, ptr=None)

Process a progress message

Parameter progress (float):

Percentage value in [0, 100]

Parameter name (str):

Title of the progress message

Parameter formatted (str):

Formatted string representation of the message

Parameter eta (str):

Estimated time until 100% is reached.

Parameter ptr (capsule):

Custom pointer payload. This is used to express the context of a progress message. When rendering a scene, it will usually contain a pointer to the associated RenderJob.

Returns → None:

no description available

read_log(self)

Return the contents of the log file as a string

Throws a runtime exception upon failure

Returns → str:

no description available

remove_appender(self, arg0)

Remove an appender from this logger

Parameter arg0 (mitsuba.core.Appender):

no description available

Returns → None:

no description available

set_error_level(self, arg0)

Set the error log level (this level and anything above will throw exceptions).

The value provided here can be used for instance to turn warnings into errors. But level must always be less than Error, i.e. it isn’t possible to cause errors not to throw an exception.

Parameter arg0 (mitsuba.core.LogLevel):

no description available

Returns → None:

no description available

set_formatter(self, arg0)

Set the logger’s formatter implementation

Parameter arg0 (mitsuba.core.Formatter):

no description available

Returns → None:

no description available

set_log_level(self, arg0)

Set the log level (everything below will be ignored)

Parameter arg0 (mitsuba.core.LogLevel):

no description available

Returns → None:

no description available


class mitsuba.core.Appender

Base class: mitsuba.core.Object

This class defines an abstract destination for logging-relevant information

__init__(self)
append(self, level, text)

Append a line of text with the given log level

Parameter level (mitsuba.core.LogLevel):

no description available

Parameter text (str):

no description available

Returns → None:

no description available

log_progress(self, progress, name, formatted, eta, ptr=None)

Process a progress message

Parameter progress (float):

Percentage value in [0, 100]

Parameter name (str):

Title of the progress message

Parameter formatted (str):

Formatted string representation of the message

Parameter eta (str):

Estimated time until 100% is reached.

Parameter ptr (capsule):

Custom pointer payload. This is used to express the context of a progress message. When rendering a scene, it will usually contain a pointer to the associated RenderJob.

Returns → None:

no description available


Types

class mitsuba.core.Vector0f
__init__(self)
__init__(self, arg0)
Parameter arg0 (float):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector0f):

no description available

__init__(self, arg0)
Parameter arg0 (ndarray):

no description available

__init__(self, arg0)
Parameter arg0 (torch_tensor):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)
Parameter arg0 (tuple):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector0d):

no description available

__init__(self, arg0)
  1. __init__(self: enoki.scalar.Vector0f, arg0: enoki.scalar.Vector0i) -> None

Parameter arg0 (enoki.scalar.Vector0u):

no description available

empty(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector0f:

no description available

eval(self)
Returns → enoki.scalar.Vector0f:

no description available

full(value, size=1)
Parameter value (float):

no description available

Parameter size (int):

no description available

Returns → enoki.scalar.Vector0f:

no description available

managed(self)
Returns → enoki.scalar.Vector0f:

no description available

numpy(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

torch(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector0f:

no description available


class mitsuba.core.Vector0i
__init__(self)
__init__(self, arg0)
Parameter arg0 (int):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector0i):

no description available

__init__(self, arg0)
Parameter arg0 (ndarray):

no description available

__init__(self, arg0)
Parameter arg0 (torch_tensor):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)
Parameter arg0 (tuple):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector0f):

no description available

__init__(self, arg0)
  1. __init__(self: enoki.scalar.Vector0i, arg0: enoki.scalar.Vector0u) -> None

Parameter arg0 (enoki.scalar.Vector0d):

no description available

empty(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector0i:

no description available

eval(self)
Returns → enoki.scalar.Vector0i:

no description available

full(value, size=1)
Parameter value (int):

no description available

Parameter size (int):

no description available

Returns → enoki.scalar.Vector0i:

no description available

managed(self)
Returns → enoki.scalar.Vector0i:

no description available

numpy(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

torch(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector0i:

no description available


class mitsuba.core.Vector0u
__init__(self)
__init__(self, arg0)
Parameter arg0 (int):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector0u):

no description available

__init__(self, arg0)
Parameter arg0 (ndarray):

no description available

__init__(self, arg0)
Parameter arg0 (torch_tensor):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)
Parameter arg0 (tuple):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector0f):

no description available

__init__(self, arg0)
  1. __init__(self: enoki.scalar.Vector0u, arg0: enoki.scalar.Vector0i) -> None

Parameter arg0 (enoki.scalar.Vector0d):

no description available

empty(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector0u:

no description available

eval(self)
Returns → enoki.scalar.Vector0u:

no description available

full(value, size=1)
Parameter value (int):

no description available

Parameter size (int):

no description available

Returns → enoki.scalar.Vector0u:

no description available

managed(self)
Returns → enoki.scalar.Vector0u:

no description available

numpy(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

torch(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector0u:

no description available


class mitsuba.core.Vector1f
__init__(self)
__init__(self, arg0)
Parameter arg0 (float):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector1f):

no description available

__init__(self, arg0)
Parameter arg0 (ndarray):

no description available

__init__(self, arg0)
Parameter arg0 (torch_tensor):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)
Parameter arg0 (tuple):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector1d):

no description available

__init__(self, arg0)
  1. __init__(self: enoki.scalar.Vector1f, arg0: enoki.scalar.Vector1i) -> None

Parameter arg0 (enoki.scalar.Vector1u):

no description available

empty(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector1f:

no description available

eval(self)
Returns → enoki.scalar.Vector1f:

no description available

full(value, size=1)
Parameter value (float):

no description available

Parameter size (int):

no description available

Returns → enoki.scalar.Vector1f:

no description available

managed(self)
Returns → enoki.scalar.Vector1f:

no description available

numpy(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

torch(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector1f:

no description available


class mitsuba.core.Vector1i
__init__(self)
__init__(self, arg0)
Parameter arg0 (int):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector1i):

no description available

__init__(self, arg0)
Parameter arg0 (ndarray):

no description available

__init__(self, arg0)
Parameter arg0 (torch_tensor):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)
Parameter arg0 (tuple):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector1f):

no description available

__init__(self, arg0)
  1. __init__(self: enoki.scalar.Vector1i, arg0: enoki.scalar.Vector1u) -> None

Parameter arg0 (enoki.scalar.Vector1d):

no description available

empty(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector1i:

no description available

eval(self)
Returns → enoki.scalar.Vector1i:

no description available

full(value, size=1)
Parameter value (int):

no description available

Parameter size (int):

no description available

Returns → enoki.scalar.Vector1i:

no description available

managed(self)
Returns → enoki.scalar.Vector1i:

no description available

numpy(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

torch(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector1i:

no description available


class mitsuba.core.Vector1u
__init__(self)
__init__(self, arg0)
Parameter arg0 (int):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector1u):

no description available

__init__(self, arg0)
Parameter arg0 (ndarray):

no description available

__init__(self, arg0)
Parameter arg0 (torch_tensor):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)
Parameter arg0 (tuple):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector1f):

no description available

__init__(self, arg0)
  1. __init__(self: enoki.scalar.Vector1u, arg0: enoki.scalar.Vector1i) -> None

Parameter arg0 (enoki.scalar.Vector1d):

no description available

empty(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector1u:

no description available

eval(self)
Returns → enoki.scalar.Vector1u:

no description available

full(value, size=1)
Parameter value (int):

no description available

Parameter size (int):

no description available

Returns → enoki.scalar.Vector1u:

no description available

managed(self)
Returns → enoki.scalar.Vector1u:

no description available

numpy(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

torch(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector1u:

no description available


class mitsuba.core.Vector2f
__init__(self)
__init__(self, arg0)
Parameter arg0 (float):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector2f):

no description available

__init__(self, arg0)
Parameter arg0 (ndarray):

no description available

__init__(self, arg0)
Parameter arg0 (torch_tensor):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)
Parameter arg0 (tuple):

no description available

__init__(self, x, y)
Parameter x (float):

no description available

Parameter y (float):

no description available

__init__(self, arg0)
  1. __init__(self: enoki.scalar.Vector2f, arg0: enoki.scalar.Vector2u) -> None

  2. __init__(self: enoki.scalar.Vector2f, arg0: enoki.scalar.Vector2i) -> None

Parameter arg0 (enoki.scalar.Vector2d):

no description available

empty(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector2f:

no description available

eval(self)
Returns → enoki.scalar.Vector2f:

no description available

full(value, size=1)
Parameter value (float):

no description available

Parameter size (int):

no description available

Returns → enoki.scalar.Vector2f:

no description available

managed(self)
Returns → enoki.scalar.Vector2f:

no description available

numpy(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

torch(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector2f:

no description available


class mitsuba.core.Vector2i
__init__(self)
__init__(self, arg0)
Parameter arg0 (int):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector2i):

no description available

__init__(self, arg0)
Parameter arg0 (ndarray):

no description available

__init__(self, arg0)
Parameter arg0 (torch_tensor):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)
Parameter arg0 (tuple):

no description available

__init__(self, x, y)
Parameter x (int):

no description available

Parameter y (int):

no description available

__init__(self, arg0)
  1. __init__(self: enoki.scalar.Vector2i, arg0: enoki.scalar.Vector2d) -> None

  2. __init__(self: enoki.scalar.Vector2i, arg0: enoki.scalar.Vector2u) -> None

Parameter arg0 (enoki.scalar.Vector2f):

no description available

empty(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector2i:

no description available

eval(self)
Returns → enoki.scalar.Vector2i:

no description available

full(value, size=1)
Parameter value (int):

no description available

Parameter size (int):

no description available

Returns → enoki.scalar.Vector2i:

no description available

managed(self)
Returns → enoki.scalar.Vector2i:

no description available

numpy(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

torch(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector2i:

no description available


class mitsuba.core.Vector2u
__init__(self)
__init__(self, arg0)
Parameter arg0 (int):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector2u):

no description available

__init__(self, arg0)
Parameter arg0 (ndarray):

no description available

__init__(self, arg0)
Parameter arg0 (torch_tensor):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)
Parameter arg0 (tuple):

no description available

__init__(self, x, y)
Parameter x (int):

no description available

Parameter y (int):

no description available

__init__(self, arg0)
  1. __init__(self: enoki.scalar.Vector2u, arg0: enoki.scalar.Vector2d) -> None

  2. __init__(self: enoki.scalar.Vector2u, arg0: enoki.scalar.Vector2i) -> None

Parameter arg0 (enoki.scalar.Vector2f):

no description available

empty(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector2u:

no description available

eval(self)
Returns → enoki.scalar.Vector2u:

no description available

full(value, size=1)
Parameter value (int):

no description available

Parameter size (int):

no description available

Returns → enoki.scalar.Vector2u:

no description available

managed(self)
Returns → enoki.scalar.Vector2u:

no description available

numpy(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

torch(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector2u:

no description available


class mitsuba.core.Vector3f
__init__(self)
__init__(self, arg0)
Parameter arg0 (float):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector3f):

no description available

__init__(self, arg0)
Parameter arg0 (ndarray):

no description available

__init__(self, arg0)
Parameter arg0 (torch_tensor):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)
Parameter arg0 (tuple):

no description available

__init__(self, x, y, z)
Parameter x (float):

no description available

Parameter y (float):

no description available

Parameter z (float):

no description available

__init__(self, arg0)
  1. __init__(self: enoki.scalar.Vector3f, arg0: enoki.scalar.Vector3u) -> None

  2. __init__(self: enoki.scalar.Vector3f, arg0: enoki.scalar.Vector3i) -> None

Parameter arg0 (enoki.scalar.Vector3d):

no description available

empty(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector3f:

no description available

eval(self)
Returns → enoki.scalar.Vector3f:

no description available

full(value, size=1)
Parameter value (float):

no description available

Parameter size (int):

no description available

Returns → enoki.scalar.Vector3f:

no description available

managed(self)
Returns → enoki.scalar.Vector3f:

no description available

numpy(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

torch(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector3f:

no description available


class mitsuba.core.Vector3i
__init__(self)
__init__(self, arg0)
Parameter arg0 (int):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector3i):

no description available

__init__(self, arg0)
Parameter arg0 (ndarray):

no description available

__init__(self, arg0)
Parameter arg0 (torch_tensor):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)
Parameter arg0 (tuple):

no description available

__init__(self, x, y, z)
Parameter x (int):

no description available

Parameter y (int):

no description available

Parameter z (int):

no description available

__init__(self, arg0)
  1. __init__(self: enoki.scalar.Vector3i, arg0: enoki.scalar.Vector3d) -> None

  2. __init__(self: enoki.scalar.Vector3i, arg0: enoki.scalar.Vector3u) -> None

Parameter arg0 (enoki.scalar.Vector3f):

no description available

empty(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector3i:

no description available

eval(self)
Returns → enoki.scalar.Vector3i:

no description available

full(value, size=1)
Parameter value (int):

no description available

Parameter size (int):

no description available

Returns → enoki.scalar.Vector3i:

no description available

managed(self)
Returns → enoki.scalar.Vector3i:

no description available

numpy(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

torch(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector3i:

no description available


class mitsuba.core.Vector3u
__init__(self)
__init__(self, arg0)
Parameter arg0 (int):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector3u):

no description available

__init__(self, arg0)
Parameter arg0 (ndarray):

no description available

__init__(self, arg0)
Parameter arg0 (torch_tensor):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)
Parameter arg0 (tuple):

no description available

__init__(self, x, y, z)
Parameter x (int):

no description available

Parameter y (int):

no description available

Parameter z (int):

no description available

__init__(self, arg0)
  1. __init__(self: enoki.scalar.Vector3u, arg0: enoki.scalar.Vector3d) -> None

  2. __init__(self: enoki.scalar.Vector3u, arg0: enoki.scalar.Vector3i) -> None

Parameter arg0 (enoki.scalar.Vector3f):

no description available

empty(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector3u:

no description available

eval(self)
Returns → enoki.scalar.Vector3u:

no description available

full(value, size=1)
Parameter value (int):

no description available

Parameter size (int):

no description available

Returns → enoki.scalar.Vector3u:

no description available

managed(self)
Returns → enoki.scalar.Vector3u:

no description available

numpy(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

torch(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Vector3u:

no description available


class mitsuba.core.Matrix2f
__init__(self)
__init__(self, arg0)
Parameter arg0 (float):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)
Parameter arg0 (ndarray):

no description available

__init__(self, arg0)
Parameter arg0 (torch_tensor):

no description available

__init__(self, arg0, arg1, arg2, arg3)
Parameter arg0 (float):

no description available

Parameter arg1 (float):

no description available

Parameter arg2 (float):

no description available

Parameter arg3 (float):

no description available

__init__(self, arg0, arg1)
Parameter arg0 (enoki.scalar.Vector2f):

no description available

Parameter arg1 (enoki.scalar.Vector2f):

no description available

full(value, size=1)
Parameter value (float):

no description available

Parameter size (int):

no description available

Returns → enoki.scalar.Matrix2f:

no description available

identity(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Matrix2f:

no description available

numpy(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

torch(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Matrix2f:

no description available


class mitsuba.core.Matrix3f
__init__(self)
__init__(self, arg0)
Parameter arg0 (float):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)
Parameter arg0 (ndarray):

no description available

__init__(self, arg0)
Parameter arg0 (torch_tensor):

no description available

__init__(self, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
Parameter arg0 (float):

no description available

Parameter arg1 (float):

no description available

Parameter arg2 (float):

no description available

Parameter arg3 (float):

no description available

Parameter arg4 (float):

no description available

Parameter arg5 (float):

no description available

Parameter arg6 (float):

no description available

Parameter arg7 (float):

no description available

Parameter arg8 (float):

no description available

__init__(self, arg0, arg1, arg2)
Parameter arg0 (enoki.scalar.Vector3f):

no description available

Parameter arg1 (enoki.scalar.Vector3f):

no description available

Parameter arg2 (enoki.scalar.Vector3f):

no description available

full(value, size=1)
Parameter value (float):

no description available

Parameter size (int):

no description available

Returns → enoki.scalar.Matrix3f:

no description available

identity(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Matrix3f:

no description available

numpy(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

torch(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Matrix3f:

no description available


class mitsuba.core.Matrix4f
__init__(self)
__init__(self, arg0)
Parameter arg0 (float):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)
Parameter arg0 (ndarray):

no description available

__init__(self, arg0)
Parameter arg0 (torch_tensor):

no description available

__init__(self, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15)
Parameter arg0 (float):

no description available

Parameter arg1 (float):

no description available

Parameter arg2 (float):

no description available

Parameter arg3 (float):

no description available

Parameter arg4 (float):

no description available

Parameter arg5 (float):

no description available

Parameter arg6 (float):

no description available

Parameter arg7 (float):

no description available

Parameter arg8 (float):

no description available

Parameter arg9 (float):

no description available

Parameter arg10 (float):

no description available

Parameter arg11 (float):

no description available

Parameter arg12 (float):

no description available

Parameter arg13 (float):

no description available

Parameter arg14 (float):

no description available

Parameter arg15 (float):

no description available

__init__(self, arg0, arg1, arg2, arg3)
Parameter arg0 (enoki.scalar.Vector4f):

no description available

Parameter arg1 (enoki.scalar.Vector4f):

no description available

Parameter arg2 (enoki.scalar.Vector4f):

no description available

Parameter arg3 (enoki.scalar.Vector4f):

no description available

full(value, size=1)
Parameter value (float):

no description available

Parameter size (int):

no description available

Returns → enoki.scalar.Matrix4f:

no description available

identity(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Matrix4f:

no description available

look_at(origin, target, up)
Parameter origin (enoki.scalar.Vector3f):

no description available

Parameter target (enoki.scalar.Vector3f):

no description available

Parameter up (enoki.scalar.Vector3f):

no description available

Returns → enoki.scalar.Matrix4f:

no description available

numpy(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

rotate(axis, angle)
Parameter axis (enoki.scalar.Vector3f):

no description available

Parameter angle (float):

no description available

Returns → enoki.scalar.Matrix4f:

no description available

scale(arg0)
Parameter arg0 (enoki.scalar.Vector3f):

no description available

Returns → enoki.scalar.Matrix4f:

no description available

torch(self, eval=True)
Parameter eval (bool):

no description available

Returns → object:

no description available

translate(arg0)
Parameter arg0 (enoki.scalar.Vector3f):

no description available

Returns → enoki.scalar.Matrix4f:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → enoki.scalar.Matrix4f:

no description available


class mitsuba.core.BoundingBox2f

Generic n-dimensional bounding box data structure

Maintains a minimum and maximum position along each dimension and provides various convenience functions for querying and modifying them.

This class is parameterized by the underlying point data structure, which permits the use of different scalar types and dimensionalities, e.g.

BoundingBox<Point3i> integer_bbox(Point3i(0, 1, 3), Point3i(4, 5, 6));
BoundingBox<Point2d> double_bbox(Point2d(0.0, 1.0), Point2d(4.0, 5.0));
Template parameter T:

The underlying point data type (e.g. Point2d)

__init__(self)

Create a new invalid bounding box

Initializes the components of the minimum and maximum position to $infty$ and $-infty$, respectively.

__init__(self, p)

Create a collapsed bounding box from a single point

Parameter p (enoki.scalar.Vector2f):

no description available

__init__(self, min, max)

Create a bounding box from two positions

Parameter min (enoki.scalar.Vector2f):

no description available

Parameter max (enoki.scalar.Vector2f):

no description available

__init__(self, arg0)

Copy constructor

Parameter arg0 (mitsuba.core.BoundingBox2f):

no description available

center(self)

Return the center point

Returns → enoki.scalar.Vector2f:

no description available

clip(self, arg0)

Clip this bounding box to another bounding box

Parameter arg0 (mitsuba.core.BoundingBox2f):

no description available

Returns → None:

no description available

collapsed(self)

Check whether this bounding box has collapsed to a point, line, or plane

Returns → bool:

no description available

contains(overloaded)
contains(self, p, strict=False)

Check whether a point lies on or inside the bounding box

Parameter p (enoki.scalar.Vector2f):

The point to be tested

Template parameter Strict:

Set this parameter to True if the bounding box boundary should be excluded in the test

Remark:

In the Python bindings, the ‘Strict’ argument is a normal function parameter with default value False.

Parameter strict (bool):

no description available

Returns → bool:

no description available

contains(self, bbox, strict=False)

Check whether a specified bounding box lies on or within the current bounding box

Note that by definition, an ‘invalid’ bounding box (where min=$infty$ and max=$-infty$) does not cover any space. Hence, this method will always return true when given such an argument.

Template parameter Strict:

Set this parameter to True if the bounding box boundary should be excluded in the test

Remark:

In the Python bindings, the ‘Strict’ argument is a normal function parameter with default value False.

Parameter bbox (mitsuba.core.BoundingBox2f):

no description available

Parameter strict (bool):

no description available

Returns → bool:

no description available

corner(self, arg0)

Return the position of a bounding box corner

Parameter arg0 (int):

no description available

Returns → enoki.scalar.Vector2f:

no description available

distance(overloaded)
distance(self, arg0)

Calculate the shortest distance between the axis-aligned bounding box and the point p.

Parameter arg0 (enoki.scalar.Vector2f):

no description available

Returns → float:

no description available

distance(self, arg0)

Calculate the shortest distance between the axis-aligned bounding box and bbox.

Parameter arg0 (mitsuba.core.BoundingBox2f):

no description available

Returns → float:

no description available

expand(overloaded)
expand(self, arg0)

Expand the bounding box to contain another point

Parameter arg0 (enoki.scalar.Vector2f):

no description available

expand(self, arg0)

Expand the bounding box to contain another bounding box

Parameter arg0 (mitsuba.core.BoundingBox2f):

no description available

extents(self)

Calculate the bounding box extents

Returns → enoki.scalar.Vector2f:

max - min

major_axis(self)

Return the dimension index with the index associated side length

Returns → int:

no description available

merge(arg0, arg1)

Merge two bounding boxes

Parameter arg0 (mitsuba.core.BoundingBox2f):

no description available

Parameter arg1 (mitsuba.core.BoundingBox2f):

no description available

Returns → mitsuba.core.BoundingBox2f:

no description available

minor_axis(self)

Return the dimension index with the shortest associated side length

Returns → int:

no description available

overlaps(self, bbox, strict=False)

Check two axis-aligned bounding boxes for possible overlap.

Parameter Strict:

Set this parameter to True if the bounding box boundary should be excluded in the test

Remark:

In the Python bindings, the ‘Strict’ argument is a normal function parameter with default value False.

Parameter bbox (mitsuba.core.BoundingBox2f):

no description available

Parameter strict (bool):

no description available

Returns → bool:

True If overlap was detected.

reset(self)

Mark the bounding box as invalid.

This operation sets the components of the minimum and maximum position to $infty$ and $-infty$, respectively.

Returns → None:

no description available

squared_distance(overloaded)
squared_distance(self, arg0)

Calculate the shortest squared distance between the axis-aligned bounding box and the point p.

Parameter arg0 (enoki.scalar.Vector2f):

no description available

Returns → float:

no description available

squared_distance(self, arg0)

Calculate the shortest squared distance between the axis-aligned bounding box and bbox.

Parameter arg0 (mitsuba.core.BoundingBox2f):

no description available

Returns → float:

no description available

surface_area(self)

Calculate the 2-dimensional surface area of a 3D bounding box

Returns → float:

no description available

valid(self)

Check whether this is a valid bounding box

A bounding box bbox is considered to be valid when

bbox.min[i] <= bbox.max[i]

holds for each component i.

Returns → bool:

no description available

volume(self)

Calculate the n-dimensional volume of the bounding box

Returns → float:

no description available


class mitsuba.core.BoundingBox3f

Generic n-dimensional bounding box data structure

Maintains a minimum and maximum position along each dimension and provides various convenience functions for querying and modifying them.

This class is parameterized by the underlying point data structure, which permits the use of different scalar types and dimensionalities, e.g.

BoundingBox<Point3i> integer_bbox(Point3i(0, 1, 3), Point3i(4, 5, 6));
BoundingBox<Point2d> double_bbox(Point2d(0.0, 1.0), Point2d(4.0, 5.0));
Template parameter T:

The underlying point data type (e.g. Point2d)

__init__(self)

Create a new invalid bounding box

Initializes the components of the minimum and maximum position to $infty$ and $-infty$, respectively.

__init__(self, p)

Create a collapsed bounding box from a single point

Parameter p (enoki.scalar.Vector3f):

no description available

__init__(self, min, max)

Create a bounding box from two positions

Parameter min (enoki.scalar.Vector3f):

no description available

Parameter max (enoki.scalar.Vector3f):

no description available

__init__(self, arg0)

Copy constructor

Parameter arg0 (mitsuba.core.BoundingBox3f):

no description available

center(self)

Return the center point

Returns → enoki.scalar.Vector3f:

no description available

clip(self, arg0)

Clip this bounding box to another bounding box

Parameter arg0 (mitsuba.core.BoundingBox3f):

no description available

Returns → None:

no description available

collapsed(self)

Check whether this bounding box has collapsed to a point, line, or plane

Returns → bool:

no description available

contains(overloaded)
contains(self, p, strict=False)

Check whether a point lies on or inside the bounding box

Parameter p (enoki.scalar.Vector3f):

The point to be tested

Template parameter Strict:

Set this parameter to True if the bounding box boundary should be excluded in the test

Remark:

In the Python bindings, the ‘Strict’ argument is a normal function parameter with default value False.

Parameter strict (bool):

no description available

Returns → bool:

no description available

contains(self, bbox, strict=False)

Check whether a specified bounding box lies on or within the current bounding box

Note that by definition, an ‘invalid’ bounding box (where min=$infty$ and max=$-infty$) does not cover any space. Hence, this method will always return true when given such an argument.

Template parameter Strict:

Set this parameter to True if the bounding box boundary should be excluded in the test

Remark:

In the Python bindings, the ‘Strict’ argument is a normal function parameter with default value False.

Parameter bbox (mitsuba.core.BoundingBox3f):

no description available

Parameter strict (bool):

no description available

Returns → bool:

no description available

corner(self, arg0)

Return the position of a bounding box corner

Parameter arg0 (int):

no description available

Returns → enoki.scalar.Vector3f:

no description available

distance(overloaded)
distance(self, arg0)

Calculate the shortest distance between the axis-aligned bounding box and the point p.

Parameter arg0 (enoki.scalar.Vector3f):

no description available

Returns → float:

no description available

distance(self, arg0)

Calculate the shortest distance between the axis-aligned bounding box and bbox.

Parameter arg0 (mitsuba.core.BoundingBox3f):

no description available

Returns → float:

no description available

expand(overloaded)
expand(self, arg0)

Expand the bounding box to contain another point

Parameter arg0 (enoki.scalar.Vector3f):

no description available

expand(self, arg0)

Expand the bounding box to contain another bounding box

Parameter arg0 (mitsuba.core.BoundingBox3f):

no description available

extents(self)

Calculate the bounding box extents

Returns → enoki.scalar.Vector3f:

max - min

major_axis(self)

Return the dimension index with the index associated side length

Returns → int:

no description available

merge(arg0, arg1)

Merge two bounding boxes

Parameter arg0 (mitsuba.core.BoundingBox3f):

no description available

Parameter arg1 (mitsuba.core.BoundingBox3f):

no description available

Returns → mitsuba.core.BoundingBox3f:

no description available

minor_axis(self)

Return the dimension index with the shortest associated side length

Returns → int:

no description available

overlaps(self, bbox, strict=False)

Check two axis-aligned bounding boxes for possible overlap.

Parameter Strict:

Set this parameter to True if the bounding box boundary should be excluded in the test

Remark:

In the Python bindings, the ‘Strict’ argument is a normal function parameter with default value False.

Parameter bbox (mitsuba.core.BoundingBox3f):

no description available

Parameter strict (bool):

no description available

Returns → bool:

True If overlap was detected.

ray_intersect(self, ray)

Check if a ray intersects a bounding box

Note that this function ignores the (mint, maxt) interval associated with the ray.

Parameter ray (mitsuba.core.Ray3f):

no description available

Returns → Tuple[bool, float, float]:

no description available

reset(self)

Mark the bounding box as invalid.

This operation sets the components of the minimum and maximum position to $infty$ and $-infty$, respectively.

Returns → None:

no description available

squared_distance(overloaded)
squared_distance(self, arg0)

Calculate the shortest squared distance between the axis-aligned bounding box and the point p.

Parameter arg0 (enoki.scalar.Vector3f):

no description available

Returns → float:

no description available

squared_distance(self, arg0)

Calculate the shortest squared distance between the axis-aligned bounding box and bbox.

Parameter arg0 (mitsuba.core.BoundingBox3f):

no description available

Returns → float:

no description available

surface_area(self)

Calculate the 2-dimensional surface area of a 3D bounding box

Returns → float:

no description available

valid(self)

Check whether this is a valid bounding box

A bounding box bbox is considered to be valid when

bbox.min[i] <= bbox.max[i]

holds for each component i.

Returns → bool:

no description available

volume(self)

Calculate the n-dimensional volume of the bounding box

Returns → float:

no description available


class mitsuba.core.BoundingSphere3f

Generic n-dimensional bounding sphere data structure

__init__(self)

Construct bounding sphere(s) at the origin having radius zero

__init__(self, arg0, arg1)

Create bounding sphere(s) from given center point(s) with given size(s)

Parameter arg0 (enoki.scalar.Vector3f):

no description available

Parameter arg1 (float):

no description available

__init__(self, arg0)
Parameter arg0 (mitsuba.core.BoundingSphere3f):

no description available

contains(self, p, strict=False)

Check whether a point lies on or inside the bounding sphere

Parameter p (enoki.scalar.Vector3f):

The point to be tested

Template parameter Strict:

Set this parameter to True if the bounding sphere boundary should be excluded in the test

Remark:

In the Python bindings, the ‘Strict’ argument is a normal function parameter with default value False.

Parameter strict (bool):

no description available

Returns → bool:

no description available

empty(self)

Return whether this bounding sphere has a radius of zero or less.

Returns → bool:

no description available

expand(self, arg0)

Expand the bounding sphere radius to contain another point.

Parameter arg0 (enoki.scalar.Vector3f):

no description available

Returns → None:

no description available

ray_intersect(self, ray)

Check if a ray intersects a bounding box

Parameter ray (mitsuba.core.Ray3f):

no description available

Returns → Tuple[bool, float, float]:

no description available


class mitsuba.core.Transform3f

Encapsulates a 4x4 homogeneous coordinate transformation along with its inverse transpose

The Transform class provides a set of overloaded matrix-vector multiplication operators for vectors, points, and normals (all of them behave differently under homogeneous coordinate transformations, hence the need to represent them using separate types)

__init__(self)

Initialize with the identity matrix

__init__(self, arg0)

Copy constructor

Parameter arg0 (mitsuba.core.Transform3f):

no description available

__init__(self, arg0)
Parameter arg0 (array):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)

Initialize the transformation from the given matrix (and compute its inverse transpose)

Parameter arg0 (enoki.scalar.Matrix3f):

no description available

__init__(self, arg0, arg1)

Initialize from a matrix and its inverse transpose

Parameter arg0 (enoki.scalar.Matrix3f):

no description available

Parameter arg1 (enoki.scalar.Matrix3f):

no description available

has_scale(overloaded)
has_scale(self)

Test for a scale component in each transform matrix by checking whether M . M^T == I (where M is the matrix in question and I is the identity).

Returns → bool:

no description available

has_scale(self)

Test for a scale component in each transform matrix by checking whether M . M^T == I (where M is the matrix in question and I is the identity).

Returns → bool:

no description available

inverse(self)

Compute the inverse of this transformation (involves just shuffles, no arithmetic)

Returns → mitsuba.core.Transform3f:

no description available

rotate(angle)

Create a rotation transformation in 2D. The angle is specified in degrees

Parameter angle (float):

no description available

Returns → mitsuba.core.Transform3f:

no description available

scale(v)

Create a scale transformation

Parameter v (enoki.scalar.Vector2f):

no description available

Returns → mitsuba.core.Transform3f:

no description available

transform_point(self, arg0)
Parameter arg0 (enoki.scalar.Vector2f):

no description available

Returns → enoki.scalar.Vector2f:

no description available

transform_vector(self, arg0)
Parameter arg0 (enoki.scalar.Vector2f):

no description available

Returns → enoki.scalar.Vector2f:

no description available

translate(v)

Create a translation transformation

Parameter v (enoki.scalar.Vector2f):

no description available

Returns → mitsuba.core.Transform3f:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → mitsuba.core.Transform3f:

no description available


class mitsuba.core.Transform4f

Encapsulates a 4x4 homogeneous coordinate transformation along with its inverse transpose

The Transform class provides a set of overloaded matrix-vector multiplication operators for vectors, points, and normals (all of them behave differently under homogeneous coordinate transformations, hence the need to represent them using separate types)

__init__(self)

Initialize with the identity matrix

__init__(self, arg0)

Copy constructor

Parameter arg0 (mitsuba.core.Transform4f):

no description available

__init__(self, arg0)
Parameter arg0 (array):

no description available

__init__(self, arg0)
Parameter arg0 (list):

no description available

__init__(self, arg0)

Initialize the transformation from the given matrix (and compute its inverse transpose)

Parameter arg0 (enoki.scalar.Matrix4f):

no description available

__init__(self, arg0, arg1)

Initialize from a matrix and its inverse transpose

Parameter arg0 (enoki.scalar.Matrix4f):

no description available

Parameter arg1 (enoki.scalar.Matrix4f):

no description available

extract(self)

Extract a lower-dimensional submatrix

Returns → mitsuba.core.Transform3f:

no description available

from_frame(frame)

Creates a transformation that converts from ‘frame’ to the standard basis

Parameter frame (mitsuba.core.Frame3f):

no description available

Returns → mitsuba.core.Transform4f:

no description available

has_scale(overloaded)
has_scale(self)

Test for a scale component in each transform matrix by checking whether M . M^T == I (where M is the matrix in question and I is the identity).

Returns → bool:

no description available

has_scale(self)

Test for a scale component in each transform matrix by checking whether M . M^T == I (where M is the matrix in question and I is the identity).

Returns → bool:

no description available

inverse(self)

Compute the inverse of this transformation (involves just shuffles, no arithmetic)

Returns → mitsuba.core.Transform4f:

no description available

look_at(origin, target, up)

Create a look-at camera transformation

Parameter origin (enoki.scalar.Vector3f):

Camera position

Parameter target (enoki.scalar.Vector3f):

Target vector

Parameter up (enoki.scalar.Vector3f):

Up vector

Returns → mitsuba.core.Transform4f:

no description available

orthographic(near, far)

Create an orthographic transformation, which maps Z to [0,1] and leaves the X and Y coordinates untouched.

Parameter near (float):

Near clipping plane

Parameter far (float):

Far clipping plane

Returns → mitsuba.core.Transform4f:

no description available

perspective(fov, near, far)

Create a perspective transformation. (Maps [near, far] to [0, 1])

Projects vectors in camera space onto a plane at z=1:

x_proj = x / z y_proj = y / z z_proj = (far * (z - near)) / (z * (far- near))

Camera-space depths are not mapped linearly!

Parameter fov (float):

Field of view in degrees

Parameter near (float):

Near clipping plane

Parameter far (float):

Far clipping plane

Returns → mitsuba.core.Transform4f:

no description available

rotate(axis, angle)

Create a rotation transformation around an arbitrary axis in 3D. The angle is specified in degrees

Parameter axis (enoki.scalar.Vector3f):

no description available

Parameter angle (float):

no description available

Returns → mitsuba.core.Transform4f:

no description available

scale(v)

Create a scale transformation

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → mitsuba.core.Transform4f:

no description available

to_frame(frame)

Creates a transformation that converts from the standard basis to ‘frame’

Parameter frame (mitsuba.core.Frame3f):

no description available

Returns → mitsuba.core.Transform4f:

no description available

transform_normal(self, arg0)
Parameter arg0 (enoki.scalar.Vector3f):

no description available

Returns → enoki.scalar.Vector3f:

no description available

transform_point(self, arg0)
Parameter arg0 (enoki.scalar.Vector3f):

no description available

Returns → enoki.scalar.Vector3f:

no description available

transform_vector(self, arg0)
Parameter arg0 (enoki.scalar.Vector3f):

no description available

Returns → enoki.scalar.Vector3f:

no description available

translate(v)

Create a translation transformation

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → mitsuba.core.Transform4f:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → mitsuba.core.Transform4f:

no description available


class mitsuba.core.AnimatedTransform

Base class: mitsuba.core.Object

Encapsulates an animated 4x4 homogeneous coordinate transformation

The animation is stored as keyframe animation with linear segments. The implementation performs a polar decomposition of each keyframe into a 3x3 scale/shear matrix, a rotation quaternion, and a translation vector. These will all be interpolated independently at eval time.

__init__(self)
__init__(self, arg0)
Parameter arg0 (mitsuba.core.Transform4f):

no description available

append(overloaded)
append(self, arg0, arg1)

Append a keyframe to the current animated transform

Parameter arg0 (float):

no description available

Parameter arg1 (mitsuba.core.Transform4f):

no description available

append(self, arg0)
Parameter arg0 (mitsuba.core.AnimatedTransform.Keyframe):

no description available

eval(self, time, unused=True)

Compatibility wrapper, which strips the mask argument and invokes eval()

Parameter time (float):

no description available

Parameter unused (bool):

no description available

Returns → mitsuba.core.Transform4f:

no description available

has_scale(self)

Determine whether the transformation involves any kind of scaling

Returns → bool:

no description available

size(self)

Return the number of keyframes

Returns → int:

no description available

translation_bounds(self)

Return an axis-aligned box bounding the amount of translation throughout the animation sequence

Returns → mitsuba.core.BoundingBox3f:

no description available


Other

class mitsuba.core.ArgParser

Minimal command line argument parser

This class provides a minimal cross-platform command line argument parser in the spirit of to GNU getopt. Both short and long arguments that accept an optional extra value are supported.

The typical usage is

ArgParser p;
auto arg0 = p.register("--myParameter");
auto arg1 = p.register("-f", true);
p.parse(argc, argv);
if (*arg0)
    std::cout << "Got --myParameter" << std::endl;
if (*arg1)
    std::cout << "Got -f " << arg1->value() << std::endl;
__init__(self)
add(overloaded)
add(self, prefix, extra=False)

Register a new argument with the given list of prefixes

Parameter prefixes (List[str]):

A list of command prefixes (i.e. {“-f”, “–fast”})

Parameter extra (bool):

Indicates whether the argument accepts an extra argument value

Parameter prefix (str):

no description available

Returns → mitsuba.core.ArgParser.Arg:

no description available

add(self, prefixes, extra=False)

Register a new argument with the given prefix

Parameter prefix:

A single command prefix (i.e. “-f”)

Parameter extra (bool):

Indicates whether the argument accepts an extra argument value

Returns → mitsuba.core.ArgParser.Arg:

no description available

executable_name(self)
Returns → str:

no description available

parse(self, arg0)

Parse the given set of command line arguments

Parameter arg0 (List[str]):

no description available

Returns → None:

no description available


class mitsuba.core.AtomicFloat

Atomic floating point data type

The class implements an an atomic floating point data type (which is not possible with the existing overloads provided by std::atomic). It internally casts floating point values to an integer storage format and uses atomic integer compare and exchange operations to perform changes.

__init__(self, arg0)

Initialize the AtomicFloat with a given floating point value

Parameter arg0 (float):

no description available


class mitsuba.core.Class

Stores meta-information about Object instances.

This class provides a thin layer of RTTI (run-time type information), which is useful for doing things like:

  • Checking if an object derives from a certain class

  • Determining the parent of a class at runtime

  • Instantiating a class by name

  • Unserializing a class from a binary data stream

See also:

ref, Object

alias(self)

Return the scene description-specific alias, if applicable

Returns → str:

no description available

name(self)

Return the name of the class

Returns → str:

no description available

parent(self)

Return the Class object associated with the parent class of nullptr if it does not have one.

Returns → mitsuba.core.Class:

no description available

variant(self)

Return the variant of the class

Returns → str:

no description available


mitsuba.core.DEBUG: bool = False

class mitsuba.core.DefaultFormatter

Base class: mitsuba.core.Formatter

The default formatter used to turn log messages into a human-readable form

__init__(self)
has_class(self)
See also:

set_has_class

Returns → bool:

no description available

has_date(self)
See also:

set_has_date

Returns → bool:

no description available

has_log_level(self)
See also:

set_has_log_level

Returns → bool:

no description available

has_thread(self)
See also:

set_has_thread

Returns → bool:

no description available

set_has_class(self, arg0)

Should class information be included? The default is yes.

Parameter arg0 (bool):

no description available

Returns → None:

no description available

set_has_date(self, arg0)

Should date information be included? The default is yes.

Parameter arg0 (bool):

no description available

Returns → None:

no description available

set_has_log_level(self, arg0)

Should log level information be included? The default is yes.

Parameter arg0 (bool):

no description available

Returns → None:

no description available

set_has_thread(self, arg0)

Should thread information be included? The default is yes.

Parameter arg0 (bool):

no description available

Returns → None:

no description available


class mitsuba.core.DummyStream

Base class: mitsuba.core.Stream

Stream implementation that never writes to disk, but keeps track of the size of the content being written. It can be used, for example, to measure the precise amount of memory needed to store serialized content.

__init__(self)

class mitsuba.core.FileResolver

Base class: mitsuba.core.Object

Simple class for resolving paths on Linux/Windows/Mac OS

This convenience class looks for a file or directory given its name and a set of search paths. The implementation walks through the search paths in order and stops once the file is found.

__init__(self)

Initialize a new file resolver with the current working directory

__init__(self, arg0)

Copy constructor

Parameter arg0 (mitsuba.core.FileResolver):

no description available

append(self, arg0)

Append an entry to the end of the list of search paths

Parameter arg0 (mitsuba.core.filesystem.path):

no description available

Returns → None:

no description available

clear(self)

Clear the list of search paths

Returns → None:

no description available

prepend(self, arg0)

Prepend an entry at the beginning of the list of search paths

Parameter arg0 (mitsuba.core.filesystem.path):

no description available

Returns → None:

no description available

resolve(self, arg0)

Walk through the list of search paths and try to resolve the input path

Parameter arg0 (mitsuba.core.filesystem.path):

no description available

Returns → mitsuba.core.filesystem.path:

no description available


class mitsuba.core.FileStream

Base class: mitsuba.core.Stream

Simple Stream implementation backed-up by a file.

The underlying file abstraction is std::fstream, and so most operations can be expected to behave similarly.

__init__(self, p, mode=EMode.ERead)

Constructs a new FileStream by opening the file pointed by p.

The file is opened in read-only or read/write mode as specified by mode.

Throws if trying to open a non-existing file in with write disabled. Throws an exception if the file cannot be opened / created.

Parameter p (mitsuba.core.filesystem.path):

no description available

Parameter mode (mitsuba.core.FileStream.EMode):

no description available

class EMode

Members:

ERead

Opens a file in (binary) read-only mode

EReadWrite

Opens (but never creates) a file in (binary) read-write mode

ETruncReadWrite

Opens (and truncates) a file in (binary) read-write mode

__init__(self, arg0)
Parameter arg0 (int):

no description available

path(self)

Return the path descriptor associated with this FileStream

Returns → mitsuba.core.filesystem.path:

no description available


class mitsuba.core.FilterBoundaryCondition

When resampling data to a different resolution using Resampler::resample(), this enumeration specifies how lookups outside of the input domain are handled.

See also:

Resampler

Members:

Clamp

Clamp to the outermost sample position (default)

Repeat

Assume that the input repeats in a periodic fashion

Mirror

Assume that the input is mirrored along the boundary

Zero

Assume that the input function is zero outside of the defined domain

One

Assume that the input function is equal to one outside of the defined domain

__init__(self, arg0)
Parameter arg0 (int):

no description available


class mitsuba.core.Formatter

Base class: mitsuba.core.Object

Abstract interface for converting log information into a human- readable format

__init__(self)
format(self, level, theClass, thread, file, line, msg)

Turn a log message into a human-readable format

Parameter level (mitsuba.core.LogLevel):

The importance of the debug message

Parameter class_:

Originating class or nullptr

Parameter thread (mitsuba::Thread):

Thread, which is reponsible for creating the message

Parameter file (str):

File, which is responsible for creating the message

Parameter line (int):

Associated line within the source file

Parameter msg (str):

Text content associated with the log message

Parameter theClass (mitsuba.core.Class):

no description available

Returns → str:

no description available


class mitsuba.core.Frame3f

Stores a three-dimensional orthonormal coordinate frame

This class is used to convert between different cartesian coordinate systems and to efficiently evaluate trigonometric functions in a spherical coordinate system whose pole is aligned with the n axis (e.g. cos_theta(), sin_phi(), etc.).

__init__(self)

Construct a new coordinate frame from a single vector

__init__(self, arg0)

Copy constructor

Parameter arg0 (mitsuba.core.Frame3f):

no description available

__init__(self, arg0, arg1, arg2)
Parameter arg0 (enoki.scalar.Vector3f):

no description available

Parameter arg1 (enoki.scalar.Vector3f):

no description available

Parameter arg2 (enoki.scalar.Vector3f):

no description available

__init__(self, arg0)
Parameter arg0 (enoki.scalar.Vector3f):

no description available

cos_phi(v)

Give a unit direction, this function returns the cosine of the azimuth in a reference spherical coordinate system (see the Frame description)

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → float:

no description available

cos_phi_2(v)

Give a unit direction, this function returns the squared cosine of the azimuth in a reference spherical coordinate system (see the Frame description)

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → float:

no description available

cos_theta(v)

Give a unit direction, this function returns the cosine of the elevation angle in a reference spherical coordinate system (see the Frame description)

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → float:

no description available

cos_theta_2(v)

Give a unit direction, this function returns the square cosine of the elevation angle in a reference spherical coordinate system (see the Frame description)

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → float:

no description available

sin_phi(v)

Give a unit direction, this function returns the sine of the azimuth in a reference spherical coordinate system (see the Frame description)

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → float:

no description available

sin_phi_2(v)

Give a unit direction, this function returns the squared sine of the azimuth in a reference spherical coordinate system (see the Frame description)

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → float:

no description available

sin_theta(v)

Give a unit direction, this function returns the sine of the elevation angle in a reference spherical coordinate system (see the Frame description)

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → float:

no description available

sin_theta_2(v)

Give a unit direction, this function returns the square sine of the elevation angle in a reference spherical coordinate system (see the Frame description)

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → float:

no description available

sincos_phi(v)

Give a unit direction, this function returns the sine and cosine of the azimuth in a reference spherical coordinate system (see the Frame description)

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → Tuple[float, float]:

no description available

sincos_phi_2(v)

Give a unit direction, this function returns the squared sine and cosine of the azimuth in a reference spherical coordinate system (see the Frame description)

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → Tuple[float, float]:

no description available

tan_theta(v)

Give a unit direction, this function returns the tangent of the elevation angle in a reference spherical coordinate system (see the Frame description)

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → float:

no description available

tan_theta_2(v)

Give a unit direction, this function returns the square tangent of the elevation angle in a reference spherical coordinate system (see the Frame description)

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → float:

no description available

to_local(self, v)

Convert from world coordinates to local coordinates

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → enoki.scalar.Vector3f:

no description available

to_world(self, v)

Convert from local coordinates to world coordinates

Parameter v (enoki.scalar.Vector3f):

no description available

Returns → enoki.scalar.Vector3f:

no description available

zero(size=1)
Parameter size (int):

no description available

Returns → mitsuba.core.Frame3f:

no description available


mitsuba.core.Log(level, msg)
Parameter level (mitsuba.core.LogLevel):

no description available

Parameter msg (str):

no description available

Returns → None:

no description available


mitsuba.core.MTS_AUTHORS: str = Realistic Graphics Lab, EPFL

mitsuba.core.MTS_ENABLE_EMBREE: bool = False

mitsuba.core.MTS_ENABLE_OPTIX: bool = True

mitsuba.core.MTS_FILTER_RESOLUTION: int = 31

mitsuba.core.MTS_VERSION: str = 2.0.0

mitsuba.core.MTS_VERSION_MAJOR: int = 2

mitsuba.core.MTS_VERSION_MINOR: int = 0

mitsuba.core.MTS_VERSION_PATCH: int = 0

mitsuba.core.MTS_YEAR: str = 2019

class mitsuba.core.MemoryMappedFile

Base class: mitsuba.core.Object

Basic cross-platform abstraction for memory mapped files

Remark:

The Python API has one additional constructor <tt>MemoryMappedFile(filename, array)<tt>, which creates a new file, maps it into memory, and copies the array contents.

__init__(self, filename, size)

Create a new memory-mapped file of the specified size

Parameter filename (mitsuba.core.filesystem.path):

no description available

Parameter size (int):

no description available

__init__(self, filename, write=False)

Map the specified file into memory

Parameter filename (mitsuba.core.filesystem.path):

no description available

Parameter write (bool):

no description available

__init__(self, filename, array)
Parameter filename (mitsuba.core.filesystem.path):

no description available

Parameter array (array):

no description available

can_write(self)

Return whether the mapped memory region can be modified

Returns → bool:

no description available

create_temporary(arg0)

Create a temporary memory-mapped file

Remark:

When closing the mapping, the file is automatically deleted. Mitsuba additionally informs the OS that any outstanding changes that haven’t yet been written to disk can be discarded (Linux/OSX only).

Parameter arg0 (int):

no description available

Returns → mitsuba.core.MemoryMappedFile:

no description available

data(self)

Return a pointer to the file contents in memory

Returns → capsule:

no description available

filename(self)

Return the associated filename

Returns → mitsuba.core.filesystem.path:

no description available

resize(self, arg0)

Resize the memory-mapped file

This involves remapping the file, which will generally change the pointer obtained via data()

Parameter arg0 (int):

no description available

Returns → None:

no description available

size(self)

Return the size of the mapped region

Returns → int:

no description available


class mitsuba.core.MemoryStream

Base class: mitsuba.core.Stream

Simple memory buffer-based stream with automatic memory management. It always has read & write capabilities.

The underlying memory storage of this implementation dynamically expands as data is written to the stream, à la std::vector.

__init__(self, capacity=512)

Creates a new memory stream, initializing the memory buffer with a capacity of capacity bytes. For best performance, set this argument to the estimated size of the content that will be written to the stream.

Parameter capacity (int):

no description available

capacity(self)

Return the current capacity of the underlying memory buffer

Returns → int:

no description available

owns_buffer(self)

Return whether or not the memory stream owns the underlying buffer

Returns → bool:

no description available


class mitsuba.core.PCG32

PCG32 pseudorandom number generator proposed by Melissa O’Neill

__init__(self, initstate=9600629759793949339, initseq=15726070495360670683)

Initialize the pseudorandom number generator with the seed() function

Parameter initstate (int):

no description available

Parameter initseq (int):

no description available

advance(self, arg0)

Multi-step advance function (jump-ahead, jump-back)

The method used here is based on Brown, “Random Number Generation with Arbitrary Stride”, Transactions of the American Nuclear Society (Nov. 1994). The algorithm is very similar to fast exponentiation.

Parameter arg0 (int):

no description available

Returns → None:

no description available

next_float32(overloaded)
next_float32(self)

Generate a single precision floating point value on the interval [0, 1)

Returns → float:

no description available

next_float32(self, mask)

Masked version of next_float32

Parameter mask (bool):

no description available

Returns → float:

no description available

next_uint32(overloaded)
next_uint32(self)

Generate a uniformly distributed unsigned 32-bit random number

Returns → int:

no description available

next_uint32(self, mask)

Masked version of next_uint32

Parameter mask (bool):

no description available

Returns → int:

no description available

next_uint32_bounded(overloaded)
next_uint32_bounded(self, bound)

Generate a uniformly distributed integer r, where 0 <= r < bound

Parameter bound (int):

no description available

Returns → int:

no description available

next_uint32_bounded(self, bound, mask)
Parameter bound (int):

no description available

Parameter mask (bool):

no description available

Returns → int:

no description available

next_uint64(overloaded)
next_uint64(self)

Generate a uniformly distributed unsigned 64-bit random number

Returns → int:

no description available

next_uint64(self, mask)

Masked version of next_uint64

Parameter mask (bool):

no description available

Returns → int:

no description available

next_uint64_bounded(overloaded)
next_uint64_bounded(self, bound)

Generate a uniformly distributed integer r, where 0 <= r < bound

Parameter bound (int):

no description available

Returns → int:

no description available

next_uint64_bounded(self, bound, mask)
Parameter bound (int):

no description available

Parameter mask (bool):

no description available

Returns → int:

no description available

seed(self, initstate=9600629759793949339, initseq=15726070495360670683)

Seed the pseudorandom number generator

Specified in two parts: a state initializer and a sequence selection constant (a.k.a. stream id)

Parameter initstate (int):

no description available

Parameter initseq (int):

no description available

Returns → None:

no description available


class mitsuba.core.PluginManager

The object factory is responsible for loading plugin modules and instantiating object instances.

Ordinarily, this class will be used by making repeated calls to the create_object() methods. The generated instances are then assembled into a final object graph, such as a scene. One such examples is the SceneHandler class, which parses an XML scene file by essentially translating the XML elements into calls to create_object().

get_plugin_class(self, name, variant)

Return the class corresponding to a plugin for a specific variant

Parameter name (str):

no description available

Parameter variant (str):

no description available

Returns → mitsuba.core.Class:

no description available

instance()

Return the global plugin manager

Returns → mitsuba.core.PluginManager:

no description available


class mitsuba.core.RadicalInverse

Base class: mitsuba.core.Object

Efficient implementation of a radical inverse function with prime bases including scrambled versions.

This class is used to implement Halton and Hammersley sequences for QMC integration in Mitsuba.

__init__(self, max_base=8161, scramble=- 1)
Parameter max_base (int):

no description available

Parameter scramble (int):

no description available

base(self, arg0)

Returns the n-th prime base used by the sequence

These prime numbers are used as bases in the radical inverse function implementation.

Parameter arg0 (int):

no description available

Returns → int:

no description available

bases(self)

Return the number of prime bases for which precomputed tables are available

Returns → int:

no description available

eval(self, base_index, index)

Calculate the radical inverse function

This function is used as a building block to construct Halton and Hammersley sequences. Roughly, it computes a b-ary representation of the input value index, mirrors it along the decimal point, and returns the resulting fractional value. The implementation here uses prime numbers for b.

Parameter base_index (int):

Selects the n-th prime that is used as a base when computing the radical inverse function (0 corresponds to 2, 1->3, 2->5, etc.). The value specified here must be between 0 and 1023.

Parameter index (int):

Denotes the index that should be mapped through the radical inverse function

Returns → float:

no description available

eval_scrambled(self, base_index, index)

Calculate a scrambled radical inverse function

This function is used as a building block to construct permuted Halton and Hammersley sequence variants. It works like the normal radical inverse function eval(), except that every digit is run through an extra scrambling permutation.

Parameter base_index (int):

no description available

Parameter index (int):

no description available

Returns → float:

no description available

inverse_permutation(self, arg0)

Return the inverse permutation corresponding to the given prime number basis

Parameter arg0 (int):

no description available

Returns → int:

no description available

permutation(self, arg0)

Return the permutation corresponding to the given prime number basis

Parameter arg0 (int):

no description available

Returns → numpy.ndarray[uint16]:

no description available

scramble(self)

Return the original scramble value

Returns → int:

no description available


class mitsuba.core.Ray3f

Simple n-dimensional ray segment data structure

Along with the ray origin and direction, this data structure additionally stores a ray segment [mint, maxt] (whose entries may include positive/negative infinity), as well as the componentwise reciprocals of the ray direction. That is just done for convenience, as these values are frequently required.

Remark:

Important: be careful when changing the ray direction. You must call update() to compute the componentwise reciprocals as well, or Mitsuba’s ray-object intersection code may produce undefined results.

__init__(self)

Create an unitialized ray

__init__(self, other)

Copy constructor

Parameter other (mitsuba.core.Ray3f):

no description available

__init__(self, o, d, time, wavelengths)
Parameter o (enoki.scalar.Vector3f):

no description available

Parameter d (enoki.scalar.Vector3f):

no description available

Parameter time (float):

no description available

Parameter wavelengths (enoki.scalar.Vector0f):

no description available

__init__(self, o, d, mint, maxt, time, wavelengths)
Parameter o (enoki.scalar.Vector3f):

no description available

Parameter d (enoki.scalar.Vector3f):

no description available

Parameter mint (float):

no description available

Parameter maxt (float):

no description available

Parameter time (float):

no description available

Parameter wavelengths (enoki.scalar.Vector0f):

no description available

__init__(self, other, mint, maxt)
Parameter other (mitsuba.core.Ray3f):

no description available

Parameter mint (float):

no description available

Parameter maxt (float):

no description available

property d

< Ray direction

property d_rcp

< Componentwise reciprocals of the ray direction

property maxt

< Maximum position on the ray segment

property mint

< Minimum position on the ray segment

property o

< Ray origin

property time

< Time value associated with this ray

update(self)

Update the reciprocal ray directions after changing ‘d’

Returns → None:

no description available

property wavelengths

< Wavelength packet associated with the ray

zero(size=1)
Parameter size (int):

no description available

Returns → mitsuba.core.Ray3f:

no description available


class mitsuba.core.RayDifferential3f

Base class: mitsuba.core.Ray3f

Ray differential – enhances the basic ray class with offset rays for two adjacent pixels on the view plane

__init__(self, ray)
Parameter ray (mitsuba.core.Ray3f):

no description available

__init__(self, o, d, time, wavelengths)

Initialize without differentials.

Parameter o (enoki.scalar.Vector3f):

no description available

Parameter d (enoki.scalar.Vector3f):

no description available

Parameter time (float):

no description available

Parameter wavelengths (enoki.scalar.Vector0f):

no description available

scale_differential(self, amount)
Parameter amount (float):

no description available

Returns → None:

no description available


class mitsuba.core.ReconstructionFilter

Base class: mitsuba.core.Object

Generic interface to separable image reconstruction filters

When resampling bitmaps or adding samples to a rendering in progress, Mitsuba first convolves them with a image reconstruction filter. Various kinds are implemented as subclasses of this interface.

Because image filters are generally too expensive to evaluate for each sample, the implementation of this class internally precomputes an discrete representation, whose resolution given by MTS_FILTER_RESOLUTION.

border_size(self)

Return the block border size required when rendering with this filter

Returns → int:

no description available

eval(self, x, active=True)

Evaluate the filter function

Parameter x (float):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

eval_discretized(self, x, active=True)

Evaluate a discretized version of the filter (generally faster than ‘eval’)

Parameter x (float):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → float:

no description available

radius(self)

Return the filter’s width

Returns → float:

no description available


class mitsuba.core.Resampler

Utility class for efficiently resampling discrete datasets to different resolutions

Template parameter Scalar:

Denotes the underlying floating point data type (i.e. half, float, or double)

__init__(self, rfilter, source_res, target_res)

Create a new Resampler object that transforms between the specified resolutions

This constructor precomputes all information needed to efficiently perform the desired resampling operation. For that reason, it is most efficient if it can be used over and over again (e.g. to resample the equal-sized rows of a bitmap)

Parameter source_res (int):

Source resolution

Parameter target_res (int):

Desired target resolution

Parameter rfilter (mitsuba.render.ReconstructionFilter):

no description available

boundary_condition(self)

Return the boundary condition that should be used when looking up samples outside of the defined input domain

Returns → mitsuba.core.FilterBoundaryCondition:

no description available

clamp(self)

Returns the range to which resampled values will be clamped

The default is -infinity to infinity (i.e. no clamping is used)

Returns → Tuple[float, float]:

no description available

mitsuba.core.Resampler.resample(self, self, source, source_stride, target_stride, channels)

Resample a multi-channel array and clamp the results to a specified valid range

Parameter source (int):

Source array of samples

Parameter target:

Target array of samples

Parameter source_stride (array):

Stride of samples in the source array. A value of ‘1’ implies that they are densely packed.

Parameter target_stride (int):

Stride of samples in the source array. A value of ‘1’ implies that they are densely packed.

Parameter channels (int):

Number of channels to be resampled

Returns → None:

no description available

set_boundary_condition(self, arg0)

Set the boundary condition that should be used when looking up samples outside of the defined input domain

The default is FilterBoundaryCondition::Clamp

Parameter arg0 (mitsuba.core.FilterBoundaryCondition):

no description available

Returns → None:

no description available

set_clamp(self, arg0)

If specified, resampled values will be clamped to the given range

Parameter arg0 (Tuple[float, float]):

no description available

Returns → None:

no description available

source_resolution(self)

Return the reconstruction filter’s source resolution

Returns → int:

no description available

taps(self)

Return the number of taps used by the reconstruction filter

Returns → int:

no description available

target_resolution(self)

Return the reconstruction filter’s target resolution

Returns → int:

no description available


class mitsuba.core.ScopedSetThreadEnvironment

RAII-style class to temporarily switch to another thread’s logger/file resolver

__init__(self, arg0)
Parameter arg0 (mitsuba.core.ThreadEnvironment):

no description available


class mitsuba.core.Stream

Base class: mitsuba.core.Object

Abstract seekable stream class

Specifies all functions to be implemented by stream subclasses and provides various convenience functions layered on top of on them.

All read**X**() and write**X**() methods support transparent conversion based on the endianness of the underlying system and the value passed to set_byte_order(). Whenever host_byte_order() and byte_order() disagree, the endianness is swapped.

See also:

FileStream, MemoryStream, DummyStream

class EByteOrder

Defines the byte order (endianness) to use in this Stream

Members:

EBigEndian

< PowerPC, SPARC, Motorola 68K

ELittleEndian

< x86, x86_64

ENetworkByteOrder

< Network byte order (an alias for big endian)

__init__(self, arg0)
Parameter arg0 (int):

no description available

byte_order(self)

Returns the byte order of this stream.

Returns → mitsuba.core.Stream.EByteOrder:

no description available

can_read(self)

Can we read from the stream?

Returns → bool:

no description available

can_write(self)

Can we write to the stream?

Returns → bool:

no description available

close(self)

Closes the stream.

No further read or write operations are permitted.

This function is idempotent. It may be called automatically by the destructor.

Returns → None:

no description available

flush(self)

Flushes the stream’s buffers, if any

Returns → None:

no description available

host_byte_order()

Returns the byte order of the underlying machine.

Returns → mitsuba.core.Stream.EByteOrder:

no description available

read(self, arg0)

Writes a specified amount of data into the stream. note This does not handle endianness swapping.

Throws an exception when not all data could be written. Implementations need to handle endianness swap when appropriate.

Parameter arg0 (int):

no description available

Returns → bytes:

no description available

read_bool(self)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Returns → object:

no description available

read_double(self)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Returns → object:

no description available

read_float(self)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Returns → object:

no description available

read_int16(self)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Returns → object:

no description available

read_int32(self)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Returns → object:

no description available

read_int64(self)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Returns → object:

no description available

read_int8(self)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Returns → object:

no description available

read_line(self)

Convenience function for reading a line of text from an ASCII file

Returns → str:

no description available

read_single(self)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Returns → object:

no description available

read_string(self)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Returns → object:

no description available

read_uint16(self)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Returns → object:

no description available

read_uint32(self)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Returns → object:

no description available

read_uint64(self)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Returns → object:

no description available

read_uint8(self)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Returns → object:

no description available

seek(self, arg0)

Seeks to a position inside the stream.

Seeking beyond the size of the buffer will not modify the length of its contents. However, a subsequent write should start at the seeked position and update the size appropriately.

Parameter arg0 (int):

no description available

Returns → None:

no description available

set_byte_order(self, arg0)

Sets the byte order to use in this stream.

Automatic conversion will be performed on read and write operations to match the system’s native endianness.

No consistency is guaranteed if this method is called after performing some read and write operations on the system using a different endianness.

Parameter arg0 (mitsuba.core.Stream.EByteOrder):

no description available

Returns → None:

no description available

size(self)

Returns the size of the stream

Returns → int:

no description available

skip(self, arg0)

Skip ahead by a given number of bytes

Parameter arg0 (int):

no description available

Returns → None:

no description available

tell(self)

Gets the current position inside the stream

Returns → int:

no description available

truncate(self, arg0)

Truncates the stream to a given size.

The position is updated to min(old_position, size). Throws an exception if in read-only mode.

Parameter arg0 (int):

no description available

Returns → None:

no description available

write(self, arg0)

Writes a specified amount of data into the stream. note This does not handle endianness swapping.

Throws an exception when not all data could be written. Implementations need to handle endianness swap when appropriate.

Parameter arg0 (bytes):

no description available

Returns → None:

no description available

write_bool(self, arg0)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Parameter arg0 (bool):

no description available

Returns → object:

no description available

write_double(self, arg0)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Parameter arg0 (float):

no description available

Returns → object:

no description available

write_float(self, arg0)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Parameter arg0 (float):

no description available

Returns → object:

no description available

write_int16(self, arg0)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Parameter arg0 (int):

no description available

Returns → object:

no description available

write_int32(self, arg0)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Parameter arg0 (int):

no description available

Returns → object:

no description available

write_int64(self, arg0)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Parameter arg0 (int):

no description available

Returns → object:

no description available

write_int8(self, arg0)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Parameter arg0 (int):

no description available

Returns → object:

no description available

write_line(self, arg0)

Convenience function for writing a line of text to an ASCII file

Parameter arg0 (str):

no description available

Returns → None:

no description available

write_single(self, arg0)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Parameter arg0 (float):

no description available

Returns → object:

no description available

write_string(self, arg0)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Parameter arg0 (str):

no description available

Returns → object:

no description available

write_uint16(self, arg0)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Parameter arg0 (int):

no description available

Returns → object:

no description available

write_uint32(self, arg0)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Parameter arg0 (int):

no description available

Returns → object:

no description available

write_uint64(self, arg0)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Parameter arg0 (int):

no description available

Returns → object:

no description available

write_uint8(self, arg0)

Reads one object of type T from the stream at the current position by delegating to the appropriate serialization_helper.

Endianness swapping is handled automatically if needed.

Parameter arg0 (int):

no description available

Returns → object:

no description available


class mitsuba.core.StreamAppender

Base class: mitsuba.core.Appender

%Appender implementation, which writes to an arbitrary C++ output stream

__init__(self, arg0)

Create a new stream appender

Remark:

This constructor is not exposed in the Python bindings

Parameter arg0 (str):

no description available

logs_to_file(self)

Does this appender log to a file

Returns → bool:

no description available

read_log(self)

Return the contents of the log file as a string

Returns → str:

no description available


class mitsuba.core.Struct

Base class: mitsuba.core.Object

Descriptor for specifying the contents and in-memory layout of a POD- style data record

Remark:

The python API provides an additional dtype() method, which returns the NumPy dtype equivalent of a given Struct instance.

__init__(self, pack=False, byte_order=ByteOrder.HostByteOrder)

Create a new Struct and indicate whether the contents are packed or aligned

Parameter pack (bool):

no description available

Parameter byte_order (mitsuba.core.Struct.ByteOrder):

no description available

class ByteOrder

Members:

LittleEndian :

BigEndian :

HostByteOrder :

__init__(self, arg0)
Parameter arg0 (int):

no description available

class Field

Field specifier with size and offset

property Field.blend

For use with StructConverter::convert()

Specifies a pair of weights and source field names that will be linearly blended to obtain the output field value. Note that this only works for floating point fields or integer fields with the Flags::Normalized flag. Gamma-corrected fields will be blended in linear space.

property Field.flags

Additional flags

Field.is_float(self)
Returns → bool:

no description available

Field.is_integer(self)
Returns → bool:

no description available

Field.is_signed(self)
Returns → bool:

no description available

Field.is_unsigned(self)
Returns → bool:

no description available

property Field.name

Name of the field

property Field.offset

Offset within the Struct (in bytes)

Field.range(self)
Returns → Tuple[float, float]:

no description available

property Field.size

Size in bytes

property Field.type

Type identifier

class Flags

Members:

Normalized

Specifies whether an integer field encodes a normalized value in the range [0, 1]. The flag is ignored if specified for floating point valued fields.

Gamma

Specifies whether the field encodes a sRGB gamma-corrected value. Assumes Normalized is also specified.

Weight

In FieldConverter::convert, when an input structure contains a weight field, the value of all entries are considered to be expressed relative to its value. Converting to an un-weighted structure entails a division by the weight.

Assert

In FieldConverter::convert, check that the field value matches the specified default value. Otherwise, return a failure

Alpha

Specifies whether the field encodes an alpha value

PremultipliedAlpha

Specifies whether the field encodes an alpha premultiplied value

Default

In FieldConverter::convert, when the field is missing in the source record, replace it by the specified default value

__init__(self, arg0)
Parameter arg0 (int):

no description available

class Type

Members:

Int8 :

UInt8 :

Int16 :

UInt16 :

Int32 :

UInt32 :

Int64 :

UInt64 :

Float16 :

Float32 :

Float64 :

Invalid :

__init__(self, arg0)
Parameter arg0 (int):

no description available

__init__(self, dtype)
Parameter dtype (dtype):

no description available

alignment(self)

Return the alignment (in bytes) of the data structure

Returns → int:

no description available

append(self, name, type, flags=Flags.???, default=0.0)

Append a new field to the Struct; determines size and offset automatically

Parameter name (str):

no description available

Parameter type (mitsuba.core.Struct.Type):

no description available

Parameter flags (int):

no description available

Parameter default (float):

no description available

Returns → mitsuba.core.Struct:

no description available

byte_order(self)

Return the byte order of the Struct

Returns → mitsuba.core.Struct.ByteOrder:

no description available

dtype(self)

Return a NumPy dtype corresponding to this data structure

Returns → dtype:

no description available

field(self, arg0)

Look up a field by name (throws an exception if not found)

Parameter arg0 (str):

no description available

Returns → mitsuba.core.Struct.Field:

no description available

field_count(self)

Return the number of fields

Returns → int:

no description available

has_field(self, arg0)

Check if the Struct has a field of the specified name

Parameter arg0 (str):

no description available

Returns → bool:

no description available

is_float(arg0)

Check whether the given type is a floating point type

Parameter arg0 (mitsuba.core.Struct.Type):

no description available

Returns → bool:

no description available

is_integer(arg0)

Check whether the given type is an integer type

Parameter arg0 (mitsuba.core.Struct.Type):

no description available

Returns → bool:

no description available

is_signed(arg0)

Check whether the given type is a signed type

Parameter arg0 (mitsuba.core.Struct.Type):

no description available

Returns → bool:

no description available

is_unsigned(arg0)

Check whether the given type is an unsigned type

Parameter arg0 (mitsuba.core.Struct.Type):

no description available

Returns → bool:

no description available

range(arg0)

Return the representable range of the given type

Parameter arg0 (mitsuba.core.Struct.Type):

no description available

Returns → Tuple[float, float]:

no description available

size(self)

Return the size (in bytes) of the data structure, including padding

Returns → int:

no description available


class mitsuba.core.StructConverter

Base class: mitsuba.core.Object

This class solves the any-to-any problem: effiently converting from one kind of structured data representation to another

Graphics applications often need to convert from one kind of structured representation to another, for instance when loading/saving image or mesh data. Consider the following data records which both describe positions tagged with color data.

struct Source { // <-- Big endian! :(
   uint8_t r, g, b; // in sRGB
   half x, y, z;
};

struct Target { // <-- Little endian!
   float x, y, z;
   float r, g, b, a; // in linear space
};

The record Source may represent what is stored in a file on disk, while Target represents the expected input of the implementation. Not only are the formats (e.g. float vs half or uint8_t, incompatible endianness) and encodings different (e.g. gamma correction vs linear space), but the second record even has a different order and extra fields that don’t exist in the first one.

This class provides a routine convert() which <ol>

  • reorders entries

  • converts between many different formats (u[int]8-64, float16-64)

  • performs endianness conversion

  • applies or removes gamma correction

  • optionally checks that certain entries have expected default values

  • substitutes missing values with specified defaults

  • performs linear transformations of groups of fields (e.g. between

different RGB color spaces)

  • applies dithering to avoid banding artifacts when converting 2D

images

</ol>

The above operations can be arranged in countless ways, which makes it hard to provide an efficient generic implementation of this functionality. For this reason, the implementation of this class relies on a JIT compiler that generates fast conversion code on demand for each specific conversion. The function is cached and reused in case the same conversion is needed later on. Note that JIT compilation only works on x86_64 processors; other platforms use a slow generic fallback implementation.

__init__(self, source, target, dither=False)
Parameter source (mitsuba.core.Struct):

no description available

Parameter target (mitsuba.core.Struct):

no description available

Parameter dither (bool):

no description available

convert(self, arg0)
Parameter arg0 (bytes):

no description available

Returns → bytes:

no description available

source(self)

Return the source Struct descriptor

Returns → mitsuba.core.Struct:

no description available

target(self)

Return the target Struct descriptor

Returns → mitsuba.core.Struct:

no description available


class mitsuba.core.Thread

Base class: mitsuba.core.Object

Cross-platform thread implementation

Mitsuba threads are internally implemented via the std::thread class defined in C++11. This wrapper class is needed to attach additional state (Loggers, Path resolvers, etc.) that is inherited when a thread launches another thread.

__init__(self, name)
Parameter name (str):

no description available

class EPriority

Possible priority values for Thread::set_priority()

Members:

EIdlePriority
ELowestPriority
ELowPriority
ENormalPriority
EHighPriority
EHighestPriority
ERealtimePriority
__init__(self, arg0)
Parameter arg0 (int):

no description available

core_affinity(self)

Return the core affinity

Returns → int:

no description available

detach(self)

Detach the thread and release resources

After a call to this function, join() cannot be used anymore. This releases resources, which would otherwise be held until a call to join().

Returns → None:

no description available

file_resolver(self)

Return the file resolver associated with the current thread

Returns → mitsuba.core.FileResolver:

no description available

is_critical(self)

Return the value of the critical flag

Returns → bool:

no description available

is_running(self)

Is this thread still running?

Returns → bool:

no description available

join(self)

Wait until the thread finishes

Returns → None:

no description available

logger(self)

Return the thread’s logger instance

Returns → mitsuba.core.Logger:

no description available

name(self)

Return the name of this thread

Returns → str:

no description available

parent(self)

Return the parent thread

Returns → mitsuba.core.Thread:

no description available

priority(self)

Return the thread priority

Returns → mitsuba.core.Thread.EPriority:

no description available

set_core_affinity(self, arg0)

Set the core affinity

This function provides a hint to the operating system scheduler that the thread should preferably run on the specified processor core. By default, the parameter is set to -1, which means that there is no affinity.

Parameter arg0 (int):

no description available

Returns → None:

no description available

set_critical(self, arg0)

Specify whether or not this thread is critical

When an thread marked critical crashes from an uncaught exception, the whole process is brought down. The default is False.

Parameter arg0 (bool):

no description available

Returns → None:

no description available

set_file_resolver(self, arg0)

Set the file resolver associated with the current thread

Parameter arg0 (mitsuba.core.FileResolver):

no description available

Returns → None:

no description available

set_logger(self, arg0)

Set the logger instance used to process log messages from this thread

Parameter arg0 (mitsuba.core.Logger):

no description available

Returns → None:

no description available

set_name(self, arg0)

Set the name of this thread

Parameter arg0 (str):

no description available

Returns → None:

no description available

set_priority(self, arg0)

Set the thread priority

This does not always work – for instance, Linux requires root privileges for this operation.

Parameter arg0 (mitsuba.core.Thread.EPriority):

no description available

Returns → bool:

True upon success.

sleep(arg0)

Sleep for a certain amount of time (in milliseconds)

Parameter arg0 (int):

no description available

Returns → None:

no description available

start(self)

Start the thread

Returns → None:

no description available

thread()

Return the current thread

Returns → mitsuba.core.Thread:

no description available

thread_id()

Return a unique ID that is associated with this thread

Returns → int:

no description available


class mitsuba.core.ThreadEnvironment

Captures a thread environment (logger, file resolver, profiler flags). Used with ScopedSetThreadEnvironment

__init__(self)

class mitsuba.core.TraversalCallback

mitsuba.core.USE_EMBREE: bool = False

mitsuba.core.USE_OPTIX: bool = False

class mitsuba.core.ZStream

Base class: mitsuba.core.Stream

Transparent compression/decompression stream based on zlib.

This class transparently decompresses and compresses reads and writes to a nested stream, respectively.

__init__(self, child_stream, stream_type=EStreamType.EDeflateStream, level=- 1)

Creates a new compression stream with the given underlying stream. This new instance takes ownership of the child stream. The child stream must outlive the ZStream.

Parameter child_stream (mitsuba.core.Stream):

no description available

Parameter stream_type (mitsuba.core.ZStream.EStreamType):

no description available

Parameter level (int):

no description available

class EStreamType

Members:

EDeflateStream

< A raw deflate stream

EGZipStream

< A gzip-compatible stream

__init__(self, arg0)
Parameter arg0 (int):

no description available

child_stream(self)

Returns the child stream of this compression stream

Returns → object:

no description available


mitsuba.core.cast_object()

Capsule objects let you wrap a C “void *” pointer in a Python object. They’re a way of passing data through the Python interpreter without creating your own custom type.

Capsules are used for communication between extension modules. They provide a way for an extension module to export a C interface to other extension modules, so that extension modules can use the Python import mechanism to link to one another.


mitsuba.core.casters()

Capsule objects let you wrap a C “void *” pointer in a Python object. They’re a way of passing data through the Python interpreter without creating your own custom type.

Capsules are used for communication between extension modules. They provide a way for an extension module to export a C interface to other extension modules, so that extension modules can use the Python import mechanism to link to one another.


mitsuba.core.cie1931_xyz(wavelength)

Evaluate the CIE 1931 XYZ color matching functions given a wavelength in nanometers

Parameter wavelength (float):

no description available

Returns → enoki.scalar.Vector3f:

no description available


mitsuba.core.cie1931_y(wavelength)

Evaluate the CIE 1931 Y color matching function given a wavelength in nanometers

Parameter wavelength (float):

no description available

Returns → float:

no description available


mitsuba.core.coordinate_system(n)

Complete the set {a} to an orthonormal basis {a, b, c}

Parameter n (enoki.scalar.Vector3f):

no description available

Returns → Tuple[enoki.scalar.Vector3f, enoki.scalar.Vector3f]:

no description available


mitsuba.core.depolarize(arg0)
Parameter arg0 (enoki.scalar.Vector3f):

no description available

Returns → enoki.scalar.Vector3f:

no description available


mitsuba.core.filesystem.absolute(arg0)

Returns an absolute path to the same location pointed by p, relative to base.

See also:

http ://en.cppreference.com/w/cpp/experimental/fs/absolute)

Parameter arg0 (mitsuba.core.filesystem.path):

no description available

Returns → mitsuba.core.filesystem.path:

no description available


mitsuba.core.filesystem.create_directory(arg0)

Creates a directory at p as if mkdir was used. Returns true if directory creation was successful, false otherwise. If p already exists and is already a directory, the function does nothing (this condition is not treated as an error).

Parameter arg0 (mitsuba.core.filesystem.path):

no description available

Returns → bool:

no description available


mitsuba.core.filesystem.current_path()

Returns the current working directory (equivalent to getcwd)

Returns → mitsuba.core.filesystem.path:

no description available


mitsuba.core.filesystem.equivalent(arg0, arg1)

Checks whether two paths refer to the same file system object. Both must refer to an existing file or directory. Symlinks are followed to determine equivalence.

Parameter arg0 (mitsuba.core.filesystem.path):

no description available

Parameter arg1 (mitsuba.core.filesystem.path):

no description available

Returns → bool:

no description available


mitsuba.core.filesystem.exists(arg0)

Checks if p points to an existing filesystem object.

Parameter arg0 (mitsuba.core.filesystem.path):

no description available

Returns → bool:

no description available


mitsuba.core.filesystem.file_size(arg0)

Returns the size (in bytes) of a regular file at p. Attempting to determine the size of a directory (as well as any other file that is not a regular file or a symlink) is treated as an error.

Parameter arg0 (mitsuba.core.filesystem.path):

no description available

Returns → int:

no description available


mitsuba.core.filesystem.is_directory(arg0)

Checks if p points to a directory.

Parameter arg0 (mitsuba.core.filesystem.path):

no description available

Returns → bool:

no description available


mitsuba.core.filesystem.is_regular_file(arg0)

Checks if p points to a regular file, as opposed to a directory or symlink.

Parameter arg0 (mitsuba.core.filesystem.path):

no description available

Returns → bool:

no description available


class mitsuba.core.filesystem.path

Represents a path to a filesystem resource. On construction, the path is parsed and stored in a system-agnostic representation. The path can be converted back to the system-specific string using native() or string().

__init__(self)

Default constructor. Constructs an empty path. An empty path is considered relative.

__init__(self, arg0)

Copy constructor.

Parameter arg0 (mitsuba.core.filesystem.path):

no description available

__init__(self, arg0)

Construct a path from a string with native type. On Windows, the path can use both ‘/’ or ‘' as a delimiter.

Parameter arg0 (str):

no description available

clear(self)

Makes the path an empty path. An empty path is considered relative.

Returns → None:

no description available

empty(self)

Checks if the path is empty

Returns → bool:

no description available

extension(self)

Returns the extension of the filename component of the path (the substring starting at the rightmost period, including the period). Special paths ‘.’ and ‘..’ have an empty extension.

Returns → mitsuba.core.filesystem.path:

no description available

filename(self)

Returns the filename component of the path, including the extension.

Returns → mitsuba.core.filesystem.path:

no description available

is_absolute(self)

Checks if the path is absolute.

Returns → bool:

no description available

is_relative(self)

Checks if the path is relative.

Returns → bool:

no description available

native(self)

Returns the path in the form of a native string, so that it can be passed directly to system APIs. The path is constructed using the system’s preferred separator and the native string type.

Returns → str:

no description available

parent_path(self)

Returns the path to the parent directory. Returns an empty path if it is already empty or if it has only one element.

Returns → mitsuba.core.filesystem.path:

no description available

replace_extension(self, arg0)

Replaces the substring starting at the rightmost ‘.’ symbol by the provided string.

A ‘.’ symbol is automatically inserted if the replacement does not start with a dot. Removes the extension altogether if the empty path is passed. If there is no extension, appends a ‘.’ followed by the replacement. If the path is empty, ‘.’ or ‘..’, the method does nothing.

Returns *this.

Parameter arg0 (mitsuba.core.filesystem.path):

no description available

Returns → mitsuba.core.filesystem.path:

no description available


mitsuba.core.filesystem.preferred_separator: str = /

mitsuba.core.filesystem.remove(arg0)

Removes a file or empty directory. Returns true if removal was successful, false if there was an error (e.g. the file did not exist).

Parameter arg0 (mitsuba.core.filesystem.path):

no description available

Returns → bool:

no description available


mitsuba.core.filesystem.resize_file(arg0, arg1)

Changes the size of the regular file named by p as if truncate was called. If the file was larger than target_length, the remainder is discarded. The file must exist.

Parameter arg0 (mitsuba.core.filesystem.path):

no description available

Parameter arg1 (int):

no description available

Returns → bool:

no description available


mitsuba.core.float_dtype: str = f

mitsuba.core.get_property(cpp_type, ptr, parent)
Parameter cpp_type (capsule):

no description available

Parameter ptr (capsule):

no description available

Parameter parent (handle):

no description available

Returns → object:

no description available


mitsuba.core.is_monochromatic: bool = False

mitsuba.core.is_polarized: bool = False

mitsuba.core.is_rgb: bool = True

mitsuba.core.is_spectral: bool = False

mitsuba.core.pdf_rgb_spectrum(overloaded)
pdf_rgb_spectrum(wavelengths)

PDF for the sample_rgb_spectrum strategy. It is valid to call this function for a single wavelength (Float), a set of wavelengths (Spectrumf), a packet of wavelengths (SpectrumfP), etc. In all cases, the PDF is returned per wavelength.

Parameter wavelengths (float):

no description available

Returns → float:

no description available

pdf_rgb_spectrum(wavelengths)

PDF for the sample_rgb_spectrum strategy. It is valid to call this function for a single wavelength (Float), a set of wavelengths (Spectrumf), a packet of wavelengths (SpectrumfP), etc. In all cases, the PDF is returned per wavelength.

Parameter wavelengths (enoki.scalar.Vector3f):

no description available

Returns → enoki.scalar.Vector3f:

no description available


mitsuba.core.pdf_uniform_spectrum(overloaded)
pdf_uniform_spectrum(wavelengths)
Parameter wavelengths (float):

no description available

Returns → float:

no description available

pdf_uniform_spectrum(wavelengths)
Parameter wavelengths (enoki.scalar.Vector3f):

no description available

Returns → enoki.scalar.Vector3f:

no description available


mitsuba.core.quad.composite_simpson(n)

Computes the nodes and weights of a composite Simpson quadrature rule with the given number of evaluations.

Integration is over the interval $[-1, 1]$, which will be split into $(n-1) / 2$ sub-intervals with overlapping endpoints. A 3-point Simpson rule is applied per interval, which is exact for polynomials of degree three or less.

Parameter n (int):

Desired number of evalution points. Must be an odd number bigger than 3.

Returns → Tuple[enoki::DynamicArray<enoki::Packet<float, 16ul> >, enoki::DynamicArray<enoki::Packet<float, 16ul> >]:

A tuple (nodes, weights) storing the nodes and weights of the quadrature rule.


mitsuba.core.quad.composite_simpson_38(n)

Computes the nodes and weights of a composite Simpson 3/8 quadrature rule with the given number of evaluations.

Integration is over the interval $[-1, 1]$, which will be split into $(n-1) / 3$ sub-intervals with overlapping endpoints. A 4-point Simpson rule is applied per interval, which is exact for polynomials of degree four or less.

Parameter n (int):

Desired number of evalution points. Must be an odd number bigger than 3.

Returns → Tuple[enoki::DynamicArray<enoki::Packet<float, 16ul> >, enoki::DynamicArray<enoki::Packet<float, 16ul> >]:

A tuple (nodes, weights) storing the nodes and weights of the quadrature rule.


mitsuba.core.quad.gauss_legendre(n)

Computes the nodes and weights of a Gauss-Legendre quadrature (aka “Gaussian quadrature”) rule with the given number of evaluations.

Integration is over the interval $[-1, 1]$. Gauss-Legendre quadrature maximizes the order of exactly integrable polynomials achieves this up to degree $2n-1$ (where $n$ is the number of function evaluations).

This method is numerically well-behaved until about $n=200$ and then becomes progressively less accurate. It is generally not a good idea to go much higher—in any case, a composite or adaptive integration scheme will be superior for large $n$.

Parameter n (int):

Desired number of evalution points

Returns → Tuple[enoki::DynamicArray<enoki::Packet<float, 16ul> >, enoki::DynamicArray<enoki::Packet<float, 16ul> >]:

A tuple (nodes, weights) storing the nodes and weights of the quadrature rule.


mitsuba.core.quad.gauss_lobatto(n)

Computes the nodes and weights of a Gauss-Lobatto quadrature rule with the given number of evaluations.

Integration is over the interval $[-1, 1]$. Gauss-Lobatto quadrature is preferable to Gauss-Legendre quadrature whenever the endpoints of the integration domain should explicitly be included. It maximizes the order of exactly integrable polynomials subject to this constraint and achieves this up to degree $2n-3$ (where $n$ is the number of function evaluations).

This method is numerically well-behaved until about $n=200$ and then becomes progressively less accurate. It is generally not a good idea to go much higher—in any case, a composite or adaptive integration scheme will be superior for large $n$.

Parameter n (int):

Desired number of evalution points

Returns → Tuple[enoki::DynamicArray<enoki::Packet<float, 16ul> >, enoki::DynamicArray<enoki::Packet<float, 16ul> >]:

A tuple (nodes, weights) storing the nodes and weights of the quadrature rule.


mitsuba.core.sample_rgb_spectrum(overloaded)
sample_rgb_spectrum(sample)

Importance sample a “importance spectrum” that concentrates the computation on wavelengths that are relevant for rendering of RGB data

Based on “An Improved Technique for Full Spectral Rendering” by Radziszewski, Boryczko, and Alda

Returns a tuple with the sampled wavelength and inverse PDF

Parameter sample (float):

no description available

Returns → Tuple[float, float]:

no description available

sample_rgb_spectrum(sample)

Importance sample a “importance spectrum” that concentrates the computation on wavelengths that are relevant for rendering of RGB data

Based on “An Improved Technique for Full Spectral Rendering” by Radziszewski, Boryczko, and Alda

Returns a tuple with the sampled wavelength and inverse PDF

Parameter sample (enoki.scalar.Vector3f):

no description available

Returns → Tuple[enoki.scalar.Vector3f, enoki.scalar.Vector3f]:

no description available


mitsuba.core.sample_tea_float()

sample_tea_float32(v0: int, v1: int, rounds: int = 4) -> float

Generate fast and reasonably good pseudorandom numbers using the Tiny Encryption Algorithm (TEA) by David Wheeler and Roger Needham.

This function uses sample_tea to return single precision floating point numbers on the interval [0, 1)

Parameter v0:

First input value to be encrypted (could be the sample index)

Parameter v1:

Second input value to be encrypted (e.g. the requested random number dimension)

Parameter rounds:

How many rounds should be executed? The default for random number generation is 4.

Returns:

A uniformly distributed floating point number on the interval [0, 1)


mitsuba.core.sample_tea_float32(v0, v1, rounds=4)

Generate fast and reasonably good pseudorandom numbers using the Tiny Encryption Algorithm (TEA) by David Wheeler and Roger Needham.

This function uses sample_tea to return single precision floating point numbers on the interval [0, 1)

Parameter v0 (int):

First input value to be encrypted (could be the sample index)

Parameter v1 (int):

Second input value to be encrypted (e.g. the requested random number dimension)

Parameter rounds (int):

How many rounds should be executed? The default for random number generation is 4.

Returns → float:

A uniformly distributed floating point number on the interval [0, 1)


mitsuba.core.sample_tea_float64(v0, v1, rounds=4)

Generate fast and reasonably good pseudorandom numbers using the Tiny Encryption Algorithm (TEA) by David Wheeler and Roger Needham.

This function uses sample_tea to return double precision floating point numbers on the interval [0, 1)

Parameter v0 (int):

First input value to be encrypted (could be the sample index)

Parameter v1 (int):

Second input value to be encrypted (e.g. the requested random number dimension)

Parameter rounds (int):

How many rounds should be executed? The default for random number generation is 4.

Returns → float:

A uniformly distributed floating point number on the interval [0, 1)


mitsuba.core.sample_uniform_spectrum(overloaded)
sample_uniform_spectrum(sample)
Parameter sample (float):

no description available

Returns → Tuple[float, float]:

no description available

sample_uniform_spectrum(sample)
Parameter sample (enoki.scalar.Vector3f):

no description available

Returns → Tuple[enoki.scalar.Vector3f, enoki.scalar.Vector3f]:

no description available


mitsuba.core.set_property(arg0, arg1, arg2)
Parameter arg0 (capsule):

no description available

Parameter arg1 (capsule):

no description available

Parameter arg2 (handle):

no description available

Returns → None:

no description available


mitsuba.core.set_thread_count(count=- 1)

Sets the maximum number of threads to be used for parallelized execution of Mitsuba code. Defaults to -1 (automatic).

Parameter count (int):

no description available

Returns → None:

no description available


mitsuba.core.srgb_to_xyz(rgb, active=True)

Convert ITU-R Rec. BT.709 linear RGB to XYZ tristimulus values

Parameter rgb (enoki.scalar.Vector3f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → enoki.scalar.Vector3f:

no description available


mitsuba.core.unpolarized(arg0)
Parameter arg0 (enoki.scalar.Vector3f):

no description available

Returns → enoki.scalar.Vector3f:

no description available


mitsuba.core.util.core_count()

Determine the number of available CPU cores (including virtual cores)

Returns → int:

no description available


mitsuba.core.util.mem_string(size, precise=False)

Turn a memory size into a human-readable string

Parameter size (int):

no description available

Parameter precise (bool):

no description available

Returns → str:

no description available


mitsuba.core.util.time_string(time, precise=False)

Convert a time difference (in seconds) to a string representation

Parameter time (float):

Time difference in (fractional) sections

Parameter precise (bool):

When set to true, a higher-precision string representation is generated.

Returns → str:

no description available


mitsuba.core.util.trap_debugger()

Generate a trap instruction if running in a debugger; otherwise, return.

Returns → None:

no description available


mitsuba.core.xyz_to_srgb(rgb, active=True)

Convert XYZ tristimulus values to ITU-R Rec. BT.709 linear RGB

Parameter rgb (enoki.scalar.Vector3f):

no description available

Parameter active (bool):

Mask to specify active lanes.

Returns → enoki.scalar.Vector3f:

no description available