Having Problems Baking Multiple Multiple Material Types.

Hi folks. I’m having problems baking multipe materials from the same object. I started experimenting by making some very basic test cases because I seemed to be getting weird results with some bake attempts. On YouTube, there are many videos that show how to bake using the combined setting (which is useless for what I want to do,) but I can’t find any useful videos on baking for use with animation. From what little I’ve been able to figure out through simply trying things out, I get the strong impression that it’s only safe to bake a material’s diffuse and stick it in a Diffuse BSDF node. You can bake other things, but only if you know that their lighting conditions will never change: which I would expect is not very often. I thought about some ways of mitigating the problems of sticking baked textures into emission BSDF nodes for the parts of a scene which would fit that description, but before I move on to experimenting with those ideas, I have some much more basic problems that I can’t seem to solve.

At the moment, I’m simply trying to bake the colour component of an object’s Diffuse material to one image, and the colour component of the same object’s Subsurface Scattering material to a different image. The intention is to plug the respective UV images into the colour inputs of their corresponding BSDF node, so that a render is produced that is identical to (what is imagined to be) computationally expensive un-baked version.

The following image is a screenshot of Blender after it has baked the colour of the Subsurface Scattering material to the “SubSurf” UV image (top-left viewport.) As expected, the colour from the Subsurface Scattering is baked correctly and the diffuse sections of the object in the image are made transparent. The thing that baffles me, though, is that the UV image that’s supposed to capture the Diffuse is also drawn into despite it being a separate image: it is transparent where there’s SSS material, and black on the Diffuse. The really frustrating bit is that when I then hit the bake button to bake the diffuse, both images are changed again: just that now the diffuse is baked successfully and the Subsurface Scattering image is turned black in the parts of the mesh with a diffuse material.


How am I supposed to bake different types of map for an object if Blender keeps overwriting image textures I’ve specifically gone back into a material to deselect in an attempt to make it leave that particular image texture alone?

UPDATE: Came back to it this morning and tried deselecting both image texture nodes in their respective materials, fully expecting Blender to complain about there not being any active image textures in the materials if I were to hit Bake, but it didn’t. It just started writing to both image textures as if they were to active nodes in their respective materials.

you’re saying Blender bakes on 2 images at a time ? I don’t see how that’s possible since you only have one Bake Type slot. So it can be either Subsurface or Diffuse but not both.
In any case, it seems you successfully baked both separately, so why sot save each image when it’s correctly baked ?

I’m guessing I have misconceptions that need to be dispelled. I’m trying to bake the diffuse colour on to one UV image, and then bake the subsurface colour to the other UV image. The problem I have is that, when I try to bake the colour of the object’s diffuse material, the diffuse colour get’s successfully baked to the UV image that I created to capture the diffuse colour, but at the same time that the diffuse sections are written to the diffuse UV image, the UV image that’s supposed to capture the colour of the subsurface material is filled in with black wherever there are UVs that do not have a diffuse material assigned to them.

The thing is that the Image Texture node that’s inside the Subsurface material’s node setup is deselected on purpose, to try to make sure that blender has absolutely no reason to attempt to write to the image that the node references: but the bake process still writes to the image anyway. If I then try to bake the colour of the material I have not yet baked (by selecting/deselecting the corresponding image texture nodes in the respective material node setups and selecting the other Subsurface/diffuse option in the bake settings) then, again, both images are written to: and so messing up the results from the previous bake.

I tried making this simplified test-case because I have other objects that have multiple materials of various types (diffuse, subsurface, gloss etc.) and, when I tried to bake the various BSDF output colours to a single UV image, I kept getting these blackened UV islands, so I just simplified what I was trying to do by making this sss-baketest1.blend (540 KB) file with a simple mesh and two materials.

First, you don’t need to put a “frame” driver https://raw.githubusercontent.com/ChameleonScales/Blender-individual-icons/master/PNG-16x16/ICON_DRIVER.png in Seed, you have the little clock https://raw.githubusercontent.com/ChameleonScales/Blender-individual-icons/master/PNG-16x16/ICON_TIME.png next to it just for that.

Now for the baking, I get it now. It’s because baking is object-based, not material-based. So if your object has multiple materials assigned to different parts of your mesh, it will need an image texture node in each material (if you delete the image node from either material the baking will stop https://raw.githubusercontent.com/ChameleonScales/Blender-individual-icons/master/PNG-16x16/ICON_ERROR.png).

However about the node being deselected and still baked that’s another story.
A node can be deselected and still be active, that’s normal in Blender. But if you select another node (like the Material Output node), then the Image Texture node cannot be active and this should stop the baking https://raw.githubusercontent.com/ChameleonScales/Blender-individual-icons/master/PNG-16x16/ICON_ERROR.png. For some reason it doesn’t. I tried from a new file and the same behavior happens. Maybe I wasn’t aware of that or there was a change in the recent versions.

In any case you don’t have to worry, since as I said you can save each image result to a file. So you just have to save the right one in each case and refresh the one that’s been re-baked onto with the reload button https://raw.githubusercontent.com/ChameleonScales/Blender-individual-icons/master/PNG-16x16/ICON_FILE_REFRESH.png to retrieve the file you saved (because baking doesn’t overwrite the file).

Awesome. Thanks, man. That was so confusing it was driving me crazy.

No Problem. Don’t forget to tag your problems to “solved” when they are.