I've got a node setup that uses the red channel of the diffuse map for the roughness. I've described this method here. This works really well for wood textures. The node setup looks like:

enter image description here

I want to export my object to GLTF. To create correct GLTF files, you have to connect one texture that holds the roughness (G), metallic (B) and AO (R) in the different color channels. Therefore the setup I currently have doesn't work. The setup that is needed by the GLTF exporter looks like:

enter image description here

(I'm not 100% sure about the connection to the glTF Metallic Roughness group node; Blender crashes atm when I use this setup).

I use a 2 step procedure now. First I use the setup as described at the top of this post. Then I bake the roughness into a texture. Then use that texture and connect the green channel to the roughness input of the principled bsdf node. Problem is that the generated roughness map contains the roughness in all channels (R,G,B). So when I connect the blue channel to the metallic it uses the same values as the roughness instead.

Is there a better way to do this? Or maybe a way to only bake into one channel? What solution do you use to export GLTF files from blender 2.8?

  • $\begingroup$ Your Occlusion channel should be sourced from the empty R output of the Separate RGB node, not the image node itself. And yes, the glTF exporter doesn't know anything about ColorRamp or Mix nodes, so some sort of baking is required to take them into account. $\endgroup$
    – emackey
    May 28, 2019 at 18:42

1 Answer 1


ok I do kinda understand what you want to achive, you need to do it differently though to get the best possible outcome. you need a CombineRGB node, plug the Rougthness in R, the Metallic in G and the AO in B (if you want to use the Red channel of the diffuse as the rougthness) and then you plug that in to a diffuse node, this then to the output Node setup

then you go over to the baking section, there you select Diffuse (COLOR) Bake tab

Create your image in the image editor and put it into the material you want to bake, make sure its selected Node setup

if you now bake it, you will see that it works, it only uses the color of the diffuse node, not shades, nothing else, just color.

to get the data back you will simply use a SeperateRGB node. Node Setup

  • $\begingroup$ Thanks, this works. Perfect! Did you create two different materials; one where you create the roughness texture (top image) and the one where you use the generated texture? Or did you first bake the roughness, then changed the noodles to the bottom setup? $\endgroup$
    – roxlu
    May 26, 2019 at 18:05
  • $\begingroup$ its all one material that I edited since I wont need the bake material anymore. You sure can create a new one but that will junk up your material list $\endgroup$ May 26, 2019 at 19:29

You must log in to answer this question.

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