Skip to content

Issue with quantization and KHR_materials_volume #328

@donmccurdy

Description

@donmccurdy

Originally reported at mrdoob/three.js#22343, but it appears that the renderers are correct and both gltfpack and gltf-transform have a similar issue in quantizing models using the KHR_materials_volume extension. When compressing or quantizing this example:

129646713-e7bcbbd7-6205-49e3-919c-0baac4d6e044
Screen Shot 2021-08-16 at 9 39 20 PM

Left: Original. Right: gltf-transform. Below: gltfpack.

https://github.com/mrdoob/three.js/files/6996178/Archive.zip

...the boxes should all be the same color, before and after compression. Instead they get lighter (for non-normalized vertex attributes) or darker (for normalized vertex attributes) because the node's scale affects the material.thicknessFactor property. I believe it's necessary to apply the inverse of the node's scale to the thickness, to compensate.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions