0
$\begingroup$

Some materials in Blender Kit can't be baked. Blender can make bake texture only with bsdf node. But when I use Ambient Occlusion or materials that use mix shader after Principle BSDF I can't connect it to new Principle BSDF, and it go raw line to Material Output. Because of it I can't bake correctly all materials. How to fix shader node to make bake materials.

  1. object with material Rust, 2) object tried fit in Principle BSDF, 3) model baked and applied textures. 1 object with material Rust, 2 object tried fit in Principle BSDF, 3 model baked and applied textures.

Baked with addon TexTools Bake with addon TexTools

Baked with Cycle bake color Bake with Cycle bake color

It doesn't matter, which way I bake by addon or Cycle bake, result the same. It makes only BSDF, and if put mix shader between Material Output and BSDF, it will not anything good bake. For example here it doesn't bake Rust material from Blender kit, it bakes something black. But all material that have line from BSDF to Material output will make good bake.

$\endgroup$
6
  • $\begingroup$ What are you talking about? First of all, please define "bake" - what do you want to bake? You can bake properties of a material. Which ones do you want to bake and why? Secondly, obviously you cannot bake invalid node setups, and you cannot plug shader output to color input, because that makes no sense. It will not render, so it's no surprise it will not bake. $\endgroup$ Commented May 4 at 18:10
  • $\begingroup$ I want to bake one after one Base Color, Metallic, normal, roughness. But you can see first object has after Mix Shader to Material Output. But to bake before Material Output should be Principle BSDF. But you see if I put Principle BSDF between it has a lot of channels; Color, Metallic, ... But if first object bake it, it make third object, that black box. $\endgroup$ Commented May 4 at 18:16
  • $\begingroup$ Why do you need Principled BSDF for baking? Are you using any add-ons? I fail to follow what you actually want to do here. If you want to bake, you create an image texture, make it active, connect something to Material Output, chose baking options and bake. It doesn't matter what type of bake it is, just that it's what you need. You can bake Roughness texture using emission node and emit baking. Shader is important only if you need to bake some lighting effects. $\endgroup$ Commented May 4 at 18:33
  • $\begingroup$ Yes, I use addon TexTools. And if I use Cycle Bake by selected Image texture, result same. $\endgroup$ Commented May 4 at 18:38
  • $\begingroup$ You need a working material that you want to bake. A valid Material Output. Edit the question and provide all relevant information. If you use an add-on to bake and ask a question about baking, you have to mention that. How else are people going to know what you are talking about? $\endgroup$ Commented May 4 at 19:00

2 Answers 2

1
$\begingroup$

Only Textools, not Blender, needs a material to finish by a Principled BSDF.

And this requirement does not mean you have to put a Principled BSDF at the end of any material that doesn't have one: it's unlikely to work. That Principled BSDF you plugged at the end can't receive a shader data in its color input.
But it means you have to adapt the whole material to function with a Principled BSDF at the end, or not use Textools for baking that material.

At least your material seems pretty straight forward, so adapting it seems a good option here. But on some more complex materials, it might just not be one.

Let's take this mockup:

enter image description here

What we essentially have in your case is just two Principled Shaders, each with their own settings, mixed together with a texture as factor. You could obtain the same result by having one Principled, but its settings coming from two sources mixed together with the same texture.

When the settings come from nodes, like the normals, you can simply add a Mix RGB node, set it to Vector, plug the two normal maps with the textures, and you're good to go:

enter image description here

When it's float values like the Metallic or Roughness settings, you can use a Mix RGB node, set it to Float instead of Color, and copy-paste the Metallic or Roughness from the Principled BSDF nodes before plugging the mix node, and using again the same texture as factor:

enter image description here

The final result is a material that properly terminates on a Principled BSDF as which Textools can bake properly:

enter image description here

$\endgroup$
0
$\begingroup$

It looks like you have no light sources in your scene. When you bake the Diffuse pass (as per your screenshots), then all diffuse light that gets reflected from your object is baked to the selected texture. If you have no light sources and the world is set to black, then the diffuse reflection from your object will be a uniform black. Also lookout for hidden occluding geometries. In your screenshot I can see that you have a disabled Collection, but it has been my experience that sometimes geometries that are disabled in this way are still considered for rendering. It would be safer to toggle 'Disable for Rendering'. The shader setup should not matter that much, you can be as creative as you like. Hope this helps!

$\endgroup$

You must log in to answer this question.

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