Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support .obj files in pc_align #243

Open
oleg-alexandrov opened this issue Mar 11, 2019 · 0 comments
Open

Support .obj files in pc_align #243

oleg-alexandrov opened this issue Mar 11, 2019 · 0 comments

Comments

@oleg-alexandrov
Copy link
Member

Wavefront .obj files are a pretty widespread way of representing point clouds in many tools, including Blender, Meshlab, CloudCompare, etc. Our point2mesh creates .obj files as well, if invoked with the -t option, and osgviewer can view .obj files as well in addition to .osgb.

This format is convenient, for example, for irregular shapes, like the Ultima Thule body that New Horizons flew by recently. It would be nice if pc_align could support this format.

The format is quite simple, apparently, as shown here: https://en.wikipedia.org/wiki/Wavefront_.obj_file

We'd need to read the file, ignore all lines except those starting with "v ", do the alignment, and then write back files in exactly the same format with a transform applied to the "v " lines and to the normals (only the rotation part of the transform would be applied to the normal).

If the input .obj file has an associated tex.jpg texture file, the output file would use that one as well, by duplicating this file to a new name and also creating an .mtl file in the same format as the input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant