libigl-python-bindings icon indicating copy to clipboard operation
libigl-python-bindings copied to clipboard

Using ARAP to flatten a 3D textured mesh into 2D?

Open HansVansWardikins opened this issue 3 years ago • 0 comments

Hello,

I am looking to replicate part of the work documented in Computational Thermoforming, in particular the texture flattening performed in the calibration process in section 3.3.

This is the textured model that I want to flatten, I am able to import it and add the texture from a .png image along with the vertex texture coordinates (vt) using PyVista: image

I am able to use LibIGL ARAP to flatten the mesh onto the UV plane and plot as such: image image

However what I really want to be able to do is flatten the mesh once it has been textured to create a 2D representation of the texture, there doesn't seem to be a way of easily doing this using meshplot as it doesnt support the use of textures other than the basic procedural checkboard shown above, at least I cant find anything in the docs about texturing.

It seems I need a way to store vertex colours as processed from the .png texture image and vt before replotting them to the UV plane: image

Does anyone have any ideas on how this may be achieved?

Thanks in advance, Alex

HansVansWardikins avatar Oct 03 '23 13:10 HansVansWardikins