Monday, May 10, 2021

3D Model of the Torhola Cave


Digitalisation of caves is proceeding! :-) I now have the first model from a bit larger cave, the Torhola cave in Lohja, southern Finland. This cave is Finland's largest karst cave, with around 100 meters of complex tunnels on 3-4 levels.

I’ve been using the new iPhone LiDAR sensors to build detailed 3D models of caves. This is the first bigger project in this series. I have hit the practical limits of the iPhone software for modelling complex structures, so the model has been recorded in four parts, which were then joined together in post-processing in a computer. On the iPhone I used the native sensors and cameras, and the Polycam software. On the computer I used Blender.

The picture above is a static side view of the model as if you were able to observe the cave from outside, but there’s an actual full 3D model behind, including textures so one can also peek inside and see what the tunnels look like etc. 

This model is a composite of four parts, turned out to be difficult to scan all in one go. This should be useful for understanding the cave, drawing cross cuts and maps, or peeking inside. But this is still very experimental, none of the softwares were really meant for this, it is difficult to get good texture video in very tight passages, there’s overlap from the different parts, and the model is also too large (600k pieces, lots of detail, but chokes my browser if I try to rotate it).

The overall process for creating a 3D model of a cave is as follows:

  1. Use the iPhone's capabilities and the Polycam application to record a 3D model of the cave you are in. Start by creating a new model, then "record" the scene, and when finished, perform the Polycam processing as a "space".
  2. If necessary, continue the model collection by using either the "extend" capability in Polycam or create additional models.
  3. Export the resulting model(s) by using Polycam's export capability, e.g., to GLB format. Note that you will need use the non-free version of Polycam to do this. Take care of export the kind of data you need in post processing and the final model; GLB for instance includes both the model and the texture data recorded from the videos.
  4. Import the model into suitable post-processing software. Perform any corrections, merge different parts together, etc. that are needed.
  5. Use the model and the post-processing software to build any final results that you may wish generate, e.g., cross-cuts, maps, measurements, simplifications (decimation), and so on.
  6. Publish your results.
But this is still difficult. Some of the problems that I encountered:
  • Collecting high-quality video and LiDAR data is difficult in cramped cave tunnels. The sensors work best when there's a reasonable and consistent distance to the photograped walls, but I found out that I'm often too close, just centimetres from the surface.
  • Due to the nature of the complex cave, there will be a lot of situations where a "hole" is left in the model, e.g., because a cavity extends further out than the sensor can reach, and it will not be possible to crawl into the cavity. These holes cannot be distinguished algorithmically from cave entrances, and they make the processing difficult. In particular because the holes appear like fractals in small and large scale.
  • In the course of recording the Torhola cave, I experienced one failure to use Polycam's capability to extend a model; possibly due to leaving the continuation point to a tight spot where it was difficult for the software to recognise an earlier recorded part. But I've also seen this issue in some other situations, and I sometimes had to return to the starting spot of a recording. This is of course impractical in caves.
  • I also experienced one case of a firmware or sensor problem, where the iPhone indicated that I do not have rights to read the sensors. This happened in the middle of recording a part of the cave.
  • It is incredibly difficult to align manually different recordings together. I left on purpose some forms in overlapping parts that would ease alignment, but it is often difficult get the alignment done well along all axis.
  • The overlap itself is difficult to remove; my current models contain overlapping segments because of this.
  • The models are big, on the iPhone the raw data for Torhola was 4GB and over a million faces. Post-processed with Polycam, it was only 65 MB but that's still large (600k faces).
  • The large models can't easily viewed on the web interfaces using software such as model-viewer, even if they can be rotated and modified on dedicated software such as Blender.
  • Operations needed for cross sections and other useful things in Blender are designed primarily for objects. They seem to operate rather poorly for the spaces that caves represent (more than objects). I have not determined the exact causes for this, but I suspect it is due to the algorithms in Blender's Bool tool that determine what's "inside" and "outside" of an object. 
But, the results are still tremendously interesting and illuminating. And this is a fun thing to experiment with. I’ll keep exploring if this can be made to work more fully.

The raw model for Torhola is available also, both in GLB and Blender formats. Do note that these models are being processed and fine-tuned; as noted they also have several issues. On my list of things to do next is various cross-sections (see here for an example from another cave).

I have also started to maintain a directory of all 3D models I have from Finnish caves. The directory can be found here. There's also a similar directory of all cave maps, here. Both models, maps, and all other information from Finnish caves is also directly integrated to the Psgeo mapping service that the Finnish Caving Association uses. The most recent version of the software (with support for 3D models) can be accessed here. For an example of how the models are maps are visible in the map, click on this.

This article has also been published at TGR. Read more urban exploration stories from theurbanexplorer.net, and other underground stories from planetcaver.net. Read the full Planetskier series at planetskier.net, or all blog articles from Blogspot or TGR. Photos and text (c) 2021 by Jari Arkko. All rights reserved. Thanks for Helene and Touko for accompanying me to the cave!

1 comment:

  1. This has been an adventure to visit your blog and read this informative post.

    Check 99CarRentals for cab services in India.

    ReplyDelete