You can optimize the performance of Viewport 2.0 by doing the following:
If possible, avoid:
Optimization tips:
- The
Consolidate World functionality consolidates all objects that the camera sees. To optimize tumbling performance, zoom out of your scene view so that the camera can see and consolidate all objects.
- Reuse shaders if possible, especially on small, static objects to optimize the
Consolidate World functionality. You can do this by selecting
File > Optimize Scene Size >
and enabling the
Remove duplicate: Shading networks option.
- Use
Smooth Mesh Preview instead of smooth mesh deformers for faster performance.
- Unsupported texture types are baked internally in Viewport 2.0. For better performance, avoid using unsupported textures; or, use a low bake resolution in the
Renderer > Viewport 2.0 >
>
Bake Resolution for Unsupported Texture Types settings.
- Select the
Simple or
Object Sorting
Transparency Algorithm under
Renderer > Viewport 2.0 >
>
Performance. The
Depth Peeling option provides high transparency quality, but performance may be affected when using older graphics cards or with scenes that do not have many transparent objects.
- Multisample Anti-aliasing
and
Screen-space Ambient Occlusion (under
Renderer > Viewport 2.0 >
) can be disabled for better performance. Enable these options for better visual quality and disable them for better performance.
- When working with the DirectX 11 AutodeskUberShader, mip map generation is enabled by default to provide better texturing quality for objects far away. You can disable mip map generation to improve performance; however, you may see a moire pattern for far away textures. In the
<maya directory>\presets\HLSL11\examples\AutodeskUberShader.fxo file, set
#define NumberOfMipMaps 1.
- To accelerate performance, use of
Smooth Mesh Preview is not recommended when tessellation is enabled in an effects shader.
- The dx11Shader node supports both uncompiled (.fx) and compiled (.fxo) effects. For large scenes and complex shaders, use only compiled effects.
-
Texture dimensions do not necessarily need to be a power of two (that is, 256, 512, 1024), nor do they need to be square. Textures with dimensions to the power of two do not necessarily provide any performance benefit.
Note: Viewport 2.0 supports features that are not supported in the Legacy Default Viewport, for example, bump mapping. These features may increase rendering and geometry translation overhead and Viewport 2.0 may appear slower than the default viewport as a result.
Performance tips for animation
- Joints render faster if they are all set to the same color so that they can be batched together during rendering.
- Local rotation axis and handles on the transform may slow down performance.
- HumanIK that do not use alpha blending render much faster.
- Vertex animation cache includes a matrix animation cache. When this is enabled, UI elements do not need to recalculate their matrix information and performance is improved when replaying an animation.
- Ghosting uses the matrix animation cache; therefore, you also obtain better performance when vertex animation cache is enabled.
-
When caching image sequences, if you have two sequences, each with a different number of frames, you should set the cache for both sequences to be the same number of frames as that of the timeline.
You can set sequence caching for a file node in the
Interactive Sequence Caching Options section of the
Attribute Editor. For an image plane, you can set caching by setting the number of frames in the
Frame Cache attribute of the imagePlaneShape
Attribute Editor.
Other tips and tricks
-
In Viewport 2.0, if you delete the shading node for your object, by default, the object is shaded green.
You can change this default color via the object's shape node
Attribute Editor,
Drawing Overrides section,
Color attribute.