Convert .PLY into .OBJ

Hi! I´m new here. I ve been in contact with James George this past week as we were testing Depthkit Studio in Unity and he told me that I should post here so someone could provide me with a script for batch converting PLYs to OBJs that keep texture intact.

Thanks in advance :slight_smile:

@alejandrogarcia I recently replied to a forum post which touches on this topic. The post links to a shell script which uses the command-line tool meshlabserver (included when installing Meshlab):

for file in *.ply; do
    meshlabserver -i "$file" -o "${file%.*}.obj" # -om vc
done

Let us know if this works.

Hi! Thanks for your response! It seems that Meshlab discontinued meshlabserver in it´s latests versions. I tried with an old one but I can´t seem to make it work. I pasted that line but it says that it doesn´t recognise “meshlabserver” as a commad or executable.

Thanks for pointing out the lack of meshlabserver in new versions - We’ll keep this in mind in the future.

If you haven’t added meshlabserver to PATH, you’ll need to explicitly point your command-line tool toward it - e.g. C:\Program Files\VCG\MeshLab\meshlabserver.exe instead of just meshlabserver or change directory to the folder containing the executable first, then running the program:

    cd C:\Program Files\VCG\MeshLab\
    meshlabserver.exe -i "$file" -o "${file%.*}.obj"

Hi Cory, we managed to make it work but only if we didnt include the -vc cause it caused this error:

E:\Documents\3D\ManyWorlds\prueba depthkit> meshlabserver.exe -i “mesh-f00001.ply” -o “mesh-f00001.obj” # -om vc
Loading Plugins:
Current Plugins Dir is: F:/Archivos de programa (x86)/MeshLab/plugins
Total 265 filtering actions
Total 13 io plugins
Opening a file with extension ply
Mesh E:/Documents/3D/ManyWorlds/prueba depthkit/mesh-f00001.ply loaded has 16808 vn 33412 fn
output mesh E:/Documents/3D/ManyWorlds/prueba depthkit/mesh-f00001.obj
Something bad happened parsing the document. String #

Any guesses on why is that happening? We are stucked again.

However even if it had worked properly we would end up with hundreds of .obj and loading all of them simultaneously doesn´t seem efficient. Do you have a pipeline to get an animated model we can use in unity and web AR? Maybe a way to convert those .obj into morphs?

Our feeling right now is that the process is too convoluted for a task we would need to perform regularly.

Thank you in advance.

@alejandrogarcia, for the -vc option, I am not sure what’s causing the error, but it sounds like this workflow is not suitable for your needs anyway.

For lighter-weight assets ready for realtime playback, we currently recommend compressing your Depthkit Studio PLY assets with Arcturus HoloEdit which converts them to a keyframed-and-morphed format that’s playable in Unity, Unreal, and WebAR. This workflow uses the very same PLY assets that are exported out of the Mesh Sequence Export workflow you have already generated - Learn how to import them into HoloEdit here.