Page 1 of 1
Allow to export texture from meshes
Posted: Fri Feb 16, 2018 7:24 am
by SAV
Hi Daniel,
I know that CloudCompare is a point-cloud-focused piece of software, but it would be nice to be able to export a mesh as an OBJ file that includes the associated JPG texture file.
For example, if I generate a mesh from a point cloud using the Poisson Surface Reconstruction plugin, it allows me to inherit the color from the point cloud. However, if I then save the textured mesh as an OBJ file, it only exports the mesh itself but not the associated texture.
Would be great if that could be added to the development list :)
Anyway, keep up the great work.
Cheers,
SAV
Re: Allow to export texture from meshes
Posted: Fri Feb 16, 2018 3:21 pm
by daniel
Ah ah that would be cool, but this operation is far from being easy. If anyone know a third party library dedicated to this operation (converting per-vertex color to a texture) then it would be envisageable.
Or of course if someone wants to contribute to the project he/she would be gladly welcome :D
I'll add this to the TODO list anyway (EDIT: it was already there)
Re: Allow to export texture from meshes
Posted: Tue Oct 03, 2023 7:17 am
by Etyop
Hey Daniel, sorry for bumping this old thread. Do you know if it is possible now ? Thanks.
Re: Allow to export texture from meshes
Posted: Thu Oct 05, 2023 7:30 am
by daniel
I am afraid nothing came up so far...
Re: Allow to export texture from meshes
Posted: Mon Oct 16, 2023 11:07 am
by PablerasBCN
Converting vertex color to textures can be don in Meshlab.
As Daniel says it is not easy out ob the box. If your mesh is somewhat planar, like we're talking like hills terrain it will be easyer.
There are 2 steps.
1) have the mesh with correct UV mapping.
To generate texture the mesh needs texture coordinates. As said if it is a rather planar obj you'r lucky because you can simply create a top down UV mapping which is trivial in any 3d program. It may be even be possible in Meshlab.
Else you've 2 options, per face planar uv mapping which in Meshalb takes FOREVER and also creates a seams on edges bug. In other 3d programs it also takes forever if there are many polygons.
Final option for complex meshes like an statue is to have a complex UV mapping generated with something like Zbrush.
2) bake the points data to a texture. You need to import the RGB point cloud as .ply in meshlab as data source and the mesh separatelly. Then use the Vertex atribute transfer tool.
In this tutorial you can see it more step by step, also you will see the edges bug:
https://gist.github.com/shubhamwagh/0dc ... 53d0f4d66b
Notice intutorial uses other vertex property transver, you need to use the one I pointed. And choose Color, yet you can also transfer Normals or AO.
Start with small texture sizes else time scalates somewhat exponential if not log!.
Re: Allow to export texture from meshes
Posted: Mon Oct 16, 2023 11:12 am
by PablerasBCN
Once you've your UV mapped mesh in Meshlab.
Search dist is a CRITICAL VALUE that will determine the time it takes aswell as the output quality, the optimal value will depend on the density of your point cloud
Re: Allow to export texture from meshes
Posted: Tue Oct 17, 2023 6:58 am
by Etyop
Thank you, I'll look into it in the next days!
Re: Allow to export texture from meshes
Posted: Fri Oct 20, 2023 10:25 am
by Etyop
Hey, it looks good! It is not perfect and I still some work to do to make it look better, but it's already so satisfying to see my texture properly applied. Thank you so much
Re: Allow to export texture from meshes
Posted: Sun Oct 29, 2023 6:23 pm
by PablerasBCN
awesome, glad it helped!.
Oddly the images I uploaded seem removed :\ but since you where able to do the bake I guess there is enough info for hte ones that come after