GLB Quality Issue with pnquant 8-bit Compressed Textures
See original GitHub issue@toji FYI, this PR broke model-viewer.
I’ve fixed it by passing { premultiplyAlpha: 'none' }
to createImageBitmap
by default: https://github.com/mrdoob/three.js/commit/7e5d14894e6ef57007faf5903d713b85c97801ef
_Originally posted by @mrdoob in https://github.com/mrdoob/three.js/pull/19518#issuecomment-646912920_
I am generating glTF + bin + textures from FBX using Facebook’s FBX2glTF. After that I am compressing textures using pngquant and re-packaging it as a GLB file using gltf-import-export. Now when I try to load the asset on ThreeJS editor, glTF file loads properly – without any quality issues – but its corresponding GLB file is having quality issues.
The same file loads up fine on donmccurdy GLTF viewer (uses r116) and many other platforms except threeJS editor (using r120) and Google model-viewer (using r120).
I am not sure what has happened between these releases because I remember it used to work fine with older threeJS versions. If anyone knows what has changed in between and how can this be resolved, please help out.
Attaching screenshots for reference.
glTF File on ThreeJS Editor
GLB File on ThreeJS Editor
GLB File on DonMccurdy’s Viewer
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top GitHub Comments
Fix coming in https://github.com/mrdoob/three.js/pull/20376, thanks for the report!
Sample 8-bit PNG File