CAOR-MINES-ParisTech / colibri-vr-unity-package

This is the Unity package for COLIBRI VR, the Core Open Lab on Image-Based Rendering Innovation for Virtual Reality.
https://caor-mines-paristech.github.io/colibri-vr
Other
50 stars 11 forks source link

Import Existing Colmap Model #9

Open PKehnel opened 3 years ago

PKehnel commented 3 years ago

Hello thanks for the cool project!

Just wanted to know if there is a way to import an external generated colmap model?

DinechinGreg commented 3 years ago

Hi, thank you very much for the comment! What does the external generated COLMAP model look like? If along with the 3D mesh you have the undistorted camera information generated in the course of COLMAP's dense reconstruction step (i.e. the folder located by default in /dense/0/, which should look something like the one described here https://caor-mines-paristech.github.io/colibri-vr/structural-elements/file-structure), then the toolkit should be able to interpret it as a set of camera models in Unity.

PKehnel commented 3 years ago

I created an sparse Model with custom features and matching and would now like to import it into your tool and then visualize it. So its not a dense model and without meshes.

DinechinGreg commented 3 years ago

If you have the sparse model (of the SIMPLE_PINHOLE or PINHOLE type) in COLMAP all you need is to export it as text in the my_data/sparse/ folder, create a GameObject in Unity with a Rendering component, and change the data folder to my_data. The component should then be able to parse the information contained in the text files, and should thus display the camera setup in the scene view. Does this work as expected?