PLY loader
Posted: Fri Sep 01, 2006 9:17 pm
So... I made a .ply loader. See a little more about it, and some sample files, here [graphics.stanford.edu] and here [local.wasp.uwa.edu.au].
Basically, it's a simple, usually text-based mesh format that's really extendable. The Stanford Bunny [en.wikipedia.org] originally came in this format.
I wanted a loader for this format because I wanted a simple format to write a loader for in order to learn how 3d models work. I was also tired of model formats also trying to cover materials and textures. To me, a model file should have all a model needs, but nothing more . The .ply format can be used for materials etc., but usually isn't. I also needed a file format exportable from blender that preserved smooth normals.
Right now, there are a few problems:
Download Zip [projectfaint.hopto.org]
(Sorry for the slow server)
Here's the Stanford Bunny, 16000 polygon version, with some very bad UV coords.
Things in the zip:
So yeah, if anyone uses this it'd be cool to know. Under the same license as Irrlicht. Also, if anyone finds a binary-format .ply file, or a file that does not work with this loader, I'll see what I can do. Just send it to me
agrif
Basically, it's a simple, usually text-based mesh format that's really extendable. The Stanford Bunny [en.wikipedia.org] originally came in this format.
I wanted a loader for this format because I wanted a simple format to write a loader for in order to learn how 3d models work. I was also tired of model formats also trying to cover materials and textures. To me, a model file should have all a model needs, but nothing more . The .ply format can be used for materials etc., but usually isn't. I also needed a file format exportable from blender that preserved smooth normals.
Right now, there are a few problems:
- Does not handle faces with more than 4 verts
- Blender-exported meshes do not have the right axes
- Does not handle binary .ply formats
- Will not handle corrupted data sections correctly (SEGFAULT )
Download Zip [projectfaint.hopto.org]
(Sorry for the slow server)
Here's the Stanford Bunny, 16000 polygon version, with some very bad UV coords.
Things in the zip:
- bunnyuv.ply, bunny.ply, cube.ply, monkey.ply - Some simple .ply files
- PLYloader.exe - windows binary demo. Usage: PLYloader [ply file]
- testAll.bat - runs PLYloader.exe on all of the .ply files.
- src/main.cpp - demo program source
- src/CPLYMeshFileLoader.cpp, .h - Source of the loader
So yeah, if anyone uses this it'd be cool to know. Under the same license as Irrlicht. Also, if anyone finds a binary-format .ply file, or a file that does not work with this loader, I'll see what I can do. Just send it to me
agrif