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 for additional Libraries #20

Open
SBCV opened this issue Jun 2, 2020 · 20 comments
Open

Support for additional Libraries #20

SBCV opened this issue Jun 2, 2020 · 20 comments

Comments

@SBCV
Copy link
Owner

SBCV commented Jun 2, 2020

This issue is considered as a living document.

The following libraries will be probably supported in the near future:
OpenSfM (https://github.com/mapillary/OpenSfM)

Feel free suggest other libraries as well. If these are proprietary, please provide a reconstruction of the sceaux castle in a file format that can be reasonably parsed with python. Or even better: provide a pull request ;)

Side note: Here is nice summary (unfortunately in german) of many different SfM tools

@LuAPi
Copy link

LuAPi commented Jul 28, 2020

I'd like to suggest the following point cloud formats:
.asc /.pts /.csv - These are simple text files with delimited numbers (delimiters can be space, comma, tab, semicolon). There's a simple spec for pts here but it'd be useful to look at what CloudCompare and MeshLab import and export as they can include colours and reflectance as floats and sometimes include normals.
e57 - http://www.libe57.org/ - has a python wrapper library but development seem to have stopped with that link.
pcd - the PCL file format - has a pure python library link

@SBCV
Copy link
Owner Author

SBCV commented Jul 29, 2020

Hey, thanks for pointing out these data formats.
Could you share an example reconstruction for the file formats you need support for?

@LuAPi
Copy link

LuAPi commented Aug 7, 2020

My use case is importing point clouds from LIDAR scans. I've converted the https://github.com/SBCV/Blender-Addon-Photogrammetry-Importer/blob/master/examples/Example.ply into the formats I mentioned. The example file didn't have any reflectance data so I added a dummy value of 15 to every point. The reflectance value is quite often an integer value larger than 8 bits. I included two versions of the asc and pts files, one with a header naming the columns and with float RGB values, the other without the header and with integer RGB values.
Example.zip

@SBCV
Copy link
Owner Author

SBCV commented Aug 10, 2020

The latest commit adds support for asc, pts and csv files. If no header is provided, the addon tries to guess the data semantics.
Regarding the other file formats, I'll need to check how to handle the external dependencies. (Since I want to keep this addon as lightweight as possible)

@SBCV
Copy link
Owner Author

SBCV commented Sep 27, 2020

Unfortunately pypcd does not support python 3. I'll have a look for some alternatives

@SBCV
Copy link
Owner Author

SBCV commented Sep 27, 2020

Maybe we should consider to add the pyntcloud library as optional dependency. It adds support for several file formats such as .ply / .pcd / .asc / .pts / .txt / .csv / .xyz ...

@SBCV
Copy link
Owner Author

SBCV commented Sep 29, 2020

The addon uses now pyntcloud for point parsing

@PLAN8VR
Copy link

PLAN8VR commented Nov 22, 2020

Is it possible to add .abc (Alembic) import? - thanks

@SBCV
Copy link
Owner Author

SBCV commented Nov 22, 2020

I am not aware of any python 3 library that allows to parse this .abc files. A few month ago I opened an issue for the alembic library. But as far as I can see, I supports only python 2.7 (and we need a library that is compatible with python 3). If you know any library that has the corresponding capabilities let me know.

@PLAN8VR
Copy link

PLAN8VR commented Nov 23, 2020

I am not aware of any python 3 library that allows to parse this .abc files. A few month ago I opened an issue for the alembic library. But as far as I can see, I supports only python 2.7 (and we need a library that is compatible with python 3). If you know any library that has the corresponding capabilities let me know.

Blender has a native Alembic importer anyway - is it possible to hook into this? It would be nice to be able to import abc cameras using your animated camera options. - Thanks!

Attached is an Alembic Export from Metashape (very low res build for time and file save)

Sceaux_Castle.zip

@PLAN8VR
Copy link

PLAN8VR commented Nov 23, 2020

I think this is the python abc importer I found in the Blender lib folder...

abc.py.txt

@SBCV
Copy link
Owner Author

SBCV commented Nov 24, 2020

I'm aware of Blender's built-in alembic importer, but the problem here is that not the full interface is available for python. Therefore, the only way to use this function is to call bpy.ops.wm.alembic_import(). Afaik, this will directly add the objects in the abc file to the scene - which makes it difficult/impossible to integrate this behavior into the current pipeline. (please correct me, if I am mistaken with any of these statements)

@PLAN8VR
Copy link

PLAN8VR commented Nov 25, 2020

That's a pity. Might the Blender Dev team allow access to the raw python scripting? (PS, I'm not a coder, so please tell me to be quiet when I'm talking nonsense!)

@SBCV
Copy link
Owner Author

SBCV commented Nov 25, 2020

No worries! Theoretically, you could open an issue at the blender git repository and ask for such functionality. However, I'm pretty sure that nobody would start working on that - my impression is that the Blender developers are too busy to fix bugs and improve the core functionality.

@SBCV
Copy link
Owner Author

SBCV commented Nov 25, 2020

see #30

@lanxinger
Copy link

First of all thank you for your great work on this plugin.

I would like to propose Apple Object Capture support. it is a free alternative (with a mac) and it now supports output of Poses (https://developer.apple.com/documentation/realitykit/photogrammetrysession/poses/).

@SBCV
Copy link
Owner Author

SBCV commented Sep 4, 2023

Hey, thank you for mentioning this library.
Since I do not own a Mac system, it will be difficult for me to add support for this library.
However, I could provide some guidance if you want to provide a pull request.
Another option could be that you create an example for the sceaux dataset (see here and here) and upload it somewhere.

@deeplyarnab
Copy link

Hello,
I'd like to suggest OPF https://www.pix4d.com/open-photogrammetry-format/
They have the specs (based on some json schema) and some python based tools as well.
Found it while looking for photogrammetry https://www.rerun.io/examples/real-data/open_photogrammetry_format

@SBCV
Copy link
Owner Author

SBCV commented Feb 26, 2024

Thank you for pointing this out!
Can you share some example file (ideally for the sceaux dataset)?

@deeplyarnab
Copy link

I still haven't found any, sorry for late reply. I'll try to keep searching.

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

No branches or pull requests

5 participants