CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.88k stars 1.38k forks source link

How to simplify texture while simplifying mesh #4359

Closed simonasdmd closed 4 years ago

simonasdmd commented 4 years ago

Please use the following template to help us solving your issue.

Issue Details

How to simplify texture while simplifying mesh

Source Code

This is a reasonable need. Why not simplify the texture when simplifying the mesh?

Environment

sloriot commented 4 years ago

There is no direct texture handling in CGAL but the visitor of the simplification package can help tracking what operations are being done during the simplification. If you give more details about what you would like to achieve precisely, we might be able to help you do what you need.

simonasdmd commented 4 years ago

hi~ @sloriot Now CGAL only simplifies the geometric mesh. But it doesn't simplify the mapping. Texture coordinates. For example, obj file. The original obj file has vertex normals and texture coordinates. But CGAL only reads the vertex when it reads obj. Then there is no processing of the texture coordinates. After that, the obj file is exported with only vertices. This should be a big place to be ignored. We hope to provide a method to simplify texture coordinates synchronously.

sloriot commented 4 years ago

My point was that you can follow what is done in this example to get information before and after an edge is collapsed so that you can update your texture. This has to be done on the user side as CGAL does not know what a texture is. Also note that the OBJ writer from CGAL does not handle any extra attribute AFAIK, so you might need to extend the existing one to export any additional attribute.

simonasdmd commented 4 years ago

I think CGAL should update the processing of "VT" texture coordinates. Not just the vertices. Texture coordinates are very necessary for 3D data. But after CGAL reprocessing. The texture is gone. I think this can be a function request.

simonasdmd commented 4 years ago

hi~ Will this question be completed?

sloriot commented 4 years ago

Do you have a minimal code example showing what you want to achieve?