Instrument

Description

Instrument Instruments are the “probes” in your scene. They gather light and generate the result image or data sets. No simulation can be run without an instrument.

You may define multiple instruments, for instance several cameras. The active instrument for the simulation may be chosen in the render settings.

Mask Rendering

Mask rendering is a feature that allows to compute only on specific parts of the instrument’s sensor.

../../_images/maskrendering.png

Scene rendered with a mask

When available, the mask can be set as one the instrument’s child node.

Input parameter:

Image This node will be an image file that will contain the mask that will be used for the mask rendering process. The file must be a grayscale or RGB image file.

If the input image has RGB channels, each pixel value will be turned into grayscale (between 0 and 1). Then the pixel value will be turned into black and white using a threshold:
  • if grayscale pixel value is superior or equal to 0.5, pixel value is 1

  • if grayscale pixel value is strictly inferior to 0.5, pixel value is 0

The binary value will be used to let or cancel the ray coming from or to each pixel of the sensor.

The mask may have a different size from the buffer image. The mask will be automatically resized to the sensor’s size.

Warning

When using mask rendering, it is strongly advised to change the PixelFilter parameter of the instrument to “Box”. If not set correctly, the composition of images that will be done later with the operation filter might not be correct.

Compatible instruments:

Ocean XML 8.0 example:

<image type="file" name="binarymask" path="mask_image.png"/>