OpenSfM icon indicating copy to clipboard operation
OpenSfM copied to clipboard

Blender Addon to import OpenSfM Reconstructions

Open SBCV opened this issue 4 years ago • 7 comments

I've recently added support for OpenSfM JSON files for a Blender-Addon that allows to import different photogrammetry formats into Blender.

Here is an example reconstruction shown in Blender. import_result

It automatically computes a camera animation using the input images as shown in the following image. Of course, one can use Blender's tools to generate other camera trajectories as well. camera_animation

I share this information here, since it is probably useful for other OpenSfM users as well. If you have any questions let me know. Feel free to close this issue.

Side note: Parsing the mesh data contained in the JSON file is not performed yet, I'll have a look when I got some more spare time.

SBCV avatar Jun 12 '20 09:06 SBCV

Thanks, awesome work!

luisEMEBA avatar Jun 24 '20 16:06 luisEMEBA

That's great, thanks !

YanNoun avatar Jul 01 '20 12:07 YanNoun

@SBCV do you know how could i use opensfM in unity? I am completely lost in the documentation.

Ademord avatar Jun 14 '21 21:06 Ademord

Sorry, I've no experience with unity :/

SBCV avatar Jun 15 '21 06:06 SBCV

@SBCV but the general pipeline/steps? If you could provide any info, i think it shouldnt be too far away from how to import it to blender :/

Ademord avatar Jun 15 '21 07:06 Ademord

I'm not sure what you are asking for? OpenSfM (like any other Structure-From-Motion tool) takes a set of input images and computes a set of cameras and a point cloud. So you would need to figure out how you can import those entities into unity (i.e. how to write a custom importer for unity that can add cameras with custom properties such as rotation, focal length, principal point and so on. Side note: presumably it is easier to import the reconstructed results, than executing OpenSfM from within unity (since in the latter case you would need to delegate all the OpenSfM-options from Unity to OpenSfM, capture the progress of OpenSfM within Unity, and so on).

SBCV avatar Jun 15 '21 09:06 SBCV

Btw: Reading the data format of opensfm is relatively straight forward, see this script

SBCV avatar Jun 15 '21 09:06 SBCV