Writing new glb removes clear coat #1156
-
|
So I'm trying to optimize textures (ktx) from a glb exported from Blender. I'm using babylon as render engine. 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)
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
I think there should be warnings in your console about unknown extensions, correct? Extensions are not included in the /core module, they need to be imported and registered: import { NodeIO } from '@gltf-transform/core';
import { KHRONOS_EXTENSIONS } from '@gltf-transform/extensions';
const io = new NodeIO().registerExtensions(KHRONOS_EXTENSIONS);https://gltf-transform.dev/extensions If you're using non-Khronos extensions (EXT_meshopt_compression, EXT_mesh_gpu_instancing, EXT_texture_webp, ...) then you'd instead need to register |
Beta Was this translation helpful? Give feedback.
-
|
Hey @donmccurdy I tried registering |
Beta Was this translation helpful? Give feedback.
I think there should be warnings in your console about unknown extensions, correct?
Extensions are not included in the /core module, they need to be imported and registered:
https://gltf-transform.dev/extensions
If you're using non-Khronos extensions (EXT_meshopt_compression, EXT_mesh_gpu_instancing, EXT_texture_webp, ...) then you'd instead need to register
ALL_EXTENSIONS.