Mesh to PLY Creator

Ever wanted to archive off all of those mesh files, or grab one from memory to read later? Now you can!

I have written a basic mesh() save routine to archive to PLY files. Please note that I am NOT saving textures nor texturecoordinates with this version.

I’ve placed in it this gist: . Adding texturecoord stuff is not critical, but can be done if there’s people looking for it.

Lol - I need to publish the HTTPLoader project - that reads X3D and PLY.

So…I think that I can accelerate your process…as far as saving texture information I think I will modify the writer to do so today.

For now, save the PLY file in your DropBox public folder, if you have one.

I have a large project called HTTPLoader that I really want to rename and clean up , but it would solve your needs. Te only reason I haven’t published it yet is because I want some decent source control on it - and fists aren’t good enough for that to me. But its helpful, so I’ll work on publishing it and writing up a walk through. It takes 5 minutes to get an object loaded and rendered.

Thanks @Aciolino. I grabbed the code and example, but since it needs some coding on my side (write a ‘main’, load a text file - i’ve never done it) i have not been able to see it work. However its good to see an example of code doing this. I’m working on saving my mesh into an image (including the texture image) because then everything will be packed in the same object, but it takes quite some time to put everything together. And also, at work i am entering a ‘heavy duty coding’ phase, so i must rest a little bit when i’m at home…

@Jvm38, I added a hacked version of ReadPLY.lua to the gist; I commented out various HTTPLoader specific areas so that you can use it to read a PLY file. I also added a sample .PLY file, a 1 unit cube.

Hello @aciolino, thanks for sharing. How do you read back the mesh?

Oops - didn’t write the texture stuff yet :slight_smile: Not quite sure how easy it is to extract texCoords or texture file names.

Bah, don’t worry, i’am almost done on my side. Thanks anyway. Btw, what do you mean by ‘it takes 5 minutes’? Why is it that long? Loading a big image is only 10 s, so i don’t expect an object loading to be longer?

5 minutes of software development, not object loading time :slight_smile:

Finished writing the texture stuff on mine a few days back.

Have you seen my post on mesh saving to an image? What do you think about this solution?

I haven’t looked at it yet, but I will!