Tuesday, July 12, 2011

Blender 2.58 Ambient Occlusion Baking Problem

UPDATE (2011_Jul_13):


Someone posted a reply below, I'm assuming his alias is lmg. He pointed out a cool workaround to this problem; by selecting all the meshes in the scene and have the AO receiver the active selection, then do the Baking. It works quite well! And I'm pretty satisfied with this method too, where you can isolate objects you don't want to create occlusion (if ever there's a need for that).


Thanks, lmg! ^_^



... and a workaround to that.

With the release of Blender 2.58.1 just a few days ago, I was very eager to use it as my production version of Blender, after having used 2.57 for quite a while.  Please note though that this 2.58 version of Blender is the stable release which is downloadable from the Blender downloads section, since I don't have the luxury of time to doodle around and compile Blender 2.58 just yet due to hectic deadlines.  I have been recently working on realtime architectural visualizations and this could imply some basic texture baking, uv-mapping, and stuff like that.

I was quite pleased with the release of 2.58.1 but found out a rather unlikely error with regards to baking AO maps.

Here's usually my workflow:

  1. I link in my objects that would create the occlusion effect on my prop.  For example, I would link in a sphere, a cube, and a suzanne object (either individually as objects or wholly as a group) to my plane prop.
  2. I then create a uv-map for the plane with a corresponding new image that will contain the later-to-be-baked AO map.
  3. I make the necessary materials and textures (with mapping settings, influences, etc.)
  4. I proceed to the World context and set the Ambient Occlusion settings (as seen in the screenshot below).  Most of the time, I use Raytraced AO and set a sample between 10 to 15; falloff is enabled depending on the effect I want to achieve.
  5. I click the Render Context and scroll down over to the Bake subcontext and select Ambient Occlusion as my Bake Mode with Normalized enalbled. 
  6. Finally, I hit the "Bake" button which does the actual processing of the AO map. 
(Blender 2.58.1 with AO not properly baked)

(Blender 2.57.1 with AO baked as normal)


This works quite well on the 2.57 version of Blender but when I tried it on 2.58, it just didn't work, the occlusions happen internally on the object.  A workaround I found out to fix this is to merge the objects I have linked in to the prop file.  This is a very destructive workflow indeed and not safe if you are linking things and wanted to maintain their hierarchy.

Please, if anybody else knows of a quick solution to this in Blender 2.58.1, I would greatly appreciate it if you could tell me.  Otherwise, it remains a mystery to me.  Or probably, it's just a changed system that I was not quite aware of. ;)

Hit me if you know the solution.  Thanks!

Credit goes to my friend Michael De Leon for pointing out the version regression workaround.

-Reyn

4 comments:

Anonymous said...

Reyn, can you try to select all the objects (and have the one you wanna bake to active) and see if that works?

you might have found a bug/glitch there.

cheers, lmg

Unknown said...

lmg: Thanks so much! That worked like a charm! Is that workaround documented elsewhere? Otherwise, IMHO, it's a nice feat, where you can selectively tell the baker to only create AO on those objects you wish to and not as an entire thing.

Thanks! Greatly appreciated.

-Reyn

Doug Turner said...

I have a similar problem, wherein I've joined several objects, created a new uv layer and baked. 2.58 only bakes ao for the joined geometry, and ignores other objects touching it, which should create ao. I tried a test, a cube without a top, with a cube in the middle of the floor (separate objects). I baked ao for the cube / no top. No problem. It seems to be an issue with joined objects not recognizing other objects. I tried selecting everything, making the joined objects the active object, then baking. No dice. Back to 2.57 I go.

Unknown said...

Doug Turner: I hope that gets fixed in 2.59.