The above image was produced whilst at GMJ Design ltd
Although we had meticulously covered numerous ways of optimizing the 3D scenes and rendering times in our
latest book, the following tips will further help you to address other common memory errors.
With displacement and proxies,the memory is only allocated at render time. So even when your small test renders seem ok and the FG files had been cached, your computer may still run out of memory when rendering the final high resolution image.
Overcoming the problem:
1- Ensure that you have opened the mental ray message window dialog box with all its functions checked, in order to follow the rendering process and detect any problems, whilst paying attention to the buckets being rendered on frame buffer.
2-Proxy errors are often only detectable by looking at the last rendered buckets computed on the frame buffer before the crash, and the last messages from mental ray messages window dialog box.
Normally it should read as follows: “...mip binaryproxy= Loading ...bytes geometry.”
Followed by this message “... progr= scene cache flushed asynchronously ...MB for module job, now: ...MB” and the final mental error message dialog box: “The render was cancelled due to insufficient memory...”.
These errors can be rectified by first changing the ray tracing acceleration to BSP2 type.
Next, ensure that you
reduce the amount of copied proxies in your scene. By that, copy instance all similar plants, grass or/and trees in the scene(or other types of geometry) . If there are too many sets of different plants and trees in the scene, then it would be worth attaching them as normal copied meshes first, and later convert them into proxies.
This exercise is to reduce the amount of copied proxies in the scene. The ideal situation would be to have mental ray load up proxies only once (i.e. multiple instanced proxies or one big proxy with different sets of plants, trees etc, originally attached together as one mesh).
Finally, reduce the density of the relevant geometry and increase the page file as previously shown. The process of creating and working with proxies is covered in detail in the 2nd edition of my
book with Roger.
3-Displacement errors are easier to detect and tackle. The mental ray message should indicate the “rogue” object/s’ name and mention “...retesellation...”: “...ms from ground (geomObject(mesh00)...”.
followed by “...aborting, not possible to avoid retesellating...”; “...scene cache flushed asynchronously...”.
And the final mental ray error dialog box reading: “The render was cancelled due to insufficient memory...”.
To solve this problem, simply open the renderer tab, on shadows and displacement parameters, under displacement (global settings), change the Max. Subdiv value to 1k or lower. This should be sufficient. Note that, values lower than 256 may result in a very faceted displacement (i.e. not accurate), so it is worth gradually decreasing/test rendering the values without compromising the quality too much.
Note: In addition to the above mentioned,in very extreme and difficult cases of memory loss, one can additionally enable the "use fast rasterizer (rapid motion blur) function, from the "rendering algorithms" parameters.
This rendering method will bypass most mental ray memory issues.
It is worth noting that although very powerful, this rendering algorithm disables some of render elements. To override this, simply render the file output to an EXR file extension type, provided one has the material IDs/Object IDs,etc, originally enabled in 3Ds Max.
If facing difficulties extracting these EXR passes in Photoshop,After Effects,etc;simply switch your 3Ds Max back to standard mental ray rendering algorithm when computing your AO pass, and enable your rendered elements again; with cached FG at a very low res to render the final output in higher res.
I hope you found this post useful.