panda3d-gltf
panda3d-gltf copied to clipboard
Add support for KHR_materials_pbrSpecularGlossiness
As more and more models are using this extension, I think it's becoming a required addition to the importer.
On itself it's not very complicated to add it, however I'm wondering how to make it work with simplepbr. We could have a global flag in simplepbr to select the workflow, either metallic/roughness or specular/glossiness, but that mean one could not mix models using different workflow in a same application.
I think this would require support for specular textures in Panda. We have "gloss" maps in Panda, but this is a single factor and not a colour.
I would not be opposed to adding M_specular and M_specular_gloss texture stage modes to Panda. The "gloss" slot would be reused to mean "glossiness" in the context (it's not exactly the same, but maybe it's close enough, and having separate "gloss" and "glossiness" would just be confusing).
This would be a change for 1.11 and not 1.10, panda3d-gltf would have to reject this extension when loading models into Panda3D 1.10.
Please file an upstream feature request for these texture modes.
For the record, there is also the KHR_materials_specular extension now, which adds specular maps to the regular metallic-roughness model.
I'm a little annoyed that it has a competing definition of a specular texture, which is scaled by 0.04 (based on IOR of 1.5) but only when it is applied to a dielectric.
That makes me a little unsure about what meaning a "specular" slot should have when added to Panda.