Environment Blur (mia)


| Environment

Category: Environment

Shader Family: Environment

Output: Color

Related mental ray shader: mia_envblur

The Environment Blur shader works by accepting some other environment shader as input, which would usually be a shader that performs an environment lookup in an HDRI environment map. This shader is intended to increase quality and performance of rendered objects that are largely reflecting the mental ray environment (that is, objects that do not primarily reflect other objects).

The Environment Blur shader is particularly useful in product visualization renderings that are surrounded by an HDRI environment map for reflections, and also for visual effects work where you want to integrate CG objects in a real world scene using HDRI reflections with smooth yet fast lookup.

The Environment Blur shader is not as useful for interior architectural renderings, since in those (enclosed) scenes, most reflection rays are bound to hit other objects and the purpose of this shader is to help reflection rays that do not hit other objects. Therefore, you will get the largest benefit in an "open" scene.

When the rendering starts, the Environment Blur shader performs a one-time setup and rasterizes the result of the environment shader into a special internal mipmap format. Then, as rendering proceeds, the shader can perform an extremely efficient blurring operation in the environment map in a way that provides a "look" very similar to shooting an extremely large number of glossy reflection rays, yielding a perfectly smooth result very quickly.

Blur Amount

The amount of blur (range 0.0 to 1.0) applied on the image. When set to 0.0, the internal mipmap is by-passed and the environment shader is looked up directly, as if the Environment Blur shader was not there.

Image Resolution

The resolution of the internal pyramidal data structure used for the filtering. The default value of 200 means that a map of 200 x 200 samples are taken and stored, for subsequent filtering. This should be set high enough to resolve the smallest features in the environment map. A value of 200 is generally enough for any still image, but animations need higher resolutions such as 1000.

Render Tree Usage

Where your existing environment shader is connected (in the material node's Environment input port), instead connect the Environment Blur shader, and then reconnect your original environment shader into the Environment Blur shader's environment shader input port.

Tips for using Environment Blur with the Architectural Material

  • In the Architectural Material shader, click the Optimization tab and enable the Single Environment Sample checkbox.

  • In the Environment Blur shader, set the Image Resolution high enough to resolve the details of your original environment map.

  • As for the actual blur amount, you have two choices:

    • You can set a fixed Blur Amount in the Environment Blur shader. But this is not ideal if you have different materials of different glossiness, because you would need separate copies with different blur amounts applied as environment maps to each material.

    • A better solution is to set the Blur Amount to 0.0 and allow the blur to be calculated by the Architectural Material shader. Any glossy reflection environment lookup performed by Architectural Material will automatically create the appropriate blur amount for the Environment Blur shader.

    Essentially, the Architectural Material "informs" the environment shader which Glossiness setting is used for a certain environment lookup, and thereby allows a single global copy of the Environment Blur shader (applied to the render pass' shader stack) to follow the glossiness of multiple Architectural Materials. This setup also works for map-driven glossiness on a single material.

  • Inter-object reflections will still involve multiple sampling and may display some grainy effects, but you can work around this by limiting the Reflection Distance in the Architectural Material shader for example.