How to save memory when working with big scenes in 3dsMax
Over the months we’ve been working we have been looking in every corner of the web to collect the best content for you!
Then we leave a list of the best tips for save memory when working with big scenes in 3dsMax. This list will be updated regularly.
- Simply save the scene in wireframe mode with one maximized viewport and reload the scene. As soon as you change to Smooth+Highlights mode, you should see a lot of RAM consumed, with more being consumed for larger scenes. If you switch to Smooth+Highlights mode before you render, you are basically giving away that RAM, and there is no way to get it back. But if you just load a scene and immediately render without going into Smooth+Highlights first, you will have all that extra RAM to render with. Open your Task Manager and monitor your RAM consumption to verify. The larger the scene, the more RAM you save. Roughly speaking, you should expect to see a savings of 100MB for every 1million polygons your scene contains.
Ok, how about this. Take it a little further. When it’s time to render, go to the Display panel and in the Hide by Category rollout, select everything but Geometry. This hides all the lights, shapes, cameras extra that all consume RAM. Then select all the geometry and enable ‘Display as Box’. Save then reload and you can see another few hundred MBs less RAM consumed
- Before doing a new render, reboot your system, to purge all those extra processes that accumulate in ram as you use your computer.
- Close all other applications: Seems obvious, but it’s surprising how much RAM other small applications can take up. For example, iTunes seems to gobble up about 0.1 of a Gig of RAM, even though common sense seems to suggest it wouldn’t take up too much memory.
- Turn off the vfb: The “Virtual Frame Buffer” (vfb) which is now called the “Rendered Frame Window” takes up a lot of memory. So for the privilege of seeing a preview of your render, you’re giving up potentially 200 to 300 meg of RAM, especially if you’re rendering a 2k or 3k image. Go to the renderer options and uncheck the Rendered Frame Window Checkbox. If using a 3rd party renderer like Brazil, make sure you turn off it’s frame buffer as well. Then set the renderer to save the result as a file in the Render Output section. This will save you tons of RAM.
- Bitmap Pager: Go to Customize, Preferences, Rendering, Bitmap Pager, turn it on, and play with the settings. It can drastically reduce the amount of memory necessary for scenes with large bitmaps, or for rendering very large images. The settings can sometimes seem like black magic (and I think they are), but here’s some basic information I’ve found after doing a bunch of tests and speaking to some knowledgeable people. Lets say you have a scene with 100 bitmaps in it. The bitmaps all vary in resolution and disk size, say between 100k and 11,000k on your disk. Now lets say your goal is to use the least amount of memory possible (although note that the less memory you use, the slower the render will go).
Making the Page Size large means fewer page files, since all the paging goes to a few large files instead of a bunch of small files. Changing this value doesn’t seem to affect memory much, personally I’d set this to a largish value, so that large bitmaps don’t get broken into too many small pages.
The smaller the Bitmap Size Threshold, the more files that are paged. This is because more files are larger than this threshold, so they get put into the pagefile. So for less memory usage, make this a small value.
Making the Memory Pool smaller means the less stuff in memory and the more stuff that goes to disk. So make this a small value to conserve memory.
Also of note, it seems that changing your settings requires a restart. So if you change your settings, you then need to save your file, and restart max to have those settings take effect.
- Smaller Buckets: If using a bucket based renderer such as Brazil, Vray or Mentalray, try reducing the bucket size. A smaller bucket size will mean less stuff needs to be in memory to render that bucket. This should render slightly slower, but can reduce the memory requirements, especially if you’re using high sample rates.
- Strips Setup Dialog: This feature lets you render your image in chunks, and is useful for rendering very large bitmaps. First, do a netrender, and when the Network Job Assignment dialog comes up, check Options -> Split Scan Lines, then click Define to set it up. Do a search for “Strips Setup Dialog” in the help file for more information on how this feature works.
- Reduce Poly Count: Now might also be a good time to ask yourself if you’ve optimized your polycount. I know you had tons of fun modeling every tiny detail on that car, but do you ever actually see that bolt you modeled in the shot? Do you really need a 30 sided cylinder for that object in the far distance that’s 2 pixels tall? Take a moment to go through your scene and see if you can be a bit more economical, you’d be surprised what you may find.
- Reduce Object Count: In general, the more objects in your scene, the more memory is taken up as well. See if some objects can be combined into a single object using the Attach function.
- Turn off bitmaps displayed in the viewport: This doesn’t reduce memory for a netrender, but if you want to do an interactive render inside max, it’s quite possible that a bunch of your memory is being eaten up displaying maps in your scene in the viewport (I was surprised the other day when I found out about half a GIG of RAM was being used up displaying a bunch of large maps in the viewport). Just go to the Views Menu and click on the “Deactivate All Maps” option. Note: In max 2008, this feature has been changed, now go to Views, Show Materials In Viewports As, Standard Display.
- Reduce Bitmap Size: In the same spirit as #9, do you really need a 4k map for an object that’s 10 pixels tall on the screen? Always keep your original highres map backed up, you never know when you may need it, but instead of reading in the full 4k map in max, try making a 1k of 512 pixel version of the same map, see if you notice a difference. You’ll certainly notice a difference in memory usage.
- Remove Unneeded Mapping Coordinates: UVs take up RAM, so if you have a 10,000 poly object with 3 or 4 UV sets (i.e., you’ve applied a number of UVWMapping or UVWUnwrap modifiers set to a number of map channels), but the material assigned to the object doesn’t require UVs, you’re wasting a lot of memory. Use the Remove UVs Utility to kill those unused mapping coordinates and save memory.
- Change Bitmap Filtering Type: On the bitmaps in your scene you have choices on filtering type. “None” takes up the least memory but the bitmap is likely to look really aliased, the default of “Pyramidal” requires the program to allocate memory equal to approx 133% of the size of the bitmap. And “Summed Area” requires the program to allocate approx 400% of the size of the bitmap. Summed Area does look better in many cases (especially if your bitmap is on a flat plane parallel to the camera direction), but reserve it only for special situations, since it eats up so much memory.
- Tiled Mipmaps: If using a renderer like Vray, you can convert your bitmaps to tiled mipmaps, which are then read into the Vray bitmap loader (called VrayHDRI). These will render smaller less memory intensive maps for stuff that’s smaller on the screen, and will put only part of a bitmap in memory if only a small portion of the bitmap is on the screen. Can save a lot of memory.
- Clear out unused cached bitmaps
F11 MaxScript Listener->
- Keep it clean
Delete unused materials, UVW maps and objects from the scene
- Use 3d displacement method for large displacement maps(Vray)
2d displacement method uses lots of memory with large maps
Also use same displacement modifier for all objects that have same displacement map
- Use dynamic memory(V-ray)
F10 Render Setup->
Change “Dynamic memory limit” to a value that suits you best. If you have 4GB of RAM and a 32 bit OS you should enter 2000-3000MB. If you have 12GB RAM,64bit OS enter around 8000-10000MB.
- Use Backburner to render
Do a netrendering on one single computer
Activate your backburner server, monitor, and manager
Submit a networkrenderingjob (You can do this on one single computer)
In the dialog box choose Split scan lines
This will cut the final image into chunks max can handle
You can define the size of every individual chunk and even choose is max will stich them automatically.
21. If 3ds max still crashes after applying these tips, then render with smaller resolution and increase the image size in Photoshop. Remember to increase the size in small steps. Maximum of 5-10% increase at once.
– Buy 64 bit operating system with lots of memory
– Resize bitmap textures to actual maximum size they will be rendered in.
If you render images at resolution 3000 x 2250 then your texture maps never need to be larger than 3000 x 2250. Small objects and objects that are far away from the camera can have much smaller texture maps than 3000 x 2250.
22. Do not work on anything that cannot be seen by camera in the scene
23. Use Xref – You can find it under File > References > Xref scene
24. Instancing and scattering – If you need to copy objects, that will not be edited later, use copy as “Instance”. If there are more than 20 objects, use “MultiScatter”, especially when copying repeating objects (mostly greenery). Make “MultiScatter” presets for copying elements in advance.
25. Use layers for the purpose of convenience and work optimization.
26. Use “Nitrous” mode in viewport when assembling scene.
27. Hide textures, if you are not working with UVW Map. All textures can be hidden in Display > Shaded: object Color.
28. Optimize materials and viewport – use only JPEG textures. Not using TIFF and PNG textures, since they consume a lot of memory and significantly slacken overall performance.
29. To increase viewport performance you can put multipolygonal objects in “Box” display mode.
30. Use “Adaptive Degradation” mode in viewport settings.
31. All “VrayProxy” objects, which aren’t worked at, are displayed as “Box”. Set all “MultiScatter” objects with ready settings to minimum values in “Preview” parameter, “Preview type: Box”.
To be continue…
We hope the list of tips will help you when working with very large projects.
- Evermotion: 3ds Max – Working with big scenes
- Vray memory error – Problem rendering big image- Rendering large images for print
- Reducing Memory Usage To Render A Memory Hungry Scene
- How to save hundreds of MBs of RAM on large scenes without slowing rendering
Here’s a great tool for creating multiple proxies automatically and easily reduce the number of polygons and file size.
Q-Proxies 3dsMax plugin: http://www.splinedynamics.com/q-proxies/
I use the Kstudios Project Manager for creating proxies on the fly and manage assets. It’s rock!
Thanks for this great lesson, guys!