Brian Smith Posted July 3, 2008 Share Posted July 3, 2008 I recently mentioned this tip in a class and based on the fact that no one knew it, I thought it would be worthwhile here. If you are rendering a very large scene and are getting close to running out of RAM, here's a way that will save you a few hundred extra MBs from being consumed without slowing down rendering at all like other procedures (such as rendering in dynamic mode or with proxies). 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. Link to comment Share on other sites More sharing options...
FlytE Posted July 3, 2008 Share Posted July 3, 2008 Its the little things! Nice one Brian, thanks! Link to comment Share on other sites More sharing options...
Claudio Branch Posted July 3, 2008 Share Posted July 3, 2008 Great tip, thanks! Link to comment Share on other sites More sharing options...
Ray Posted July 3, 2008 Share Posted July 3, 2008 Thank you, Brian! Keep 'em coming. Link to comment Share on other sites More sharing options...
Brian Smith Posted July 3, 2008 Author Share Posted July 3, 2008 Thank you, Brian! Keep 'em coming. 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. Link to comment Share on other sites More sharing options...
odouble Posted July 3, 2008 Share Posted July 3, 2008 Really interesting... I am going to try it right now. Thanks Link to comment Share on other sites More sharing options...
John Dollus Posted July 3, 2008 Share Posted July 3, 2008 or use the batch renderer and eliminate the entire overhead associated with the UI.... Link to comment Share on other sites More sharing options...
Dave Buchhofer Posted July 3, 2008 Share Posted July 3, 2008 I recently mentioned this tip in a class and based on the fact that no one knew it, I thought it would be worthwhile here. If you are rendering a very large scene and are getting close to running out of RAM, here's a way that will save you a few hundred extra MBs from being consumed without slowing down rendering at all like other procedures (such as rendering in dynamic mode or with proxies). 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. close the material editor also, as those bitmaps also get loaded into ram at startup/open. another way without reopening max to do roughly the same thing is to: in the little pink maxscript bar at the bottom left hand corner type: freescenebitmaps() hit enter gc() hit enter again minimize max maximize max Also be aware that the real memory ram usage number you're looking for isn't visible by default in the task manager, if go to View, Select Columns, and look for VM Size. thats the combined RAM+Virtual memory. if you're in max 32bit, and that number hits 1,700,000 roughly, you can kiss max goodbye slowly thats becoming less of an issue with 64bit, but not everyone has taken that plunge. Link to comment Share on other sites More sharing options...
Brian Smith Posted July 3, 2008 Author Share Posted July 3, 2008 Also be aware that the real memory ram usage number you're looking for isn't visible by default in the task manager, if go to View, Select Columns, and look for VM Size. thats the combined RAM+Virtual memory. if you're in max 32bit, and that number hits 1,700,000 roughly, you can kiss max goodbye slowly thats becoming less of an issue with 64bit, but not everyone has taken that plunge. I find it much easier to just monitor the Available RAM under the Performance tab. Link to comment Share on other sites More sharing options...
Ruramuq Posted July 4, 2008 Share Posted July 4, 2008 I can't notice a difference with this tip, this memory issues seems to be more about textures and geometry : › Global Viewport rendering settings : standard display Max loads viewport textures only when they are visible, so, perhaps moving the viewport away would give similar memory improvements Another thing to notice, is that if max is minimized,a big amount of 3dsmax memory will be released, or marked as free, which means that virtual memory will be used, thats the reason why I try to never minimize max when I'm working with it, (I don't want xp reading the paging file) but even if you release a lot of memory deactivating textures, etc.. the most likely is that if the render engine needs more ram, windows will paginate automatically, and the memory used for the viewport will need to be reloaded by max when the render ends, in other words, it's likely that these tips might not be a big benefit for the render.. another thing is that big textures seems to be loaded completely, and with several textures displayed on the viewport, textures sizes matters. it is probably a good idea to reduce the texture size of objects that are far away or too little(this for render and viewports). I tested with different color depth and it seems that there is a benefit in the viewport but not when rendering there are a couple of tools i use › Process explorer(much better than task manager) and › RAMpage, it displays and is able to release or defragment automatically the memory to avoid crashes. I also read that memory fragmentation is another cause of max crashes. my first post Link to comment Share on other sites More sharing options...
odouble Posted July 4, 2008 Share Posted July 4, 2008 I did notice that less RAM was being consumed with Brian's suggestion in my test scene. I don't know how much of that translated into making the rendering faster cos' i kept getting similar rendering times from previous used settings in Mentalray. However increasing the bucket width in the renderer tab reduced the render time noticeably. Link to comment Share on other sites More sharing options...
Brian Smith Posted July 4, 2008 Author Share Posted July 4, 2008 I can't notice a difference with this tip, this memory issues seems to be more about textures and geometry : › Global Viewport rendering settings : standard display Max loads viewport textures only when they are visible, so, perhaps moving the viewport away would give similar memory improvements Another thing to notice, is that if max is minimized,a big amount of 3dsmax memory will be released, or marked as free, which means that virtual memory will be used, thats the reason why I try to never minimize max when I'm working with it, (I don't want xp reading the paging file) but even if you release a lot of memory deactivating textures, etc.. the most likely is that if the render engine needs more ram, windows will paginate automatically, and the memory used for the viewport will need to be reloaded by max when the render ends, in other words, it's likely that these tips might not be a big benefit for the render.. another thing is that big textures seems to be loaded completely, and with several textures displayed on the viewport, textures sizes matters. it is probably a good idea to reduce the texture size of objects that are far away or too little(this for render and viewports). I tested with different color depth and it seems that there is a benefit in the viewport but not when rendering there are a couple of tools i use › Process explorer(much better than task manager) and › RAMpage, it displays and is able to release or defragment automatically the memory to avoid crashes. I also read that memory fragmentation is another cause of max crashes. my first post i never said this would speed up rendering...this only reduces the amount of RAM consumed. you dont have to be using large textures to benefit either...I rarely use bitmaps more than 800 pixels across. i don't know why you dont see the benefit, because i see it on all my large scenes. of course textures being loaded is a big part of the RAM being consumed. in fact, if you set all your objects to display as a box, save the scene in wireframe mode, then load it again, when you switch to Smooth + Highlights you will see a huge drop in RAM even though the viewport doesnt change at all. it's because it not loading the maps into memory. Link to comment Share on other sites More sharing options...
Brian Smith Posted July 4, 2008 Author Share Posted July 4, 2008 I did notice that less RAM was being consumed with Brian's suggestion in my test scene. I don't know how much of that translated into making the rendering faster cos' i kept getting similar rendering times from previous used settings in Mentalray. However increasing the bucket width in the renderer tab reduced the render time noticeably. again, it doesnt speed up rendering...it just saves RAM. reducing the bucket width will speed up rendering to a point. there is a certain number of steps that must be executed when a bucket is rendered and the few number of times it has to do those overhead steps the better..until you get so big that some of your processors arent being used because there arent enough buckets left to render. if you have four processors, there would be no reason to make your bucket size equal your rendered window because 3 of your buckets wouldnt be doing any work. Link to comment Share on other sites More sharing options...
vizwhiz Posted July 4, 2008 Share Posted July 4, 2008 is it a 'good' Technique To use exponential multiples of 2? 256, 512 and etc numbers for better (less) memory usage what is The optimum bitmap Texture size? Link to comment Share on other sites More sharing options...
odouble Posted July 4, 2008 Share Posted July 4, 2008 again, it doesnt speed up rendering...it just saves RAM. reducing the bucket width will speed up rendering to a point. there is a certain number of steps that must be executed when a bucket is rendered and the few number of times it has to do those overhead steps the better..until you get so big that some of your processors arent being used because there arent enough buckets left to render. if you have four processors, there would be no reason to make your bucket size equal your rendered window because 3 of your buckets wouldnt be doing any work. In that case it definitely saved RAM on my system. Link to comment Share on other sites More sharing options...
blowback Posted July 4, 2008 Share Posted July 4, 2008 thanks brian...... it is the little things isn't it. Link to comment Share on other sites More sharing options...
Dave Buchhofer Posted July 6, 2008 Share Posted July 6, 2008 ya, its not useful too often, but its good to know for that file thats just on the edge of being renderable though in the age of proxy objects and bitmap pagers its not as much needed as it used to be Link to comment Share on other sites More sharing options...
Brian Smith Posted July 6, 2008 Author Share Posted July 6, 2008 ya, its not useful too often, but its good to know for that file thats just on the edge of being renderable though in the age of proxy objects and bitmap pagers its not as much needed as it used to be i would have to argue against that point. You can make an entire scene dynamic, but it will always take much longer to render. by leaving more RAM available for static geometry, you dont need to set aside as much for dynamic...which will always translate to quicker renders. so i guess thinking about it more, it can make scenes render faster too...that is for scenes that max out of RAM. Link to comment Share on other sites More sharing options...
own1221 Posted July 6, 2008 Share Posted July 6, 2008 how do i know if max has run out of RAM? I only have 1gb so I'm sure i wont always have enough, I gues if max crashes it might be out of RAM Link to comment Share on other sites More sharing options...
John Dollus Posted July 7, 2008 Share Posted July 7, 2008 is it a 'good' Technique To use exponential multiples of 2? 256, 512 and etc numbers for better (less) memory usage what is The optimum bitmap Texture size? Here is an older article regarding texture resolution but explains it pretty well: http://www.archvision.com/Tutorials.cfm?Tutorial=tutorials/UsingTexturesWisely/UsingTexturesWisely.cfm The older Maya docs had some great info on this as well regarding the resolution multiplier and RAM consequences but I don't have access to it any longer. Link to comment Share on other sites More sharing options...
Brian Cassil Posted July 7, 2008 Share Posted July 7, 2008 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. You have to be a little carefull about this one. I've done this not remembering that my scene has some renderable splines in it, which get hidden when turning off the shapes category. I really wish max would categorise renderable spline as meshes rather than shapes for this and other reasons. Link to comment Share on other sites More sharing options...
Brian Smith Posted July 7, 2008 Author Share Posted July 7, 2008 You have to be a little carefull about this one. I've done this not remembering that my scene has some renderable splines in it, which get hidden when turning off the shapes category. I really wish max would categorise renderable spline as meshes rather than shapes for this and other reasons. good call...i don't personally like or use them very often but to each their own Link to comment Share on other sites More sharing options...
Ray Posted July 8, 2008 Share Posted July 8, 2008 good call...i don't personally like or use them very often but to each their own Also be careful if you have 'hidden lights' unchecked in vray global switches. Your lights won't render if you check the 'lights' box under the display tab. Link to comment Share on other sites More sharing options...
louis.cho Posted July 8, 2008 Share Posted July 8, 2008 You have to be a little carefull about this one. I've done this not remembering that my scene has some renderable splines in it, which get hidden when turning off the shapes category. I really wish max would categorise renderable spline as meshes rather than shapes for this and other reasons. I personaly prefer to use the Sweep modifier: Much more control and more stable. Link to comment Share on other sites More sharing options...
Ricardo Eloy Posted July 8, 2008 Share Posted July 8, 2008 Interesting tip, Brian. I would have thought now that Max is making decent use of OpenGL and Direct 3D, the viewports would not make use of much RAM... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now