Warm tip: This article is reproduced from stackoverflow.com, please click
3d three.js gltf

How can I export GLTF models using KHR_materials_pbrSpecularGlossiness from threejs editor

发布于 2020-04-16 11:55:40

does anyone know how to export models from threejs editor that support the GLTF KHR_materials_pbrSpecularGlossiness extension?

I found that the THREEJS GLTFExporter supports the extension as well as the importer. However, I could not find how to export a 3D object from threejs editor that supports this extension KHR_materials_pbrSpecularGlossiness.

Background: I've created an object with a MeshPhysicalMaterial inside the threejs editor but whenever I export it to GLTF and import it into my app it has a MeshStandardMaterial. I do understand why it becomes a MeshStandardMaterial from looking at the code. However, I'm thinking that using the KHR_materials_pbrSpecularGlossiness extension I might get the importer to use another material.

Thanks for your help

Questioner
Thor_Bux
Viewed
61
Mugen87 2020-02-04 17:47

If you import a glTF model in the editor that uses KHR_materials_pbrSpecularGlossiness, the respective glTF exporter will honor this setting and export the extension again. However, it's currently not possible to force the export to KHR_materials_pbrSpecularGlossiness. GLTFExporter does not provide an option for this.

If you require this feature, consider to make a feature request at github.

three.js R113