2
$\begingroup$

Completely beginner in blender and 3d graphics in general here.

My goal is to export a blender scene with models and materials (including textures) and import back in three.js scene.

According to here it seems I should use use the KhronosGroup glTF exporter for Blender (the json exporter for Blender seems to be removed). If I got it correctly the only materials that can be exported in glTF format are glTF Metallic Roughness and glTF Specular Glossiness (all the other materials are ignored during export). Thus here is the question: if the Blender scene use other materials like Principled BSDF or other ones, how should I convert them to use the Metallic Roughness or Specular Glossiness to get a result like the originals?

I've tried to do it manually, connecting for example diffuse or normal textures to the respective input in the Metallic Roughness but I got poor results.

Any guideline on how to do this correctly would be appreciated (or any resource which explain how to do it).

$\endgroup$

1 Answer 1

2
$\begingroup$

As of October 2018, glTF 2.0 supports three material types: metal/rough PBR, spec/gloss PBR, and unlit/shadeless.

We are working on adding support for the Principled BSDF node to the Khronos Group Blender exporter. That work is in progress, and happening in a new repository (https://github.com/KhronosGroup/glTF-Blender-IO) which includes both an importer and an exporter. I'd recommend trying that for now. Note that some inputs to the Principled BSDF node (like anisotropy) are not currently part of glTF's metal/rough PBR definition, and will be ignored.

Other material types may be more or less difficult to convert into one of the supported glTF materials.

$\endgroup$
3
  • $\begingroup$ Hi Don, thanks for the ansewer. I've tried to export a Principled BSDF with 4 textures attached (color, metalness, roughness, normal) in glTF but it gives python errors. I can send you the stack trace in case $\endgroup$
    – revy
    Oct 31, 2018 at 11:19
  • $\begingroup$ Thanks! Stack trace would be helpful, or maybe just a screenshot of your material? Feel free to contact me (email listed at github.com/donmccurdy) or open an issue on the GitHub repository. $\endgroup$ Oct 31, 2018 at 19:15
  • $\begingroup$ Ok! I've opened an issue on the repo github.com/KhronosGroup/glTF-Blender-IO/issues/60 $\endgroup$
    – revy
    Nov 1, 2018 at 11:58

You must log in to answer this question.

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