Skip to content

GLB Quality Issue with pnquant 8-bit Compressed Textures  #20362

@ShantanuSriv

Description

@ShantanuSriv

@toji FYI, this PR broke model-viewer.

Screen Shot 2020-06-16 at 2 23 12 PM

Screen Shot 2020-06-16 at 2 23 25 PM

I've fixed it by passing { premultiplyAlpha: 'none' } to createImageBitmap by default: 7e5d148

Originally posted by @mrdoob in #19518 (comment)

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

image

GLB File on ThreeJS Editor

image

GLB File on DonMccurdy's Viewer

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions