Closed Samsy closed 4 months ago
Hello hello !
Did discover an issue with prune.
Using this model : https://github.com/Samsy/glbs/blob/main/testitest.glb
Original :
This transformation using 4.0.0-alpha.7 tested on both Nodejs package + CLI / same version :
`import { Document, NodeIO, VertexLayout } from "@gltf-transform/core"; import { KHRONOS_EXTENSIONS, EXTTextureWebP, EXTMeshGPUInstancing } from "@gltf-transform/extensions"; import draco3d from "draco3dgltf"; import { prune, dedup, resample, simplify, metalRough, draco, weld, // textureCompress, instance, dequantize, join, palette, clearNodeTransform, transformMesh, } from "@gltf-transform/functions"; import fs from 'fs' async function process(url ){ const io = new NodeIO() .registerExtensions(KHRONOS_EXTENSIONS) .registerExtensions([EXTMeshGPUInstancing]) io.registerDependencies({ "draco3d.decoder": await draco3d.createDecoderModule(), // Optional. "draco3d.encoder": await draco3d.createEncoderModule(), // Optional. }); const originalDocument = await io.read(url); await originalDocument.transform( dedup(), instance(), // Losslessly resample animation frames. resample(), // Remove unused nodes, textures, or other data. prune(), ); // const clone = originalDocument.clone() const glb = await io.writeBinary(originalDocument) fs.writeFileSync('yolo.glb', glb) } process('testitest.glb')
`
Result : https://github.com/Samsy/glbs/blob/main/testitest-broken.glb
I realised that removing the last prune transform does not break the model !
EDIT :
I just tested the options of prunes :
Seems like this option is not breaking the model :
prune({ keepIndices: true })
Thanks @Samsy! Will be fixed in https://github.com/donmccurdy/glTF-Transform/pull/1284.
Hello hello !
Did discover an issue with prune.
Using this model : https://github.com/Samsy/glbs/blob/main/testitest.glb
Original :
This transformation using 4.0.0-alpha.7 tested on both Nodejs package + CLI / same version :
`
Result : https://github.com/Samsy/glbs/blob/main/testitest-broken.glb
I realised that removing the last prune transform does not break the model !
EDIT :
I just tested the options of prunes :
Seems like this option is not breaking the model :
prune({ keepIndices: true })