latest screenshots

Two new screenshots…

'oceanviz' blender realtime underwater visualization

'oceanviz' blender realtime underwater visualization

'oceanviz' blender realtime underwater visualization

'oceanviz' blender realtime underwater visualization

Blender, Memory issues and 64bit

RAMs are cheap, and that blender project you’ve been working on is taking up too much memory.  So you did the obvious: you bought 2GB of DDR2 memory and put it in the computer, fire up Blender and expect everyting to work as usual, right?

Maybe, maybe not.

Well, if you are still stuck on 32bit for some reason, chances are, you might run into a few memory related problems.  If you are running a 64bit Operating System with 64bit Blender,then you can safely ignore the rest of this post.  In a pure 64bit environment (meaning 64bit CPU, 64bit OS, 64bit app), the memory addressing space is virtually unlimited.   So the more memory you have, the better, 64bit can use it all.

Theory

Addressing Space can be seen as the maximum amount of memory and virtual memory the operating system can utilize. It is independent from the actual amount of RAM a computer has. For 32bit Operating System, the total Addressing space is ALWAYS 4GB, or (2^32 bytes). For 64bit, this number is a LOT bigger: 2^64 bytes is about 16000000 Terabyte.

Think of 32bit as a city where the phone number is 5 digit long.  In such a city, there is approximately 90,000 unique phone numbers, because of this, the number of phones(analogous to physical memory) can not exceed 90,000, it doesn’t make sense to have more phones than phone numbers, since there will be no way of reaching these phones.  Now, in a 64bit city, their phone number is 10 digit long, that gives them about 9 billion unique phone numbers.

32bit Limitations

32bit Windows is designed so that EACH application can only utilize up to half of the 4GB addressing space, or 2GB. (the other half is reserved for the system). Again, this is a software limit inherent to the architecture of the operating system, and has nothing to do with how much RAM is actually installed. This does not cause a problem for day-to-day applications because they usually stay well below this limit. But when working with Blender, especially baking fluids, or rendering high resolution images with composite node, a single application can easily reach 2GB of memory usage. From my testing, Blender crashes at the 1.8GB mark. Remember this is a software limitation due to the design of Windows, you can install 4GB of physical RAM on your computer, and set-aside a 4GB swap file, Blender will still crash at the 1.8GB mark.

Fix

Thankfully there is a fix for the problem:

The fix forces the system to give up 1GB of additional addressing space to the application.  This way, each application can get up to 3GB, while the OS reserves 1GB for itself.

Once you have completed teh above, find a version of Blender that is compiled with the LAA (Large Address Aware) flag. The LAA flag tells the Windows operating system that the application is aware and capable of handling the extra large address space. ‘Official’ Blender releases are now compiled with LAA.

So that’s it. With the above 2 steps, your 32bit Blender should be able to utilize slightly more memory than before.

FAQ
Q: I only have 2GB of physical RAM (or less), should I worry about LAA and /3GB or go 64bit?

A: The short answer is no. It is unlikely that you will truly hit the 1.8GB barrier, since the OS takes up some memory as well, by the time Blender is using 1.8GB of RAM, your computer is probably going very slow, due to the performance hit of using the swap file.  What you should be doing is either optimize the scene or get more physical memory.

Q: Does blender do [rendering, baking, sculpting] faster with more memory?

A: It depends, more memory helps only if you are running out of it.  If Blender is only using 200mb, adding another 4GB of memory will not speed up anything.

Q: I hate you for this lengthy and yet still confusing post!

A: I know.

A Blender visualization

So this is what has been keeping me busy: “OceanViz” is a realtime visualization application running on Blender 2.49a’s build-in game engine.  I, along with a few other artists, created this visualization as part of a research project at the University of British Columbia’s Fisheries Centre in Canada.

Have I been promoting this project to death?  Definitely.  I talked about it in Amsterdam, in Vancouver, online, and pretty much everywhere I get a chance.  But is this cool?  You bet:

View OceanViz in  HD

This video is captured in a rush, I did not even attempt to hide all the debugging cubes or the non-animated species floating around in the scene.  But apart from all that, I am quiet happy with where we are with this project already.  Because what we build is a rather scientific visualization, and not a screensaver, all the fishes are dynamically populated by Python, using a series of XML files for biomass data.  So while it looks quite simple, there is a lot of background coding going on to make it all happen.

Hello World

I am a horrible person.  I would publish stuff (sometimes even useful stuff!) on my website, build up links, and then 6 month later wipe out everything with a ‘website redesign’.  Every since the redesign, I’ve been getting emails requesting files, information, or how-to’s, some of the letters are impressive in length.  Personally when I encounter a website that returns 404, I hit the back space as fast as possible and carry right on, writing well composed emails requesting content from the site author is just so genuinely human that I can’t stand not answering them.

So, my minimalist my portfolio stays, and this blog is created to refill that information void.  Don’t count on too much updates though.  If you need some things to pass the time, I frequent these website:

Blender news: blendernation.com

A software engineer’s insights: codinghorror.com

Inspirational short talks: ted.com

Amazing photo-journalism: boston.com/bigpicture

xkcd needs no introduction: xkcd.com

You think your IT job sucks: thedailywtf.com