Render Tips for Arnold in Maya

Posted by Shih-Chin on Sun, Feb 22, 2015

All photo-realistic ray-tracers are trying to solve the rendering equation. Although they are all categorized as ray-tracer instead of rasterizer, the infrastructure of each implementations are quite different (i.e. uni-directional vs. bi-directional, pure path tracing vs. works with photon-map or irradiance caching, etc).

Arnold is an un-bias uni-directional path tracer with a remarkable importance sampling mechanism and great memory management to achieve amazing performance excellence. However, if we blindly increase the number of ray samples for every render scene, we would not always get a cleaner imagery. Which means that when we switch from one ray-tracer to another, we had better use different strategies to adjust render settings. Here is the summary about what I’ve learned from experience, hope it would help any Arnold user. :)

General

  1. Always using tx! It can significantly reduce I/O time! tx
  2. Change log verbosity to Warnings + Info. This is very useful for render process diagnosis. mtoa_verbosity
  3. Configure file output mtoa output setting
  • Set compression format to zips and enable half-precision, auto-crop to save storage.
  • Turn off tiled, since most compositors prefer scanline format. This is only valid before Nuke 7. Reading tiled EXR in Nuke 9 is 25 times faster. Besides, scanline EXR has memory overhead when rendering many AOVs. So let’s turn tiled ON now!
  1. Check output log for any missing or broken textures.
  • Arnold will stop rendering process immediately when it fails to access target textures.
  1. Use aiUtility to examine the problems of geometry such as:
    • over-smoothing (tessellation) mesh
      • The number of triangles would affect the render performance since ray tracer needs to load all the objects in the scene before tracing.
    • face penetration, discontinuous tangent/normal vectors, etc
      • Those problem would cause discontinuous shading artifacts.

Linear Workflow

The best practice of photo-realistic rendering should be done with linear workflow. Maya supports color management after Maya 2015, but few things should be noticed. When we turn on the color management in Maya: Color Management in Maya

We need to set all parameters in gamma correction to 1.0 and set display gamma to sRGB, Rec 709, etc: Gamma Correction in Render Setting Gamma Correction in Render View

The last thing is that MtoA doesn’t support color space configuration in file node currently (v1.2.4.3). Color space control in file node

We could use extra gamma nodes to convert images to linear space, but the recommended approach is to use following command to convert the color texture file to avoid run-time shading overhead: maketx –colorconvert sRGB linear path-to-image

Look-Dev

  1. Ensure “Energy Conservation” (i.e. outgoing energy ≤ incoming energy)
  • In physically-based setup, the energy of each ray should not get higher after each bounce, or you might get fireflies in your render images. There are two approaches to ensure this:
    1. Make sure the sum of relevant parameters is less than one, or
    2. Turn on Fresnel for diffuse/specular/reflection/refraction
  1. Avoid unnecessary transparent setting.
  • It might be helpful to use set-override to switch the aiOpaque attribute for LOD. (We can switch aiOpaque on for the objects which are far from camera.)
  1. Use aiRaySwith to simplify the shading of indirect bounce (the detail is beyond this post).
  2. If possible, avoid blending multiple material shaders (e.g. aiStandard, aiSkin)
  • Try to compose the control parameters into textures and connect those textures to a single shader.
  • Since each material shader would spawn rays to compute a resultant color, thus the more material shaders we use in a single shading network, the more rays are fired for a resultant color computation, or
  • Try using alLayer in alShaders [1] for complicated mixture materials.
  1. In general case, try to use specular rather than reflection in aiStandard.
  • Unlike specular, reflection would not sample the lights!
  1. Prefer mesh light over emission in aiStandard.

Lighting

  1. Before up-sampling to remove the noise, examine each AOV for the source of noise first!! mtoa AOV browser mtoa AOVs
  2. Keep the number of rays/pixel in a reasonable range
    • As mentioned in [2], 2000~3000 rays/pixel is not uncommon in “The Amazing Spider Man 2”.
    • The rule-of-thumb is to strike a balance between AA and other ray type samples:
      • AA ↑, Diffuse/Glossy/Refraction/SSS/Light ↓ or
      • AA ↓, Diffuse/Glossy/Refraction/SSS/Light ↑
    • When motion blur is on, reset all sample number to 1 and increase AA sample from 5 progressively.
      • Remember, the actual sample count is the square of the value of the sample attribute.
  3. Check CPU & ray-count AOVs to examine the performance bottleneck. I personally use imf_disp (provided by mental ray :D) to view EXR files. When we examine the image whose pixel values are higher than 1, we have to decrease the exposure value for better visual display. In addition, the status bar at bottom would show the pixel value pointed by the cursor.
  4. For the objects which need relatively high sample count compared to the rest of the scene, separate them into another render layer with extra high samples. (e.g. complex refractive geometry or rough specular object)
  5. Avoid unnecessary ray depth.
  • Do we really need a second/third bounce diffuse/specular in outdoor scene? If there is no or tiny visual differences, it would be better to keep the ray depth as shallow as possible.
  1. Use a dummy geometry (whose primary visibility is off) as bounce card.
  2. Prune unnecessary lights which contribute low energy to the scene.
  3. Hide unnecessary objects which has no impact to the render image [4].
  • It might be helpful to use a frustum to hide objects far away (i.e. visibility culling)
  1. Use min pixel width with care for hair/fur rendering, it would change opaque mode subtly. [[more details]({% post_url 2015-09-24-using-min-pixel-width-with-care-in-arnold %})]

Feedback

References

  1. alShaders. Wonderful 3rd party physically-based shaders developed by Anders Langlands.
  2. Raytracers and workflow: a production perspective, SIGGRAPH'14 Course Note
  • There are many in-depth optimization tips for SPI Arnold (but some concepts are the same in Arnold). Highly recommended! A must-read document for Arnold users.
  1. VFX Tiger and Tips Using The Arnold Renderer by Animation Mentor
  2. Repasky, Zachary, et al. Large Scale Geometric Visibility Culling on Brave. PIXAR Technical Report. 2013.

comments powered by Disqus