Jump to content

Recommended Posts

Posted

I'm having trouble exporting glTF maps from blender, specifically materials that contain metallic map. If I plug a map into the BSDF, the output is split into two files: one for the occlusion, and one for the combined metal/rough. If I don't plug in a map but try to rely on the Metallic slider, it ignores the slider setting and always outputs white (i.e. metallic). I've tried every variation I can think of: has anyone seen the same issue?

Posted

The Blender gltf export doesn't bake anything procedural (setting the slider values to a constant can be considered "procedural" in this situation) and simply finds an image texture connected to the roughness and metallic inputs. If there is none, they output blank white and set the metallic/roughness factor numbers to whatever the sliders are on instead.

If you want a constant value into your exported textures, make a generated blank image texture with the desired gray value and connect that to the input.

  • Thanks 1
Posted (edited)
6 minutes ago, Frionil Fang said:

The Blender gltf export doesn't bake anything procedural (setting the slider values to a constant can be considered "procedural" in this situation) and simply finds an image texture connected to the roughness and metallic inputs. If there is none, they output blank white and set the metallic/roughness factor numbers to whatever the sliders are on instead.

If you want a constant value into your exported textures, make a generated blank image texture with the desired gray value and connect that to the input.

Well, it does seem to ignore the sliders -- even though the manual claims otherwise:

Metallic and Roughness
These values are read from the Principled BSDF node. If both of these inputs are unconnected, the node will display sliders to control their respective values between 0.0 and 1.0, and these values will be copied into the glTF.
 
But beyond that, the process fails even when I plug in a black (or white) image into the socket -- then the metallic/rough output is correct but the occlusion is ignored and instead exported as a separate map. The expected behavior would be to have all three channels exported correctly to a single map.
Edited by Cain Maven
Posted

Hah. I turns out it fails if the names of the input maps contain spaces. I'd say that's a bug. But at least I can work around it.

Posted
1 hour ago, Cain Maven said:

Well, it does seem to ignore the sliders

I didn't actually try to upload them but the .gltf file had the sliders' values set into the roughness and metallic multipliers - the same ones you can adjust on a PBR material inworld.

  • Thanks 1
Posted
9 minutes ago, Frionil Fang said:

I didn't actually try to upload them but the .gltf file had the sliders' values set into the roughness and metallic multipliers - the same ones you can adjust on a PBR material inworld.

I still can't get i to take the sliders into account, but that's not an issue -- I can make blank maps and plug them in as needed.

Thanks for responding! :)

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...