PLY to obj mesh with color

Feel free to ask any question here
Post Reply
mickey3k
Posts: 2
Joined: Tue May 13, 2014 12:32 pm

PLY to obj mesh with color

Post by mickey3k »

Hi!

I am currently struggling with meshes and .obj files. I have a pretty nice .ply 3D model of an outdoor area (about 600mb).
Problem is, I need a colored .obj file for cinema 4d. I tried to simply save the .ply file as obj, but when I open it in a mesh viewer, it has no color.
Other .obj meshes I have also come with some .jpg files. Unfortunately, I have almost no knowledge of meshes/.obj files so I don't really know how to get a colored obj file.
Since these files are pretty big, it is quite impossible to get the desired result with trial and error.

So hopefully you can give me some advice :)

Kind regards,

Michael
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: PLY to obj mesh with color

Post by daniel »

Indeed, contrarily to PLY files, OBJ files don't handle per-vertex color. And CC can't convert (yet) per-vertex colors to a texture file. So sadly you won't achieve your goal this way.

Have you tried Meshlab by the way? I heard it can convert colors to a proper texture file.
Daniel, CloudCompare admin
mickey3k
Posts: 2
Joined: Tue May 13, 2014 12:32 pm

Re: PLY to obj mesh with color

Post by mickey3k »

yes I have tried meshlab, but it has quite a lot of trouble with large files, since it was made for models of single objects I guess. With my datasets from small landscapes/terrain, meshlab is always crashing.
Laserbrain
Posts: 51
Joined: Tue Sep 30, 2014 6:13 pm

Re: PLY to obj mesh with color

Post by Laserbrain »

I finally got this working with the help of this forum:

http://meshmixer.com/forum/index.php?topic=1547.0 Reply #5

"To transfer vertex color to texture (maybe you've to update Meshlab):

load your vertex colored YourFile.PLY to Meshlab;
Run Filters/Texture/TrivialPerTriangleParametrization and apply
Run Filters/Texture/VertexColorToTexture (ML saves the texture png to the folder where your PLY is located named as YourFile_color.png)
Export (maybe to obj) to the same folder. Although the export dialog does not show the texture (make sure that TexCoord is enabled - should be now by default) the obj comes with a linked .mtl file.

Edit the mtl file in a texteditor and simply add this line:

map_Kd YourFile_color.png
(replace "YourFile_color" with the name of the created texture and save the modified mtl - this links the png to the obj)"

I imported the final OBJ in 3DS Max. Works!
Post Reply