1

I'm trying to compress a glb file with gltf pipeline module ( https://github.com/CesiumGS/gltf-pipeline )

The original glb file looks like the following:

enter image description here

I'm compressing glb model with the following script:

const getCompressedGltfFile = async (glb) => {
  try {
    const compressedFile = await processGlb(glb, {
      dracoOptions: {
        compressionLevel: 10,
      },
    });
    return compressedFile.glb;
  } catch (error) {
    console.log("compressingGltfFile failed:", glb, error);
    return glb;
  }
};

After the compression, the model looks like the following:

enter image description here

Is there any way I can compress glb model without creating weird edges?

masanorinyo
  • 1,098
  • 2
  • 12
  • 25
  • 1
    gltf pipeline has a range of options, but the only one specified above is `compressionLevel: 10` (i.e. most aggressive compression). Since we don't have the model you'll have to try these out yourself, but I'd suggest trying combinations of: lower compressionLevel, higher quantizeNormalBits, higher quantizePositionBits, and perhaps unified quantization. – Don McCurdy Mar 29 '22 at 16:53
  • 1
    I set 20 to quantizePositionBits and it fixed the issue!! Thank you so much! – masanorinyo Mar 30 '22 at 06:11

0 Answers0