Even if you don’t have the Baking Sockets exposed in the Group Nodes, you can still bake basically any material.
All you need to do is to bake the output of the last node before it connects to the Shader (in most cases Principled BSDF).
Example:
1. Identify the outputs that are being connected to the principled shader
In this case we have COLOR, ROUGHNESS and NORMAL coming from Color Ramp Color output, Map Range Result output and Bump Node Normal output.
We need to create the corresponding map for each of them in the baking panel (this will later become a baked texture map with the information of the socket we provide)
- Click the “add new empty maps” button (1)
- Select the corresponding map types, in this case “Color, Roughness and Normal” (2)
- Click “ok” (3)
2. SELECT the source node for each map (the information you want baked in those maps), make sure your object is still selected
- Select the Color Ramp node, since this is the source of the COLOR MAP (1)
- Click the “Add Socket” button from the Base Color Map (2)
- Select the correct output from that nodes outputs, in this case COLOR (3)
- click “OK” (4)
Repeat the step for Roughness Map selecting the Map Range node and from it the Result output.
The normal map is a bit more tricky, since it has to be converted from Object Space to Tangent space in order to be baked.
I added a special node group that will do that for you, go to the Shader Tools in the Sanctus Library panel, select the Utils category and select the NORMAL BAKE tool, click add “Add Group Node”.
- Connect the Bump output to the Normal Bake node (1), it doesn’t matter if the Normal_Bake output is not connected to any other node.
- Select it and click the Add Socket button (2) in the baking panel.
- Select the VECTOR output and click OK (3)
*3. Now you are ready to bake *
-Adjust resolution and samples as needed and click the Bake button.
-Once the bake is finished, you can click the Instantiate PBR setup button (1), to add the baked textures already connected to a Principled BSDF (2) and then connect the principled BSDF to the material output (3)
And here we have the baked material replacing the procedural:
NOTE:
If the procedural material is inside a Group Node, you will have to click the icon to go inside the group node (shortcut: TAB)
And expose the sockets you want to bake outside the Group Node:
You can exit the Group Node using the icon on the top right (shortcut: CTRL + TAB)
Post your comment on this topic.