![]()
Get the most out of Maya
Use the following best practices to optimize Maya’s performance.
Interactive drawing
- Turn on Shading > Interactive Shading to improve performance when moving the camera.
- Save the file in the simplest display mode to make load time faster. Avoid saving files in textured display mode.
- Use default display options for polygons.
- Turn off display of all non-essential UI that updates when the scene view updates, for example: Heads Up Display, Time Slider, Range Slider, Hypershade, Attribute Editor, UV Texture Editor.
- Turn off the display of all non-essential scene elements, ranging from the Grid to drawing skeletons.
- Work with a layout that only includes a single modeling panel.
- Segment your scene into areas that don’t overlap (for example, using a grid layout). Use display layers to turn on or off the areas as required.
If you need to set up layers for visibility, splitting up into non-overlapping rectangular grid sectors should help. (Maya performs front, back, and side camera frustum culling per object. If even one triangle shows up, Maya draws everything.)
- Use the new hardware Mipmap filtering options, which are in the Hardware Texturing section of the shader node, Texture Filter drop-down list.
- Use the new Use default material display mode if applicable.
- Don’t use extra Shading menu settings like Wireframe on Shaded if you don't need them.
- If possible, use Show > Isolate Select to limit what is displayed and refreshed in the scene.
- Objects with less than a few hundred triangles, and especially those with only a few triangles will have a high performance overhead. If possible, merge the objects together into one. Maya performs much better with less objects that each have thousands of triangles versus many objects with only a few triangles.
- Use instancing when possible. This includes instancing geometry, materials and textures. If using file texture nodes, it is better to have one file texture node that is instanced versus many copies of the node. This affects memory used when the file is loaded as well as on disk.
- Make sure to set your video card settings to Maya settings and disable vertical sync (sync).
- The default material display option can be used to see the difference between using 1 shader for all objects versus n shaders.
- If surfaces are partitioned into many layers, this may slow down shaded mode display. Attempt to use fewer partitions if possible, and if used for visibility to partition the surfaces into grid sections. This helps with visibility culling.
- Attempt to build surfaces that do not intersect each other in terms of their bounds (bounding boxes). Visibility testing performs worse in these cases.
- Sorting of the DAG hierarchy by display attribute types may help. This can be done by reordering DAG objects in Outliner.
- Ordering your DAG hierarchy may help:
- all surfaces first, then all non-surfaces
- by visibility within a given region (perhaps by layer if layers are used for visibility partitioning)
- by depth to viewer (if feasible)
- material and lighting attributes: for example, all lamberts, then all blinns, then all shaders which don't use lighting, then all those that do, and finally all shaders which don't have transparency, then all those that do
- Use a minimal shader for an object. For example use a surface shader when you don't require lighting, or you’ll be overriding lighting elsewhere, for example, with color per vertex.
- Remove duplicate shading networks.
Hardware Shaders
These are coding tips for hardware shader plug-in writers.
- Do not push and pop all GL attributes if not required. This is more expensive than pushing specific attributes.
- If you’re only using hardware shaders in the scene view, we recommend that you use the older API: geometry(), bind() and unbind(). If you also want to batch render your hardware shader, we recommend you use the newer API: glGeometry, glBind and glUnbind.
- We recommend you cache all node attributes as internal. The example plug-ins hwColorPerVertex, hwPhongShader and the cgFxShader all do this. Non-cached values are very expensive to evaluate and can double the draw time.
- Avoid using complex attributes (structures and arrays).
- If the output color on the shader is not important, do not make any attributes affect it. This causes additional computation as marking one attribute dirty causes a recomputation to derive the dependent one.
- The compute() method can be left empty if not required. The simpler the method the better. You will not see Hypershade swatches if you do not compute the output color.
- Do not post-normalize tangents in the plug-in. This is done for you.
- Data sent via the geometry calls are read-only and are cached internally. Do not modify the values.
- Use simple data structures (versus Maya API objects) for simple data. For example, use float3 versus MFloatVector. There is a performance overhead due to the interfaces used in OpenMaya.
- Take advantage of methods available on M3dView. OpenGL state is cached internally and can give better performance than using beginGL(), endGL() and direct calls to OpenGL.
- Use glDrawRangeElements to draw with. This is the API recommended by the card vendor for drawing with the geometry arrays passed to the hardware shader.
- Make sure to set the hasTransparency() return value appropriately. Setting it to true causes Maya to draw an object twice (once culling front faces, once culling back).
- Take into account the current display state in M3dView. For example, don't disable lighting if the display mode is Use No Lights.
- When transparency is enabled, framebuffer blending is already enabled. You do not need to enable it again.
- Take advantage of the new method: MPxHwShaderNode::currentPath() to send the appropriate information for attribute query methods (for example, getTexCoordSetNames()).
- Test which parameters on color/alpha and depth mask are enabled for interactive and especially for hardware rendering. They can give hints as to how to draw a simpler version of the geometry.
- For the Hardware renderer, the plug-in can be called multiple times. The general sequence is usually: depth pass, [lighting pass[es]], color pass, [shadow map pass], [alpha pass], [depth pass]. Items marked with braces “[“ “]” are optional and dependent upon the number of lights in the scene, whether shadows are enabled for those lights, and whether alpha and depth output images are specified in the Render Settings.
- Use the new Ignore Hardware Shader option which is available per object (NURBS or polygonal surfaces). This is available in the Attribute Editor in the Object Display section and as a new option in the Display > Object Display menu. Use Ignore Hardware Shader to make the hardware shader not show up on the object, or use Use Hardware Shader to restore the default state of showing the shader. This allows users of the plug-in to selectively disable shader display for performance reasons.
Memory
- Unlimited undo queue takes more memory than a limited undo queue. The default Undo queue is set to 50 in the Preferences window.
- Take advantage of large address awareness on Windows XP up to 3 GB.
- Use instancing when possible. This includes geometry, materials, textures, lights, and so on.
Animation
- Use Skin > Edit Smooth Skin to limit max influences, remove unused influences and prune small influences.
- Use Deform > Prune Membership to remove components that aren’t affected by the deformer.
Fur
- Lowering the Fur Accuracy value for the Fur Feedback hairs significantly increases interactive draw speed, but makes it less easy to preview Scraggle, Curl or Clumping.
- Since Shadow Maps are expensive to render, don’t use more than you need. Autoshading is free and can provide an acceptable alternative for some lights when using the Maya Software renderer.
Miscellaneous
- On Windows, fragmented hard drives can cause serious performance issues. We suggest you defragment regularly and thoroughly with a dedicated application. Standard tools offered by the operating system are often not sufficient to gain performance benefits.
- Take advantage of file referencing. For more information, see About file referencing.
- Become very familiar with Windows > Settings/Preferences > Performance Settings.
- Use File > Optimize Scene Size >
to remove unused scene data.
Modeling
- Use the Reuse Triangles attribute on polygons.
- Use Poly Reduce to simplify complex geometry. Polygonal models that don't have the following will display faster: unshared normals, unshared texture coordinates, unmapped faces, and faces that are not triangles (not triangulated).
Dynamics
- Use the Stand In attribute on rigid body geometry.
- When starting or setting up a simulation, start with less geometry on particles.
Classic Cloth
- Turn off Classic Cloth collisions for the initial setup and testing of a simulation.
- Animate settings like Frame Samples and Time Step Size to improve solve time.
- Solve in batch mode.
Rendering
- Use Render Diagnostics for hints on improving performance. See “Maya render diagnostics” for more information.
- Remove duplicate shading networks.
Artisan
- Increase Stamp Spacing if possible (Stroke section of Artisan Tool settings editor).
- Use Screen Projection if possible (Stroke section of Artisan Tool settings editor).
Paint Effects
- Lower the Display Quality in the Paint Effects Tool settings editor.