Baking is a popular ‘technique’ to flat down your shading work into easy to use images (textures) that can be applied to your 3d models without any concerns with lighting calculation. This can help game development, online visualization, 3d printing, archiviz animations, and many other fields.

Koro, from Caminandes project, fully baked

Koro, from Caminandes project, fully baked

Supported Maps

The Cycles renderer is based on physics based lighting calculations. That means the passes we can bake in Cycles are different than what you may be used to in the Blender Internal renderer. For Cycles we currently support the following passes:

Data Passes

  • Normal
  • UV
  • Diffuse/Glossy/Transmission/Subsurface/Emit Color

Light Passes

  • AO
  • Combined
  • Shadow
  • Diffuse/Glossy/Transmission/Subsurface/Emit Direct/Indirect

Koro Ambient Occlusion Bake Map

Koro Combined Bake Map

The above maps illustrates Ambient Occlusion and Combined baking. Ambient Occlusion can be used to lit the game scene, while combined emulates what you get out of a full render of your object, which can be used in shadless engines.

The character baked here is Koro from the Caminandes project. Koro and all the other production files from Caminandes Gran Dillama are part of the USB customized card you can buy to learn the nitty-gritty of their production, and to help supporting the project and the Blender Foundation.

Open Shading Language

Open Shading Language (OSL) is a shading language created and maintained by Sony Image Works and used by them in many blockbusters already (Amazing Spider Man, MIB III, Smurfs 2, …). It’s a great contribution from Sony to the industry, given that it was released in a permissive license, free to be implemented, and expanded by any interested party.

Blender was the first 3d package outside of Sony to officially support OSL, and since November 2012 we can use OSL in a “Script Node” to create custom shaders. Blender uses OSL via Cycles. The “Script Node” was implemented by Brecht van Lommel, Lukas Tönne, Thomas Dinges and me (Dalai Felinto).

Thus, with baking support in Cycles we get for “free” a way to store the shaders designed with it. In the following example you see the Node Cell Noise sample script from OpenShading.com. So even if your final application is not aware of OSL, you can still benefit from it to make your textures and materials look more robust.

Open Shading Language Baking

For early Testers

There are no official builds of this feature yet. However if you are familiar with git and building Blender, you can get it from this github repository. Clone the bake-cycles branch from the blender-git repository. Once you build you need to UV Unwrap the object you want to bake, select it and run the following script:

import bpy
bpy.ops.object.bake(type=’COMBINED’, is_save_external=True, filepath=”/tmp/baked.png”, width=512, height=512)

If you can’t build your own Blender you can download a build from GraphicAll.org. You can also follow my Blender Foundation Weekly Report to learn about the progress of this feature and to be informed on when the work will be ready and merged upstream in the official Blender repository.

Development Plans

Cycles Baking is part of a larger baking refactor project for Blender. The initial idea is to support features which would help game development such as Baking MapsCage, Blockers and Anti-Alias. Since Cycles baking were to be tackled eventually, we decided to start the work by implementing its bare bones. That would guarantee that later changes on the baking core code would benefit both Blender Internal and Cycles renderers. Cycles baking was also used validate the proposed refactor of the internal baking API, which can eventually be supported by other external render engines as well.

That means Cycles Baking may or may not hit Blender on its own any soon. There are bugs to be fixed, loose ends to be tied. That said, if there is expressive interest in Cycles Baking, the priority can shift to make sure Cycles baking is polished and ‘master’-ready before we tackle the remaining targets. This is yet to be discussed and defined. So, speak up!

Best regards,
Dalai Felinto