-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GLTFLoader, GLTFExporter: Remove KHR_materials_pbrSpecularGlossiness #24950
GLTFLoader, GLTFExporter: Remove KHR_materials_pbrSpecularGlossiness #24950
Conversation
/cc @takahirox |
I think it's ok to remove them. For users who still need the extension, we can provide the plugins at or somewhere else. |
@elalish following up on #23630 (comment) — the web app https://gltf.report will now do the spec/gloss → metal/rough conversion automatically. The same conversion could be applied in other web-based tools, with: import { WebIO } from '@gltf-transform/core';
import { KHRONOS_EXTENSIONS } from '@gltf-transform/extensions';
import { metalRough } from '@gltf-transform/functions';
const io = new WebIO().registerExtensions(KHRONOS_EXTENSIONS);
const document = await io.readBinary(byteArray);
// spec/gloss → metal/rough
await document.transform(metalRough());
const glb = await io.writeBinary(document); |
I also think it's time 👍 |
SG, thanks @donmccurdy! Now I just need to remember to point people to that tool in our next release notes. |
Also, here's a migration guide for converting existing glTF files: |
It's good to add it to the Three.js migration guide? https://github.com/mrdoob/three.js/wiki/Migration-Guide |
Thanks, I'd missed that it covered r147 already — done! |
@donmccurdy Does |
@elalish the script above, #24950 (comment), will work in a browser, yes. 👍 What I'd do would be to load from the URL or DataTransfer API into glTF Transform, then export a GLB as Uint8Array, and to parse or load from a Blob URL in THREE.GLTFLoader from there. Happy to take questions in discussions as well! |
The Khronos Group archived the
KHR_materials_pbrSpecularGlossiness
extension ("no longer recommended for creating new files") about a year ago. I think it would be reasonable for us to remove support at this point, and focus efforts on the metal/rough workflow instead. All new and upcoming PBR features — volumetric refraction, iridescence, clearcoat, subsurface scattering, ... — are authored around the metal/rough model. With support forKHR_materials_ior
andKHR_materials_specular
, there is no particular advantage left to the spec/gloss model.Existing spec/gloss models can be converted losslessly to metal/rough with:
Related:
Migration guide: