Blog

Quick Tip 1: Free up memory in 3ds Max


Welcome to the first of hopefully many Quick tip tutorials on this blog. The quick tips are basically various tips and trick that I feel don’t warrant a full tutorial. So without further ado here is Quick Tip 1:


If your Max scene is getting sluggish or you run out of memory when you try to render. There are a few script functions that might help you out.

  • gc() Garbage Collection.
  • freescenebitmaps() Cleans up in texture memory.
  • clearUndoBuffer() Removes your Undo’s.

Just type the one you want in the lower left text field in max and press return.

Note: If you have windows task manager open and monitoring 3ds Max memory use, you can see the result straight away.

And that is pretty much it… if you want to go further and make the functions more accessible read below on how to make it into a script that you can run directly from a button on your Toolbar.



Making it a script


I put all 3 functions into a small script you can run instead of manually typing it in every time.

Script Right click and select save as:

Once saved, just run the script from the MAXScripts menu en 3ds Max…


If you want a more permanent solution you can create a button on your Toolbar with the script. All you have to do is open the script, instead of run, you select open and load the script.


Once the script is open you have to run the Menu>Evaluate all (Ctrl-E) from the MAXScript menu bar. (in older versions of Max the Evaluate All is under File in the menu)


To add the script to a button all you have to do is right-click in the Toolbar and select Customize…


Then just locate “MyScripts” and drag and drop the Free Up Memory Action to your Toolbar.


Once the button is created you can change the text and add a logo instead if you want. Just right click the button and select “Edit Button Appearance” there are a bunch of icons to choose from.

That’s it for now… find more tips and tricks here.

  1. KrakatoaKrakatoa11-16-2010

    Hi! Thanks for you tips!

  2. JorgeJorge11-16-2010

    Yeah, they’re very good. In fact Max performs a clearUndoBuffer() itself without warning, right before you need to undo 10 actions :)

  3. BehnamBehnam05-09-2012

    Jorge, you’re right, but sometimes even undo 1 big action in big scene is a lot. So this script help you to clear everything just before running a big task like render.

  4. ranran08-08-2012

    hi thanks for the tip.. Question though is it possible to connect an external hd to increase memory?

  5. JamesJames05-30-2013

    Big thanks! Shaved a whole 1GB of RAM during render thanks to this! Certainly worth trying and sharing! :)

  6. JackJack05-07-2014

    thanx bro :D

Leave a Reply