Here are a few tips to help you render a really large scene, or to
render a really large bitmap of your scene in 3dstudio max. It's quite
common to work on a scene for quite some time, doing 640x480 test
renders, and then reaching a point where you want to render the scene
at 2048 pixels or higher. You hit render, and bam, you get the out of
memory error, and max crashes. Here's a few things to try:
Before doing a new render,
reboot your system, to purge all those extra processes that accumulate
in ram as you use your computer.
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
to 64bit max: Starting with
max9, max now comes in two flavors, 32bit and 64bit. To use the 64bit
version of max, you'll need a 64bit compliant computer and a 64bit OS
like winXP64 or Windows Vista 64. This version of max can use way more
ram than a conventional 32bit system. So you can add 4 Gigs, 8 Gigs,
pretty much however much RAM you need for your scene, rather than the
standard 2 Gigs that 32bit systems generally max out at. One note, many
plugins compiled for 32bit max have not been compiled for 64bit max
yet, although this will change as time progresses, so before making the
switch, make sure all the plugins you need have 64bit versions as well.
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.
5) Do a
netrender: Even for still frames,
even if you only have one computer, using backburner or a different
netrenderer can save tons of RAM, because it doesn't need to fully load
max to render your scene. So I usually set up my home computer as both
the manager and the server, I go into max, I set off a netrender,
making sure I have the "Initially Suspended" checkbox checked, then
close max, then go into the Monitor and initialize the job (if you
forget to submit the job uninitialized, your computer will try and load
2 copies of the scene, one in the netrender, and the copy of the scene
that's already open in max, and that's a very bad thing). Check the
manual for more info on using backburner, or whatever network renderer
Line Rendering: You can also
use command line rendering to render your file. Just look up Command
Line Rendering in the help file.
7) Turn On Conserve Memory: If rendering in Scanline renderer, go to the Render dialog, Renderer, Memory Management, and check "Conserve Memory" The help file is kinda vague about this feature, but it claims "When on, rendering uses less memory at a slight cost of memory time. Memory saved is in the range of 15 to 25 percent. The time cost is about four percent."
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).
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
Buckets: If using a bucket based renderer such as Brazil, Vray
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.
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.
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.
12) 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
13) 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.
Bitmap Size: In the same spirit as #12, 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.
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.
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.
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.