Rendering a scene often takes a long time. There are, however, many methods you can use to help reduce rendering times.
Raycaster/Raytracer optimization
Avoid raytracing everything in your scene. For example, do not raytrace transparent objects which do not require refraction.
See Shadows in Render > Editors > Render Stats.
Avoid using area and linear lights that cast shadows.
See Raytrace Parameters in Render > Multi-lister and Raytracing Maximum Limits in Render > Globals.
Minimize the number of levels of reflection, refraction and shadows either globally (Maximum Reflections, Maximum Refractions, and Max Shadows Levels in the Render Globals window) or by shader (Reflect Limit, Refract Limit, and Shadow Limit in the shader’s Control Window). A setting of 1 is usually sufficient. One bounce of reflection is sufficient for most mirror effects, and more than 1 level of shadows tends to be wasteful. Even 2 levels of reflection (combined with refraction) will substantially increase rendering time.
See Reflection in Render > Multi-lister.
Where possible, use reflection maps instead of raytraced reflections.
Avoid huge floors with complex geometry occupying one small region. Scale down the floor.
See Subdivide Recursion in Render > Globals.
If you have enough memory, try increasing the voxel Subdivide Recursion value in the Render Globals window to higher values such as 3 or 4. Memory use, however, may increase exponentially by doing this.
See Use Depth Map in Render > Multi-lister.
For spot lights that cast soft shadows, set Use Depth MapON in the light’s Control Window.
Model your scene based on the camera’s view, and make every element as simple as possible for that view. For example, if your scene contains mountains in the distance, don’t model them as displacements with lots of triangles and complex shaders. Instead, use simple planes mapped with photos of real mountains and with transparency maps for their profiles. To create a field of asteroids, model some of the near asteroids, use bump maps for the smaller ones, and use particles for the smallest ones. For the most distant asteroids, use a few large planes with transparency, color, and bump maps.
See Transparency in Render > Multi-lister.
When building and trimming surfaces, use the minimum possible number of CVs and isoparametric curves. Use transparency maps instead of trim surfaces when possible.
See Mask and Depth in Render > Globals.
You may want to (or need to) create and render your scene in different layers and then composite multiple renders using mask and depth files and a compositor (for example, Maya Composer or Maya Fusion).
See Color and Use Back Color in Render > Multi-lister.
If the background does not change during an animation, pre-render it and use it as a backdrop by assigning the pre-rendered image to the Environment Color parameter. You can cast shadows onto such a backdrop using the shader’s Use Back Color parameter.
Do not use backdrops if you have a compositor (for example, Maya Composer or Maya Fusion). Instead, composite the backdrop with the rendered scene. Not only will this decrease rendering time, but if you change your scene elements, you won’t have to re-render the background.
See Blurmult, Convert to Pix, and Convert Solid Tex in Render > Multi-lister.
Adjust the Blurmult value to anti-alias textures rather than setting the Anti-aliasing Levels values high. Only the File texture and some procedural textures have a Blurmult parameter. For surface textures that do not have a Blurmult parameter, try using the Convert to Pix button to convert the texture to a pix file (with or without anti-aliasing); for solid textures that do not have a Blurmult parameter, try using the Convert Solid Tex button to convert the texture to a pix file (with or without anti-aliasing). Apply the pix file as a File texture, and adjust the File texture’s Blurmult value.
See Rgboffset in Render > Multi-lister.
Instead of using a large, high-resolution texture, try combining a large, low-resolution texture with a repeating small scale, high-resolution texture for fine detail. You can apply the small scale texture to the large scale texture as an Rgboffset or an alpha offset. This can dramatically reduce memory usage.
Avoid using expensive procedural textures on surfaces that cover a large area of the view. Among the worst offenders are the Granite, Leather, sFractal, sCloud (with noise), Projection (with noise), Water (if the Numwaves value is high or Reflect_bound. is ON), sWood (you get better results using a Projection texture with an image of a tree cross-section), and sMarble textures. The Sky texture can also be expensive, especially if it uses Fractal or sFractal clouds and ground.
When the blurmult is low and the level_max is high fractal noise can be very slow (although you get nice detail). Try to convert expensive procedural textures into small wrapping file textures where possible. Solid textures can use convert solid texture in some cases. However, often it may be preferable to render a square swatch of the solid texture (by putting the texture on the environment shader color), and then using this swatch as a projection map. Triplaner mapping sometimes works well.
You can convert the sky texture into a faster rendering ball texture by simply rendering a square image of a sphere with the sky reflection map (specularity 1, reflectivity 1, color black). Make sure the sphere just touches the edges of the view. This same trick can be used to pre-render raytrace reflections.
Avoid using procedural textures as bump maps, displacement maps, or per pixel warps. These effects use five texture evaluations per sample (as opposed to one for a color map). Even worse are cases where you have layer upon layer of transparent surfaces with textures, such as a field of particles with an sFractal blob map.
See Convert to Pix and Convert Solid Tex in Render > Multi-lister.
If you have several textures “chained” together (that is, textures mapped onto textures), collapse them into a single File texture using either Convert to Pix (for surface textures) or Convert Solid Tex (for solid textures).
If a solid texture takes too long to compute and you can afford the memory, use Convert Solid Tex and apply the pix file as a File texture. This also gives you better control over texture filtering.
See Texture Caching in Render > Globals (“bot” textures).
Make all File textures as small as possible. If you must use large texture maps, use Texture Caching (under Render Globals).
See ShaderGlow in Render > Multi-lister.
If your scene contains shader glow, and you increase the resolution of your render, lower the ShaderGlow Quality value proportionally.
Minimize the number of lights in your scene. Do not use lights if you can use shader effects or textures instead. For example, to create highlights on a face’s cheeks, do not create a linked point light above each cheek; instead, use shader parameters like translucence and texturing to create the effect. To create a marquee of lights, don’t actually create 100 lights; use a textured shader instead. You can get the marquee highlights by using an environment map with a lot of bright glow spots. Also ask if your effect should use a texture on a single light rather then many lights.
See Render > Create Lights > Volume.
If you must use many lights in your scene, make them volume lights. Volume lights do not calculate illumination for objects outside their volume, and will render faster than other light types.
See Renderer Shadows in Render > Multi-lister.
Don’t make every light cast shadows; be selective.
See Depth Maps in Memory in Render > Globals and Use Depth Map in Render > Multi-lister.
If shadows don’t change during an animation, reuse the shadow depth map by setting Depth Maps in MemoryON (under Render Globals) or by using the -k or -K1 option with the command line renderer. You can also reuse shadow depth maps for individual spot lights by setting Use Depth MapON (under Shadow Casting).
It is not always necessary to render at your eventual output resolution. For example, to match the blurriness of NTSC video you can render at a lower resolution and resize the image up when compositing. Also, if you render soft cloud particle elements separately, you may be able to use much smaller renders, perhaps 1/4 your final output resolution with no anti-aliasing.
See Object rendering parameters in Render > Editors > Render Stats.
Set the Object Rendering Parameters (MB Texture Samples and MB Shading Samples) as low as possible for each object and for the camera view.
See Motion Blur in Render > Globals and Motion Blurred in Render > Editors > Render Stats.
Do not use motion blur for objects that do not move, or barely move, during an animation. You can turn off motion blur either globally (under Render Globals) or by object (under Render Stats).
See Shadows in Render > Editors > Render Stats.
Avoid shadow casting surfaces. The fewer shadow casting surfaces there are, the faster the shadow map generation/shadow casting will be. The smaller the volume bound by all shadow casting surfaces, the higher the density of the shadow maps (and the better the shadow quality).
See Anti-aliasing Levels in Render > Globals.
Keep the Anti-aliasing Levels as low as possible. They have a very strong influence on rendering times. Use the following suggested values:
Quality | Minimum | Maximum |
---|---|---|
Low | 0 | 0 |
Medium | 0 | 4 |
High | 3 | 12 |
See Animation in Render > Globals.
Make sure Animation is OFF (under Render Globals). Parsing animation curves can be very expensive.
See Render in Render > Globals.
If possible, set Render to ACTIVE (under Render Globals) so only active objects are rendered.
Do not run any other major process on your machine during rendering. If possible, do not even run any other minor process (for example, wrl) during rendering.
Watch memory usage closely and avoid going into swap at all costs (see Reducing memory usage).
If after optimizing your scene using the above techniques, rendering may still use all of your available memory and some swap.
When rendering a huge and complex scene, it is possible to run out of pointer space, even if you have enough memory. A 32-bit processor cannot address memory larger than 232-1, or about 2 gigabytes. But after you take away the overhead of stack and heap, you’re left with about 1.8 gigabytes as the maximum size of a 32-bit application.
Make sure that your system limits are set up to use all of the memory available to you - “hinv” indicates RAM and “/etc/swap -ln” indicates swap sizes. To make sure that all the RAM is made available to your process, type “limit” and see if the RAM information matches. The mismatch usually occurs when you have more than 256 megs of RAM on your machine.
Reduce the subdivision of insignificant surfaces (Windows > Render stats).
Reduce the tile-size (rendering command-line option of -T)—this will be useful for all renderers except for the raytracer.
Make sure that the resolutions of your texture maps are of reasonable size for the importance to the resultant rendering (for example, don't apply a 4kx4k texture map to an insignificant object).
Reduce the resolution of your shadow maps (Multi-lister > Light > Shadows).
Don't use the raytracer/powertracer unless you really have to—these applications eat up more memory than the raycaster.
Reduce the memory used by file textures
For File textures, set FILTER to OFF. This avoids allocating extra memory when filtering for the texture map; however, this can produce aliasing artifacts. See Filter in Render > Multi-lister.
Turn Texture CachingON under Render Globals, and set Disk Cache Limit to a size larger than necessary to hold all your textures. This can dramatically reduce the running size of a rendering job. The job will use a lot more temporary disk space, but less memory.
Or, you can add the following lines to the DEFINITION section of the SDL file:
texture_caching = ON; texture_cache_size = 32; texture_cache_disk_limit = <maximum space to use for textures>;
Increase the amount of temporary disk spaced available for file textures by using the command line renderer with the -l option. The value specified after -l indicates the amount of TMPDIR disk space the renderer can use for file textures. Increasing the TMPDIR disk space frees up some RAM for the renderer. (TMPDIR is the environment variable that indicates the location of the temporary disk space.)
Use File > Export SDL to save the SDL file for your scene. Exit the interactive package, and use the command line renderer to render the SDL file.
Reducing memory usage while Raytracing
Set the grid_cache value in the DEFINITION section of the SDL file to something smaller than 4000. Try decreasing grid_cache by 500 between test renders, until grid_cache is 1000, then try decreasing it by 100 between test renders.
Reduce the Subdivide Recursion limit value in the Raytracing Maximum Limits section of the Render Globals window (under Global Quality Parameters)— but realize that a big performance hit can be the end result if you do this.