Code Monkey home page Code Monkey logo

Comments (6)

FractalFir avatar FractalFir commented on June 19, 2024

Previously, I did not know about Draco, so this is why I did not test it. In terms of raw file size reduction, Draco on max compression and default settings wipes the floor with my project, compressing the mesh to just 22 kB. I do not know if I did something wrong while using Draco, because there are a couple of visible artifacts in blender.
Screenshot from 2023-02-24 13-45-01
Those artifacts persisted no mater the compression level, and when -preserve_polygons was enabled.
Since I do not have almost any experience with Draco, this may be me just messing something up.
Additionally, Draco encode/decode speeds are noticeably higher (export 10-16ms and import 7-10 ms).
In terms of LOC, my library is 3191 lines long, Draco is 74513 lines long, including documentation. The size of compiled release binary is 1 MB, while Draco is 4 MB.
Comparisons to Draco are certainly a nice thing to have, but I need to double-check if those artifacts in Draco come from its compression or from my error.

from tmf.

FractalFir avatar FractalFir commented on June 19, 2024

It seems I have made a mistake in calculating the size .tmf library and included rust metadata file. The compiled code(object files) weigh 203.4 kB, not 1 Mb. So the compiled binary is 1/20 of Draco.

from tmf.

jansol avatar jansol commented on June 19, 2024

Thanks! Those are great data points.

I have had to fit binaries in small ROMs lately, with the option of loading data from a much larger separate memory at runtime (albeit not 3D models at the moment) so I have a fresh appreciation for small code size.

Those artifacts should definitely not be there. I don't have any good guess as to what is happening either, though. The blender exporter does not really have that many options that one can screw up. It looks like e a discontinuity in normals so maybe draco is doing some meshlet optimization and has a bug with keeping normals smooth across meshlet boundaries.

from tmf.

FractalFir avatar FractalFir commented on June 19, 2024

I did not use the blender Draco exporter, I used Draco CLI. My blender install has some issues, so I wanted to ensure there are no problems/overhead coming from blender itself.
It seems like the decoded file in .ply format has some vertices doubled and separate for faces, and a weld modifier in blender after the import fixes the issue. Additionally, decoding into other formats(.obj) and importing them seems to work just fine.

from tmf.

FractalFir avatar FractalFir commented on June 19, 2024

I have made a draft of a comparison to Draco in this commit. I still need to make sure it is objective and 100% accurate (as an author of this project, I may be not as objective as I would like), but it seems pretty fair to me.

from tmf.

jansol avatar jansol commented on June 19, 2024

Looks good! And quite straightforward to expand to cover meshoptimizer too.

from tmf.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.