Stanford (.ply) - Point cloud export
Needs ReviewPublic

Authored by Christian Brinkmann (poor) on Dec 7 2017, 5:57 PM.



This patch adds the ability to export point clouds (loose geometry) via ply.


Diff Detail

Campbell Barton (campbellbarton) requested changes to this revision.EditedDec 13 2017, 12:46 PM

It would be best to implement this by exporting all loose vertices, if a mesh has a single face - no vertices will be exported.

Also, this patch removes vertex alpha support by accident.

Edit: It might be slow to detect loose vertices, this could be an option.

This revision now requires changes to proceed.Dec 13 2017, 12:46 PM

Minor style issue.


Pep 8 style: Multiple statements on one line

Christian Brinkmann (poor) updated this revision to Diff 9722.EditedDec 20 2017, 2:25 PM
Christian Brinkmann (poor) retitled this revision from Stanford (.ply) - Point cloud export to Stanford (.ply) - Point cloud export.
Christian Brinkmann (poor) edited the summary of this revision. (Show Details)

Thanks for your review @Campbell Barton (campbellbarton) . Good catch, I noticed that it's essentially the same for loose edges.

I've updated the patch to reflect both cases and attached a blend with all possible scenarios I can think of (mesh only, point cloud, mesh with loose edges and vertices etc.).

The exporter is now able to export all components of the geometry. However, I had to re-write the code to maintain the vertex indices for reference. Positive side effect is that in case the mesh has no uv's, the exporter now only writes single vertices an their attributes to the file, instead of writing all vertices per face. In my tests all my scenarios are working and the geometry came back to blender as expected. The importer seems to handle all that cases very great, although we could add removing possible doubles at the end, but I'm not sure whether that's good practice switching to edit mode and so on...

What do you think?

Edit: There are only 3 components per vertex color, right?