📜 ⬆️ ⬇️

How to scan a castle (almost) for free

Introduction


For the game World Void we needed to port a historical monument to the Unreal Engine 4. My task was to scan the castle. I was expecting financing, which was delayed, so I finally decided to just take it and do everything on my own, without money, and I did it - I scanned the lock! A few months have passed, and I am still delighted! In this article I will tell you how I did it. But first, I want to thank Miloš Lukács, Jeffrey Ian Wilson, and the 3D Scanning User Group, without whom this would have been impossible.




')

What is photogrammetry?


In short, photogrammetry is the process of creating 3D models from several photographs of the same object taken at different angles.

I will not consider a three-dimensional scanning of objects, this topic is already sufficiently covered.

If you want to start mastering photogrammetry, I recommend this short video of James Candy from YouTube. Although Agisoft Photoscan is mentioned in it, the concepts discussed will work in any other software for photogrammetry. You can also read the Photogrammetry Guide for the Poor .

In their workflow photogrammetry is used by many artists, it was used for the Kite demo from Epic games, in Star Wars Battlefront and an infinite number of other projects. However, most of these studios scanned stones and trees. Epic games wrote a post about how resources were created for the open world demo. Employees of the company even wrote a post about the choice of equipment and another one describing the process of eliminating lighting. I highly recommend reading these posts if you have not seen them yet.

Difficulties


When scanning such a large object as a lock, one should not forget about the following difficulties:


Learn your purpose (pre-planning)


I work in the historical monument of Byblos, a city in Lebanon that has been inhabited for more than ten thousand years. However, the castle itself dates back to the 12th century. This is a relatively small castle compared to the newer ones built in some European countries, but each wall of this castle is made of highly detailed masonry, polished by time itself.

By studying the goal, I mean that you need to sketch on paper views from above and from the side, break them into several elements, choose the order of shooting and highlight those areas in which you need to take more pictures.

In addition, errors accumulate during scanning, which leads to the creation of displaced geometry, so you should always make a full set of circular images of the object so that the scans are automatically corrected. Open geometry may not be accurate.

I also took the opportunity and made many shots of the surrounding area from the castle walls, which made it possible to add a landscape to the scan.

Hint: Do not take multiple images at different angles from one point (panoramic images). Most often this leads to undesirable errors.

A useful way to scan small tunnels in which, due to limited space, it is difficult to take pictures from all angles: walk in a straight line, and at each step, take a picture with a forward-looking camera. This technique gives less resolution, but it may be enough.



There is a very high probability that you will miss several angles during scanning and the images will not overlap enough, which will result in areas with low resolution appearing in the scan, so I highly recommend checking the result in place. Reality Capture 3D scanning software, for example, can check the overlap of a huge number of images on a laptop in just a few minutes. This is incredibly useful - it will let you know in which areas more images are needed.



White dots mark the places from which the pictures were taken. Blue dots are manually added survey points to help link some items that the software cannot link automatically. Note that there are a lot of survey points on the roof of the castle, and this is normal, because I didn’t have a drone and I couldn’t take enough roofs. Fortunately, I managed to tie them by hand, which might not be possible for large locks. Total software snapped 4000 photos.

What do you need?


If you are trying to save as much as possible, this is what you need:


What I did not use



Software


I tested a bunch of photogrammetric software, and any of the packages listed below adequately deal with small scans, but I needed to process large amounts of data (4000 photos with a resolution of 24 megapixels).






Expenses


This is the interesting part. I borrowed the camera, the software was free, but I still needed to process the scan, because my laptop could not cope with it. Here Milosz Lukács helped me, he offered to process the data on his computer, and my gratitude knows no bounds. He also helped me in the data binding process, showed a couple of tricks for correcting some of my mistakes peculiar to beginners. As a result, I only had to spend money on a tripod, monopod and SD card, for a total of $ 70 + shipping. That is, yes, I managed to scan the castle from top to bottom for only $ 70! I proved that with desire, you can find a way. I was lucky, but luck came when I began to communicate and make friends.

Can this be repeated?


Six months before the start of the scan of the castle, I did not know anything about 3D scanning. And although I am tempted to say that I did it alone, it will not be true - they helped me, and in many ways this help was received from the community and industry professionals. How did I manage to find them? Pretty simple - in the Facebook 3D Scanning Users Group. First I joined the group, then I explained what I wanted to do, and I received great support from the community. One of the band members, professional Jeffrey Ian Wilson even wrote to me in a “lichku”, and we had a fruitful conversation. He put me on the right path, realized that I was ready for a complex project and made recommendations. In addition, he advised to treat his recommendations with a certain degree of skepticism. The same applies to my advice: in fact, my experience in 3D scanning is only six months, when I scanned the castle, I made mistakes, fortunately, they were not too serious and I managed to fix them. If I managed to scan the lock, it does not mean that I am the best assistant in scanning locks. I just share my experience, study and try everything yourself. I answer the question in the section heading: yes, you can repeat my “feat”, if you have the determination, then nothing is impossible.

Finally


I sincerely hope that our experience can be useful for readers, and if something interesting comes out of this, email me on Twitter or share on Facebook, I’ll be happy to take a look.

Processing a scan from one billion polygons and porting it into the game engine is another story, worthy of another post.

Source: https://habr.com/ru/post/335520/


All Articles