Skip to content

Writing new glb removes clear coat #1154

@mpaleo

Description

@mpaleo

So I'm trying to optimize textures (ktx) from a glb exported from Blender. I'm using babylon as render engine.
For some reason when I read and write the new optimized glb, it removes clear coat values.
At first I thought it was an issue with toktx but then I removed that portion and still no clear coat values in babylon.
Is there any config value missing ?

import {NodeIO} from '@gltf-transform/core'
import {toktx} from '@gltf-transform/cli'

export const optimizeGLB = async (buffer) => {
  const io = new NodeIO()

  const document = await io.readBinary(buffer)

  // await document.transform(
  //   toktx({ mode: 'etc1s', quality: 155 }),
  // )

  return io.writeBinary(document)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions