Quick Tip #1: Free Up Memory in 3dsmax

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 (Fig.01).

Fig. 02 d_image_01.jpg

Fig. 01

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 three functions into a small script you can run instead of manually typing it in every time ("FreeMem.mcr"). Right click and select Save As.

Once saved, just run the script from the MAXScripts menu in 3ds Max (Fig.02)

Fig. 03 d_image_02.jpg

Fig. 02


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 and then instead of run, you select open and load the script (Fig.03).



Fig. 04 d_image_03.jpg

Fig. 03


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 (Fig.04).

Fig. 05 d_image_04.jpg

Fig. 04


Then just locate "MyScripts" and drag and drop the Free Up Memory Action to your Toolbar (Fig.05).



Fig. 06 d_image_05.jpg

Fig. 05

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.

And that's it for now.
Stay tuned for some more tips and tricks from me coming to 3DTotal soon!

Fetching comments...

Post a comment