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
19 Comments
Atlast! We can give our node forests a wider use, also speed up renders.
Here it is! Dreamed for it for a long time. Dalai, thank you!
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.
http://yeeeeeeeeeeeeeees.com/
Currently just for Mac?! °Д°
http://nooooooooooooooo.com/
Is it anti-aliased? Please tell me it's anti-aliased...
You can always render at a higher resolution and downsample, if it comes to that.
Dreams come true! ^_______^
Amazing!!
As of the time of writing we have builds for OSX, Linux and Windows. Thank you all :) Have fun testing. A good thread to report some feedback is here: http://blenderartists.org/forum/showthread.php?326534-Cycles-baking-is-here
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...
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 ;)
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.
if i have the displaisment conekted in the input i dont work. :( Sholdi just bake plane image maps?
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..
WHY isn't this standard? It should be a no-brainer!!!
Because it isn't ready yet.
Oh, come on. Hardly anything in Blender is "ready" yet. That's what Blender is all about - trying out the new stuff before it's ready! A glitchy function is better than no function at all, as far as I'm concerned.
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 )