Iray Programmer's Manual

Motion blur

Motion blur simulates a shutter effect of real cameras, and results in the blurred appearance of moving objects and light sources. Also movement of the camera itself causes a blur of the rendered scene. It is enabled if the shutter close time is strictly larger than the shutter open time and if the progressive_samples_per_motion_sample attribute is set to a value larger than one. The actual motion is set with motion transformations, see the SRT mode on the mi::neuraylib::IInstance class. The perceived blur thus depends on the shutter time of the camera and the amount of motion that happens within this timeframe.

Motion blur is controlled with the following methods and attributes on the mi::neuraylib::IOptions class, shown here with their default settings:

Method signature Description
void mi::neuraylib::IOptions::set_shutter_open(
    mi::Float32 shutter_open)

void mi::neuraylib::IOptions::set_shutter_close(
    mi::Float32 shutter_close)

Methods on the mi::neuraylib::IOptions class to control the shutter times. To enable motion blur, the shutter close time must be strictly larger than the shutter open time. The normal range is (0, 1), which uses the full length of the motion vectors or motion vector paths. It can be useful to set both times to 0.5, which disables motion blur rendering but computes scene data at an offset of one half of the frame, which allows bi-directional post-motion-blur in the result image. The default is 0.0 for both values, disabling motion blur.

Attribute Description
mi::Sint32 progressive_samples_per_motion_sample = 8

Number of sub-frames rendered before the scene is updated to a different time value. A higher value optimizes render performance at the cost of a higher number of total frames required before the separate motion step samples become invisible in the image. A lower value increases interactivity, but reduces total render performance (i.e. rendering x frames will take longer). A high value makes noise vanish faster, but motion converge slower - and vice versa, so this can be tweaked in one or the other direction, depending on the lighting complexity and the amount of motion specified for a scene. Only powers of 2 are valid. A value of 0 switches off motion blur.