You're blocking ads, which pay for BlenderNation. Read about other ways to support us.

Try Baking for Cycles With this Experimental Branch Now

19

baking for cycles

Dalai Felinto is working part time as a developer for the Blender Foundation. One of the projects he has been spending some time on is baking for Cycles. The process of baking stored lighting, color and other rendering information in UV maps and allows for great speedups further down the pipeline, or for example in real-time 3D content.

So far, baking has only been available for the internal renderer, but this custom Blender version gives you early access to this feature in Cycles.

Dalai also notices another intersting application:

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, Lukas, Thomas and … me (:

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 game engine has never heard of OSL, you can still benefit from it to make your textures and materials look more robust. How cool is that?

At the time of writing, only one unofficial build of this branch is available on GraphicAll, but with your help that could change :)

Links

About Author

Bart Veldhuizen

I have a LONG history with Blender - I wrote some of the earliest Blender tutorials, worked for Not a Number and helped run the crowdfunding campaign that open sourced Blender (the first one on the internet!). I founded BlenderNation in 2006 and have been editing it every single day since then ;-) I also run the Blender Artists forum and I'm Head of Community at Sketchfab.

19 Comments

  1. WOW! THANK YOU! That will be so many saved hours of rendering saved for animations. I was so disappointed it wasn't on Blender 2.70 road map.

  2. Using the graphicall build 6c144bc for windows x64, when I unwrap the cube and run the script I get the following error:

    Traceback (most recent call last):
    File "", line 1, in
    File "C:UsersDesktopBake_Cycles_Win7.x64-6c144bc2.69scriptsmodulesbpyops.py", line 188, in __call__
    ret = op_call(self.idname_py(), None, kw)
    RuntimeError: Error: Problem baking object map

    Am I doing something wrong or is that build problematic?

    Anyway, using a second winx64 build, after complaining that it couldn't save on "/tmp/bake.png", I changed the save address to a random folder and now the error changed:

    File "", line 1
    SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-4: truncated UXXXXXXXX escape

    So I'm not sure if it's me or the windows builds...

  3. And now we have margin support. Margin is 16 by default, so even if you don't tweak the "python script" you should benefit from it:

    bpy.ops.object.bake(type=’COMBINED’, margin=16, is_save_external=True, filepath=”C:\baked.png”, width=512, height=512)

    Poke your graphicall builder to update your Blender ;)

  4. Marc Clint Dion on

    Valve Steam Workshop donations – 2 devs get hired <<<-!!! They have their money's worth already. Games now have some serious diffuse lighting available to them as pre-baked textures. A few sunlamps spread out and pointing down towards the model gives a fairly convincing spherical harmonics lighting effect. To be able to bake this is awesome.

  5. Kittil King Cobra Ursin on

    if i have the displaisment conekted in the input i dont work. :( Sholdi just bake plane image maps?

  6. Kittil King Cobra Ursin on

    If i have the displaisment plugged on on the output node it dont work. Shold i just bake straigt flat images? I dont get it..

  7. Please add Anti Aliasing in normal projection bake !! Game developers really need it. Just try to render hovered torus over the plane and you will see jaggy lines. I wont render image 4x size to get AA in photoshop )

Leave A Reply

To add a profile picture to your message, register your email address with Gravatar.com. To protect your email address, create an account on BlenderNation and log in when posting a message.