Closed simonasdmd closed 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.
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.
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.
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.
hi~ Will this question be completed?
Do you have a minimal code example showing what you want to achieve?
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