@seanwasere in your website, can i ask how did you create draco compressed file for that monkey model?
is it that since my model is scanned model, i can’t compressed it into draco ?
I think i have tried and check most of the code and examples, i don’t think you have talked about way to reduce number of triangle from mesh.
in three.js i found simplifier but that works for model already loaded and it is not working in my case !!!
can you please help me learn what are the ways that i can compress my model without degrading it like draco degraded the original model.
is there anything that you prefer?
i want to focus all my learning and learn things on scanned 3d models, and in scanned 3d model, big problem is file size which i want to reduce but i am not able to find out what are the ways to do that.
I used blender. The monkey is a very simple model compared to yours.
click into main scene so that keyboard events are sent to it.
press a to select all.
press delete to delete all
press shifta to add a new mesh–>monkey
file – > export → gltf 2
open geometry options → tick Compression → Export
generating compressed from blender gives better model than the one that I got from gltf-pipeline module
but still there are some artifact which is not as bad as previous draco file which I mentioned in post.
@Pravin_Poudel try including the --draco.unifiedQuantization flag when compressing with gltf-pipeline. Draco compression involves rounding vertices to a grid (quantization). The default is to choose that grid independently for each mesh, which improves compression, but this may introduce seams between two adjacent meshes. The option above forces Draco to use the same grid for the whole scene, and should avoid the seams.
There area a lot of documented options in the CLI — I think you’ll want to try a few more of them. With unified quantization you may also need higher precision on the vertex positions. I’d recommend output to .glb rather than .gltf as well.
One important thing would be that the texture used by this model is almost 30 MB alone. Draco only compresses geometry, so you’ll need to do something else about that. Here’s a set of steps I’ve tried:
The result (attached) comes down to 11 MB with the steps above, and looks reasonably good to me. Further trial and error may improve results further. I’d also consider reducing the texture from 8K to 4K if mobile devices are a concern.
No worries at all! Lots of moving pieces to optimize in a 3D model.
Since this model is Draco compressed does that mean I don’t need that texture anymore? because even when I deleted the texture there is no error.
You don’t need the texture anymore, but it isn’t because of Draco — in most tools, exporting to .glb (rather than .gltf) will embed textures and the binary .bin data into the self contained .glb. A .gltf usually keeps references to external files instead. And if you ever see a .gltf that doesn’t have external files (sometimes called “glTF Embedded”) that’s very inefficient (Base64 strings) and it’s better to switch to .glb (binary).
… is there any way I can run this command by the program because I want to reduce the file uploaded by users to my system ???
But the first step with gltfpack is important here, it joins the meshes together so they’ll compress better, and that part is only a CLI tool at this point. I have work in progress for supporting that feature in glTF Transform but it isn’t done yet.
Either way is fine! Up to you. Getting the Draco encoder installed on the frontend is a little more complicated than in node.js, the Stack Overflow link above has some details on that.
I’m not sure if LODs will help for this particular model — that project is designed around the case where you have a large world with many objects, and want to make those objects more/less detailed as you get closer/farther away. For a single static room, it may not help much.