SBCV / Blender-Addon-Photogrammetry-Importer

Addon to import different photogrammetry formats into Blender
MIT License
889 stars 78 forks source link

Support for additional Libraries #20

Open SBCV opened 4 years ago

SBCV commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

LuAPi commented 4 years ago

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 commented 4 years ago

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 commented 3 years ago

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

SBCV commented 3 years ago

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 commented 3 years ago

The addon uses now pyntcloud for point parsing

PLAN8VR commented 3 years ago

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

SBCV commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

abc.py.txt

SBCV commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

see #30

lanxinger commented 1 year ago

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 commented 1 year ago

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 commented 6 months ago

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 commented 6 months ago

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

deeplyarnab commented 6 months ago

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