Camera Effects Rollout (mental ray Renderer)

The controls in this rollout are for the camera effects depth of field and motion blur, as well as for contour shading and adding camera shaders.

Procedures

To use depth of field for a Camera view:

  1. On the camera’s Parameters rollout, in the Multi-Pass Effect group, turn on Enable and choose Depth Of Field (mental ray).
  2. Set the camera’s target distance to the range at which you want objects to be clearly in focus.

    For a Target camera, you can select the camera’s target object and move it. For a Free camera, you adjust the Target Distance on the Parameters rollout.

  3. On the Camera’s Depth Of Field rollout, decrease the f-Stop value to narrow the depth of field, or increase the f-Stop value to broaden the depth of field.

    You might need to experiment with f-Stop values to get the effect you want.

  4. Render the scene.

To use depth of field for a Perspective view:

  1. On the Render Setup dialog, go to the Renderer panel Camera Effects rollout, and in the Depth Of Field (Perspective Views Only) group, turn on Enable.
  2. Set the Focus Plane distance to the range at which you want objects to be clearly in focus.
  3. Decrease the f-Stop value to narrow the depth of field, or increase the f-Stop value to broaden the depth of field.

    You might need to experiment with f-Stop values to get the effect you want. If you have trouble getting good results with f-Stop, use the drop-down list to change the method to In Focus Limits, then adjust the Near and Far values to enclose the region of the scene you want to be clearly in focus.

  4. Render the scene.

To use motion blur:

  1. Select each animated object you want to be blurred by its motion, right-click and choose Properties, then in the Object Properties dialog General panel Motion Blur group, make sure Enable is on and Object is chosen.

    The mental ray renderer won't generate motion blur if Image is the chosen type.

  2. On the Render Setup dialog, go to the Renderer panel Camera Effects rollout, and in the Motion Blur group turn on Enable.
    Note: With the mental ray renderer, don't use Motion Blur as a Multi-Pass Effect.
  3. Increase the Shutter value to increase the blurriness caused by motion blur.
  4. On the Render Setup dialog, go to the Rendering Algorithms rollout, and make sure Ray Trace is turned on.

    Motion blur is not rendered when the mental ray renderer uses scanlines only.

  5. Render the scene.

To render with contours:

  1. Use the mental ray Connection rollout to assign a contour shader to an object's material.

    The mental ray material also lets you assign a contour shader.

  2. On the Render Setup dialog Renderer panel Camera Effects rollout, in the Contours group, turn on Enable.
  3. Change the contour shaders if you wish.
    Note: A number of Contour Output shaders are available, but by default, only one Contour Contrast and one Contour Store shader are provided with 3ds Max. You can adjust the contour contrast shader's settings; the contrast store shader has no parameters.
  4. Render the scene.

To assign a camera shader:

  1. Click the button for a camera Lens, Output, or Volume shader.

    The Material/Map Browser is displayed.

  2. Choose a shader from the Browser list, and then click OK.

To adjust the settings for a contour or camera shader assigned on this rollout:

  1. Open the Material Editor.

    If you need to, arrange the open dialogs so you can see the Material Editor and the Render Setup dialog at the same time.

  2. Drag the shader button from the Render Setup dialog to an unused sample slot in the Material Editor.

    An Instance (Copy) Map dialog is displayed. Be sure to choose Instance, and then click OK.

    If you don't choose Instance, changes you make to the shader settings in the Material Editor won't have any effect on the Render Setup dialog.

    Tip: If you forgot to choose Instance, change the shader settings as you choose, and then drag the shader's sample slot or its Type button back to the button in the Render Setup dialog. This updates the Render Setup dialog copy of the shader.

    The Material Editor displays the shader parameters rollout.

  3. Adjust the parameters.

Interface

Motion Blur group

Tip: mental ray motion blur is not recommended for use with particle systems, as this can increase rendering time considerably. Use a Particle MBlur map instead.
Note: Motion blur with the mental ray renderer does not always follow curving trajectories. Increasing the value of Motion Segments can help, but this works better for rotary motion than for traveling motion.

The Rendering Control Properties (lower-right) quad of the rendering quad menu (++right-click) has a Motion Blur toggle for a single, selected object. You can turn on Motion Blur for lights and cameras: moving lights and cameras can generate motion blur when rendered with mental ray.

Enable
When on, the mental ray renderer calculates motion blur. Default=off.
Blur All Objects
Applies motion blur to all objects, regardless of their object property setting. Default=on.
Shutter Duration (frames)
Simulates the shutter speed of a camera. At 0.0, there is no motion blurring. The greater the Shutter Duration value, the greater the blurring. Default=0.5.
Shutter Offset (frames)
Sets the beginning of the motion-blur effect relative to the current frame. The default value, –0.25, centers the blurring slightly before the current frame for a photorealistic effect. Default=–0.25.
Motion Segments
Sets the number of segments for calculating motion blur. This control is for animations. If motion blur appears to be tangential to the actual motion of an object, increase the Motion Segments value. Larger values result in more accurate motion blur, at a cost of rendering time. Default=1.
Time Samples
When the Sampling mode is Unified / Raytraced, this control is unavailable.

When the Sampling mode is Classic / Raytraced and the scene uses motion blur, Time Samples controls the number of times the material is shaded during each time interval (set by Shutter Duration). By default, the material is shaded only once, and then blurred. If the material changes rapidly during the shutter interval, it might be useful to increase this value, in order to obtain more accurate motion blur. Rapid changes in reflections or refractions might require a higher Time Samples value. Range=0 to 100. Default=5.

When the Sampling mode is Rasterizer / Scanline, the label for this parameter changes to Time Samples (Fast Rasterizer) to indicate that this version of Time Samples is now in effect. The default value for the Fast Rasterizer version of Time Samples is 1, and the range is 1 to 128. If you change the value for either Sampling mode, 3ds Max remembers the changed setting when you switch.

Contours group

These controls enable contours, and let you use shaders to adjust the results of a contour shader. You assign the primary contour shader to the Contour component of the mental ray Connection rollout or a mental ray material (see Advanced Shaders Rollout (mental ray Material)).

Note: Contour shading does not work with distributed bucket rendering.
Enable
When on, enables rendering of contours. Default=off.

To change a shader assignment for adjusting contours, click a button. Default shaders are already assigned to the three components, as the button labels indicate.

Contour Contrast
The contour contrast component can be assigned the following shader:
Contour Store
This component stores the data on which contours are based. It can be assigned the following shader, which has no parameters to set:
Contour Output
The contour output component can be assigned one of these shaders:

To adjust the settings for a shader assigned to one of these components, drag the shader's button to an unused Material Editor sample slot. When prompted to use an instance or a copy, be sure to choose Instance. (If you edit a copy of the shader, you will have to drag the sample slot back to the shader button on the Camera Effects rollout before you see any changes take effect.)

Camera Shaders group

These controls let you assign mental ray camera shaders. Click a button to assign a shader to that component. After a shader is assigned, its name appears on the button. Use the toggle on the left to temporarily disable a shader that has been assigned.

Lens
Click to assign a lens shader.

In ray tracing, a camera casts rays into the scene, in order to construct a model of the light that in the real world, would be cast into the camera lens. A lens shader adjusts the color or trajectory of the rays the camera sees.

This component can be assigned one of these shaders:
Output
Click to assign a camera output shader. These are the output shaders you can assign:
Volume
Click to assign a volume shader to the camera. These are the volume shaders you can assign:
Note: You can also assign Volume shaders to the Volume component of the mental ray Connection rollout and the mental ray material (see Material Shaders Rollout (mental ray Material)).

Depth of Field group (Perspective views only)

These controls are comparable to the depth-of-field controls for cameras. They apply only to Perspective viewports. You can render depth-of-field effects for either Camera or Perspective views. Depth-of-field effects don’t appear when you render orthographic viewports.

For a Perspective view, use the controls in this group. For a Camera view, choose “Depth Of Field (mental ray)” as the multi-pass rendering effect, then adjust the f-Stop setting. See Depth of Field Parameter (mental ray, iray, and Quicksilver Renderers).

Enable
When on, the mental ray renderer calculates depth-of-field effects when rendering a Perspective view. Default=off.
[method drop-down list]
Lets you choose the method for controlling depth-of-field. Default=f-Stop.
  • f-Stop Controls depth-of-field with the f-Stop setting.
  • In Focus Limits Controls depth-of-field with the Near and Far values.

In most cases, the f-Stop method is easier to use. The In Focus Limits method can help when the scale of objects in the scene makes it difficult to control depth of field using the f-Stop value alone.

Focus Plane
For Perspective viewports, sets the distance from the camera, in 3ds Max units, at which the scene is completely in focus. Default=100.0.

For Camera viewports, the focus plane is set by the camera's target distance.

f-Stop
When f-Stop is the active method, sets the f-stop for use when you render Perspective views. Increasing the f-Stop value broadens the depth of field, and decreasing the f-Stop value narrows the depth of field. Default=1.0.

The f-Stop can have a value less than 1.0. This is not realistic in terms of an actual camera, but it can help you adjust the depth of field for scenes whose scale does not use realistic units.

Near and Far
When In Focus Limits is the active method, these values set the range, in 3ds Max units, within which objects are in focus. Objects lose focus when they are closer than the Near value or farther than the Far value. These values are approximate, because the transition from in-focus to out-of-focus is gradual, not abrupt.

The Near and Far values are related to each other and to the value of Focus Plane. Changing the value of Near changes Far as well, and vice versa. Specifically, if

H = Hyperfocal distance, the Focus Plane value at which the Far limit becomes infinity

D = The Focus Plane distance

D n = The Near distance

D f = The Far distance

Then

D n = HD / (H + D)

D f = HD / (H − D)