Hi @all, I want to know how do i get the info about how much memory is used by the model?
is it possible to get the detail of it like in this demo someone used?
https://gltf.report/ this might help
is there any other way also so i can generate form my side ?
currently I’m using gltf transform to generate the files but in that file there is no info about memory usage.
With GLTF-Transform you may count textures VRAM with this snippet:
let totalVRAM = 0;
doc.getRoot()
.listTextures()
.forEach((tex) => {
const vram = ImageUtils.getVRAMByteLength(tex.getImage()!, tex.getMimeType());
totalVRAM += vram!;
});
I’m using the gltf cli, is there any other way to get the result using the cli or should i have to write code for it?
gltf transform cli gives the analytics, try that https://gltf-transform.dev/
GLTF-Transform CLI gives the GPU size for each texture but doesn’t count the total sum.
gltf-transform inspect somefile.glb --format=csv
You may grab csv and count the total from it.
Or remake inspect.ts to get the desired info - glTF-Transform/packages/functions/src/inspect.ts at a99ff403ba976a05374369556119d76ed555a329 · donmccurdy/glTF-Transform · GitHub
Or write your own function just for this purpose, as here - https://glb.babylonpress.org/