-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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: Add KHR_materials_volume and KHR_materials_ior extensions support #22117
Conversation
f368628
to
bfdb5ac
Compare
Thanks! |
Hmm, seems like the shader has some overblown colors? Screen.Recording.2021-07-13.at.11.44.57.movI think it's the same issue as number 3 in @WestLangley list? #22009 (comment) |
It is issue number 7 in @WestLangley list. #22009 (comment) |
@WestLangley Sure is! #22125 |
Regarding the glb file you shared. Did you cut off specular color texture? According to the repository it seems to have specular color texture. I need it for testing |
That turned out to be the issue in donmccurdy/glTF-Transform#286 yes, had implemented a pre-release version of the spec. I'll regenerate the file later today, or this should work on the most recent gltf-transform release:
|
Two versions here: IridescentDishWithOlives.glb.zip |
Thanks! Do you mind if compressing the textures? The file size is a bit too huge 7.5MB and I'm wondering if we can reduce the size more. |
Sure, got this down to about 4MB with squoosh.app/ - |
Thanks so much! |
The textures in the glb file don't seem to be compressed because no |
Ah, I just used OxiPNG and MozJPEG compression in this case, not Basis. Would take a bit more time to get KTX2/Basis fine-tuned for these textures I think, and may or may not reduce the file size as much. Can give that a try if we want it but it will be a couple days. |
OK OK, that's fine if it's intentional. Thanks! |
which software currently supports the export of volumetric GLTF models like this : https://github.com/wallabyway/gltf-presskit-transparency/blob/main/docs/MosquitoInAmber_withRefraction.glb ? Afaik Blender is not ready yet .... |
These extensions were just announced as ratified/complete this week, it'll take a bit longer for implementations to arrive in DCC products. Gestaltor (https://ux3d.io/gestaltor) is the only one I'm sure of at the moment. Perhaps Adobe Dimension, but I don't have access to a copy to check. PRs to https://github.com/KhronosGroup/glTF-Blender-IO are always welcome too, IOR and Specular are in progress (KhronosGroup/glTF-Blender-IO#1158) but I don't think anyone has started a PR for volume yet. A more roundabout option would be to export the extra volumetric textures from Blender separately, then use a script to attach them to the glTF file. |
Hello @takahirox, Thanks for the PR! I found that current example has gaps if look from side view or back view: |
OK, I re-commented there. |
Description
This PR adds
KHR_materials_volume
andKHR_materials_ior
extensions support and updates thewebgl_loader_gltf_transmission
example.The video of this PR with #22116.
transmission.mp4
I replaced the TransmissionTest model in
webgl_loader_gltf_transmission
example with IridescentDishWithOlives.