2
$\begingroup$

I was super excited to see that baking functionality has finally made it into Cycles. But I'm a bit confused about its usage. There are a lot of options in there. I'm able to get baking working just fine I think, but I'd like to back just a light map. There doesn't seem to be an option to combine bakes (except for one big combination of every thing). So I'm guessing I need to bake multiple maps and merge them in Photoshop. I'm just not sure exactly which ones I need. I'm guessing it would be Shadows, AO, Diffuse Indirect, and Diffuse Direct? Am I missing one? Is there some way to have Cycles bake those four together at once?

As a side question, just because I haven't tried it yet, if I make a second UV channel for my light maps (say one using Lightmap Pack in the UV tools) and set the image that I light map on to use that one while keeping the actual materials on the first one, will that give me the results I want? I don't want my materials to go wonky when I create the second UV set but I've never worked with multiple UV channels before. Certainly not in combination with baking in Cycles.

$\endgroup$
6
  • $\begingroup$ The Combined pass does what you are asking in the first paragraph, if you tried that and it did not work, it would be helpful if you explained what about it looked wrong. For the second question, sure. The uv map node can be used to select the UV set for any individual texture. $\endgroup$ Commented Oct 3, 2014 at 16:12
  • $\begingroup$ The combined pass also baked in the actual image texture that I applied to the model. I'd like to be able to use the result as a light map in Unity. Wouldn't it mess things up if the texture image is overlaid on top of itself? I found this thread with an example output from Beast light mapper which describes what I mean. Beast has no texture image data in the output: blenderartists.org/forum/showthread.php?242197-Lightmapping $\endgroup$
    – John
    Commented Oct 3, 2014 at 16:24
  • $\begingroup$ normally I just add a second node tree within the same Material for things like this. Whichever Material Output node is selected is the one that is used to render/bake to. So you can just bake the lightmaps with a diffuse only material and then click the Material Output node for the colored materials and bake again to a different texture. This way, the same 1 Material can be used for multiple materials and in a way that also has the characteristics of different passes in a way that is easy to select and alter. This does work better for outdoor lighting since the sky can be used as lighting $\endgroup$ Commented Oct 3, 2014 at 17:04
  • $\begingroup$ So basically I'd have a second node with just a white diffuse? I thought about that, but then wouldn't I lose all of the bounce light data that comes from having properly colored materials? It still seems like combining the separate passes is the best option, but I'm just not sure which of the options are related to light and which aren't. I know what works in my simple scene but I don't want to miss anything. $\endgroup$
    – John
    Commented Oct 3, 2014 at 17:56
  • $\begingroup$ Basically I think you just want the direct and indirect passes, which you can then combine. Though if you have diffuse, subsurf scatter, glossy, and transmission in your materials, that will be quite a lot of baking. . . You might be better off baking combined, then subtracting the color passes (which will result in the same thing). $\endgroup$
    – gandalf3
    Commented Oct 3, 2014 at 18:00

2 Answers 2

2
$\begingroup$

We are doing the exact same thing, although my approach to the problem is slightly different. Like you I created a second UV channel for the lightmap while handling the other materials on the first one. Once I unwrapped the object to the second UV channel I duplicate the entire object, remove all the materials from the clone and add a simple white material to it. Then things start to get a bit complicated. Let's say there are several objects, for example a wall, a floor and a ceiling. When I bake the wall, I activate the clone of the wall, while hiding the original wall object. The original floor and ceiling objects stay active while their clones are hidden. This way you can retain the bounce light data that comes from the unchanged original objects. It is basically the same procedure as having a second node tree in the materials except that you're switching on and off objects instead of node trees in every material on the scene. I'm not sure if this is the smartest way to do it, but I don't have to bake several passes this way...

$\endgroup$
1
  • $\begingroup$ That works, I use something similar now. However this becomes inaccurate if the object is not convex and is bouncing light onto itself. Changing its material to white changes the lighting then. Is there any better way to do this in Blender since 2014? $\endgroup$
    – Arek
    Commented Dec 13, 2016 at 13:46
2
$\begingroup$

Simple node setup for lightmap baking: Node setup

Basically, the diffuse color is only present in the indirect lighting, this way everything is correctly contributing. You just have to multiply your diffuse textures with the final lightmap.

The emission shader is only present for previewing the lightmaps here, connect the diffuse for baking.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .