Open bravokiloecho opened 1 year ago
If I use --resolution [value]
or --resolution=[value]
it works.
Maybe you can share your model.
Hello! I can't share the model sadly. Are you using the --resolution
flag with the --transform
flag?
Could you check the output of the Texture tables with โ
npm install --global @gltf-transform/cli@next
gltf-transform inspect package-30.glb
That would tell you what the texture resolutions are in the output.
Thanks for the tip @donmccurdy!
When I run either
npx gltfjsx package-30.glb --transform --resolution=256
or
npx gltfjsx package-30.glb --transform
and inspect the model, the results are the same (texture size of 1024x1024):
TEXTURES
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโฌโโโโโโโฌโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโโโโ
โ # โ name โ uri โ slots โ instances โ mimeType โ compression โ resolution โ size โ gpuSizeยน โ
โโโโโผโโโโโโโผโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโค
โ 0 โ โ โ baseColorTexture โ 1 โ image/jpeg โ โ 1024x1024 โ 66.69 KB โ 5.59 MB โ
โโโโโผโโโโโโโผโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโค
โ 1 โ โ โ baseColorTexture โ 1 โ image/jpeg โ โ 1024x1024 โ 62.46 KB โ 5.59 MB โ
โโโโโผโโโโโโโผโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโค
โ 2 โ โ โ normalTexture โ 1 โ image/jpeg โ โ 1024x1024 โ 69.56 KB โ 5.59 MB โ
โโโโโผโโโโโโโผโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโค
โ 3 โ โ โ metallicRoughnessTexture โ 1 โ image/jpeg โ โ 1024x1024 โ 197.31 KB โ 5.59 MB โ
โโโโโผโโโโโโโผโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโค
โ 4 โ โ โ baseColorTexture โ 1 โ image/jpeg โ โ 1024x1024 โ 34.99 KB โ 5.59 MB โ
โโโโโผโโโโโโโผโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโค
โ 5 โ โ โ normalTexture โ 1 โ image/jpeg โ โ 1024x1024 โ 42.18 KB โ 5.59 MB โ
โโโโโผโโโโโโโผโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโค
โ 6 โ โ โ baseColorTexture โ 1 โ image/jpeg โ โ 1024x1024 โ 36.05 KB โ 5.59 MB โ
Another update...
When I cloned this repo and ran it locally, the --resolution
option worked as expected
When I run the command:
it compresses the model from
28.1MB
to866KB
. But when I try any different value with the--resolution
prop like this:(or replace
256
with any other number) it still compresses down to866KB
.So I'm not sure the
--resolution
prop is having an effect. Am I using it correctly here?Thank you (and thanks for such an amazing tool)!