Giter VIP home page Giter VIP logo

Comments (15)

ondys avatar ondys commented on May 17, 2024

Our .obj decoder currently handles only triangular faces. We may add support for triangulation of more complex polygons later if there is sufficient demand. For now you would have to triangulate the model either in your modeling app or tools such as MeshLab.

from draco.

Frankling avatar Frankling commented on May 17, 2024

I have just met this problem too...

from draco.

ondys avatar ondys commented on May 17, 2024

I've added the request to our internal issue tracker. I'll post an update when there is any progress to report

from draco.

bradrothenberg avatar bradrothenberg commented on May 17, 2024

@ondys any update on this issue? Thanks!

from draco.

ondys avatar ondys commented on May 17, 2024

@bradrothenberg Actually yes. We have added support for quads internally and it should be pushed to public within this week. I'll update this issue when that happens. Note that the quads are not going to be preserved. The output is going to be a triangular mesh (quads are split into two triangles).

from draco.

ondys avatar ondys commented on May 17, 2024

Support for loading quad meshes has been added to the master branch. Let us know if you find any issues with this new feature. Thanks

from draco.

bradrothenberg avatar bradrothenberg commented on May 17, 2024

thanks @ondys !

from draco.

bradrothenberg avatar bradrothenberg commented on May 17, 2024

@ondys is there a way to preserve the original vertices & faces? & then we can handle the triangulation on our side (like for rendering etc)

from draco.

ondys avatar ondys commented on May 17, 2024

@bradrothenberg Preserving original quad faces is currently not supported. All our compression techniques currently work only on triangular meshes so the input has to be triangulated. We could possibly encode information about quads in a separate geometry attribute if that's something that would be acceptable (of course this would result in worse compression). Is there any reason why you cannot triangulate the mesh before it is encoded?

from draco.

bradrothenberg avatar bradrothenberg commented on May 17, 2024

@ondys I was thinking we could add an attribute to each face that is an index to a "surface" & then compress this? We are looking at using draco to compress mesh data in the CAD software we're building. Currently we support n-sided polygons for meshes:
image

so we can do things like generate ribs based on their edges:

image

When using n-sided meshes, we do triangulate each face for rendering & such, but we need to keep the association of each tri to each face in the mesh so that we can still do things like extract the edges of the n-sided faces...

Could we just add new attributes only to the triangular faces that are part of larger n-sided faces by calling:

mesh.SetAttribute(mesh.num_attributes()+1, std::move(newAttribute));

& the attribute would be a GENERIC geometry attribute ?

from draco.

ondys avatar ondys commented on May 17, 2024

@bradrothenberg Yes it should be possible to do it with a new generic attribute of type DT_INT32 where every point on a triangle would reference to its associated polygon id. The only thing I'm worried about is that this would not really compress that well. The compression can be improved if you apply some graph coloring algorithm to generate the polygon ids (i.e., use only a very few unique polygon ids for all faces while making sure that no two neighboring polygons share the same polygon id).

Ideally we would not actually need to store any polygon ids at all as all we need to store are the boundaries between the polygons and the ids can be generated implicitly on the decoder side .. this would require some changes to the framework though as Draco doesn't support implicit attributes yet.

from draco.

bradrothenberg avatar bradrothenberg commented on May 17, 2024

thanks @ondys !

from draco.

tastnt avatar tastnt commented on May 17, 2024

Are there any plans on support for this? Thank you.

from draco.

ondys avatar ondys commented on May 17, 2024

@tastnt Nothing new at this point. I would suggest anyone with this request to add it here so we can more accurately gauge the demand

from draco.

FrankGalligan avatar FrankGalligan commented on May 17, 2024

Closing due to inactivity.

from draco.

Related Issues (20)

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.