title: Vertex Color to UV Map -> Remesh -> Texture mapping
body: <p>I have a polygon mesh of a room in high resolution, and I want to extract vertices color information and map them as a UV map, so I can generate a texture atlas of the room.</p>
  
  <p>After that, I want to remesh the model in order to reduce the number of polygons and map the hi-res texture onto the new mesh in lower resolution. </p>
  
  <p>So far I've found this <a href="https://software.intel.com/en-us/blogs/2015/03/24/RealSense-3D-scan-Vertex-Color-to-UV-Map-Blender" rel="nofollow noreferrer">link</a> to do it in Blender, but I would like to do it programmatically. Do you know about any library/code that could help my in my task?</p>
  
  <p>I guess first of all I have to segment the model (normals criterion could be helpful) and then cut each mesh segment, so only then I am able to parameterize it. About parameterization, <a href="http://www.cs.jhu.edu/~misha/Fall09/Levy02.pdf" rel="nofollow noreferrer">LSCM</a> seems to provide good results for simple models. Once having available the texture atlas, I think the problem becomes a simple task of texture mapping.</p>
  
  <p>My main problem is segmentation and mesh cutting. I'm using <a href="http://www.cgal.org/" rel="nofollow noreferrer">CGAL library</a> for that purpose, but the algorithm is too simple to cut complex shapes. Any hint about a better segmentation/cutting algorithm that performs well for room-sized models? </p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>The mesh consists in a room reconstructed with a RGB-D camera, with 2.5 million vertices and 4.7 million faces. The point is to extract high resolution texture, remesh the model to reduce number of polygons and then remap the texture onto it. It's not a closed mesh, and there are holes due to reconstruction, so I'm guessing if my task is not possible to accomplish at all.</p>
  
  <p>I attach a capture of the mesh.</p>
  
  <p><a href="https://i.stack.imgur.com/c3Qh2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c3Qh2.png" alt="enter image description here"></a></p>