📜 ⬆️ ⬇️

3D scanner for $ 30

Professional 3D-scanner, with which you can digitize a real object, getting his computer model, worth tens of thousands of dollars. We can do the same with a special program, laser pointer and webcam. Total dollars for thirty.



About 3D scanning


Many areas of our life are unthinkable without three-dimensional graphics. A huge army of 3D modelers (or simply 3D'shnikov) daily creates models that are then successfully used in various fields, ranging from cinema, advertising, industrial production, architecture, and ending with God knows what else. Any person engaged in modeling, sooner or later faces the following task: you need to create a model of what already exists in our three-dimensional world. It could be anything. For example, a prototype model that the customer placed on your table and asked to do "exactly the same, only in the computer." Moreover, it is necessary to model not just so that it “looks like”, but so that the prototype object and the three-dimensional model are like twin brothers separated by a computer screen. It happened to me. When completing the next order for modeling, I was faced with very strict requirements to match my model to the sample client. After the nth unsuccessful agreement, it became clear that this time the absolute accuracy of the model is needed. In any case, the client was sure that otherwise, if Armageddon did not occur for all mankind, at least something similar would happen. What could I do? Finally try 3D scanning! I then thought: "This is the modeling for the lazy." A minute of business - and everything, the model is ready! To my great surprise (and disappointment), it turned out that even the simplest 3D scanner costs a lot of money. Rather, very large. To buy it, I had to multiply the cost of this model by a number with five zeros. But if you can not buy, then we will do it yourself. Below I want to share with you the experience of how you can assemble a 3D scanner with your own hands. I will not only tell you which components and where to buy for this, but also how to use this scanner.

What do we need?


Make your 3D-scanner, as it turned out, you can literally from scrap materials: we need a special program, a laser pointer, a webcam, as well as some home-made devices.
')
Special software. The most important part of a scanner, including an expensive professional, is its brain - software that performs digitization. What we need are the tools that allow us to scan / digitize three-dimensional objects with the help of available tools: webcams and a laser pointer. These are DAVID-laserscanner and TriAngles , available for free testing, but with some limitations. The latter has a rather unpleasant limitation: for its operation a uniformly rotating table is needed, on which the object to be scanned will be located. In addition, there are strict requirements for the object itself. Its shape should be close to cylindrical, and even better spherical. DAVID-laserscanner does not impose such requirements, so I chose it. Despite the fact that the program is paid and its cost ranges from 199 to 229 euros, you can test it for as long as you want - there are no time limits. The only limitation is in the features of saving scan results. You can save scans, but in low quality. However, miracles sometimes happen in the open spaces of the Network, and if you manage to find a version of DAVID that keeps in high quality, it means that you will save on this. And who is looking for - he will always find.

Webcam. The parameters of the object, necessary for compiling the object, the program reads using a webcam. She may have you. If so - fine, you can try to turn everything with her. The main thing is that the resolution be at least 640 x 480. There are other requirements: the presence of manual focus (the ability to disable autofocus), a minimum of noise at high resolution, high-quality camera lens - the lens should not give strong distortion. The camera must be connected to the USB port and work on the WDM drivers (i.e., simply speaking, it must be visible for selection in the DAVID program). Most modern webcams meet these requirements, but only you and I can verify their compatibility with DAVID, so we can rely on the recommendations of the creators of the program in order to avoid any surprises. Of the cheap cameras, the developer himself recommends Logitech WebCam Pro 9000 with cam holder, which you can buy for a hundred dollars. I successfully scanned my Logitech C270 for about $ 35.


Configure the scanner

Laser module. For the scanner to work, a component that will give the line. It is the line, not the point. It is important! I read on the forums that a regular Chinese laser pointer would do, but it’s not. No matter how fast you drive with a laser pointer, it's all not that. I'll explain why later. Now one thing is important - you need a scanner that gives the line. Red, green, blue - the color of the scanner is unimportant. In general, you can do without a scanner, using alternative solutions (read in the box). But the laser module is definitely the easiest and most affordable option. I purchased a 650 nM red laser module with a 5 mW power line focusing, it cost $ 25. You can buy this anywhere, for example in a hardware store or through the Internet, as I did (it seems, at www.greenlaser.com.ua ). Modules of higher power (up to 20 mW) are not recommended for purchase, since their use is advisable in very rare cases. There are ready-made modules with autonomous power supply - if you find it, then buy it better. I also had to create a small snap-in for my laser module so that it was convenient to hold, turn on / off. I fed it with the usual crown of 9 V: the red wire “+”, the black “-”: if on the contrary, it will warm up and, as a result, will fail prematurely.

Calibration angle. Orient in space, being able to read the parameters of the image, allows the program a special adjustment - calibration angle. Do not worry, this is the cheapest component, which consists of two sheets with specially applied markers that need to be placed at an angle of 90 °. After installing DAVID, you will find files in PDF or CDR format in the root directory, for example “Calibpoints_Scale30_DIN_A4.pdf”. Or with the same name, but in CDR format for printing from CorelDraw. Select the file whose name matches the paper format on which you are going to print. In general, I advise you to proceed from the size of the scanned object. You should not make a big angle if you are going to scan small objects. For a start, A4 calibration sheets are fine. Harder to fix them at the right angle. I made my first corner like this - I simply bent the white corrugated cardboard, fixed it on the base, and then attached the calibration sheets to the butt joint. It is better not to glue them, since the sheets will become wavy - this is unacceptable. Instead, you can gently attach them around the edges of the tape. I must say that after the first scans, it became clear that the angle was not perfect. So I had to redo everything: I connected two pieces of chipboard, holding them together with corners. It turned out well: an angle of 90 °, the surface is perfectly smooth - all this could not be achieved with a corrugated cardboard. In short, there are many options.


Scan: with light and without

Create a model


Now the most interesting thing is to start the scanning process itself. Look around: there will surely be some souvenirs or statuettes in the room - any small object will be suitable for experiments. What is definitely not good is transparent or translucent objects. The laser beam should be reflected, not absorbed by objects. The creators of DAVID recommend in such cases to cover objects with talcum powder or, if you are not sorry, with spray paint. I did not bother myself and took a few statuettes. Conventionally, the scanning process can be divided into four stages, I will tell you more about each.

Stage 1. Calibration. This is a preliminary stage, so the object to be scanned for now is set aside. Fix the webcam against the calibration angle so that all components are fixed relative to each other. The camera should be placed at the lower edge of the calibration sheets. During camera calibration, the image should be bright. I scanned in the evening or afternoon, but with a shaded window, and the calibration angle illuminated with artificial light. The calibration itself is carried out in DAVID-laserscanner. We select our webcam from the list of devices, adjust the image: increase the brightness, contrast. As a result, only black markers are visible on the screen. Click the "Calibrate Camera" button. If everything is done correctly, the program will congratulate you that the calibration was successful. Otherwise, you can try to change the position of the webcam, play around with brightness and contrast. I did not do it the first time, but then the joy was like after the first session I passed!

Stage 2 Accommodation facility. To scan, you need to place the object in the corner of the calibration angle. For best results, it should be approximately in the middle of the calibration sheets. If its dimensions are small, you can use a stand: a box, books, a wooden bar of a suitable size. Tell the program the type of laser used. Next, put out the light! The screen should be dark. If not, lower the brightness values. Do not be afraid if the markers are not visible: the program remembers their location, and now they are not so important to us. Turn on the laser and direct it to an angle just above our subject. A broken white line should appear on the screen (the program analyzes the black and white image). The distance between the camera and the laser plane (i.e. the triangulation angle) must be as large as possible - this is necessary for greater accuracy. Otherwise, you will see a warning: "The angle of intersection is too small." At the beginning of the article I dissuaded you from using a point laser pointer, and here's why. Even quickly leading a point pointer, you will not only not get a flat line, but the program will not be able to calculate the magnitude of the triangulation angle.

Stage 3 Scanning. The scanning process starts after pressing the "Start" button. It is necessary to conduct a downward beam up and down several times in order for the program to read the parameters of the object through a webcam. There is an important point: you need to turn the brush with a laser, and not lower your hand! Speed ​​is not important, but do not try to do it very quickly. When scanning, I often looked not at the object, but at the screen, looking at how the program analyzes the shape of the object, drawing color lines on the screen. Looking at the screen is more convenient for two reasons. First, if the laser line is not visible on both sides of the object or the triangulation angle is insufficient, the program will immediately display a message (and you can fix it). Secondly, looking at the laser is tiring for the eyes because of the high contrast between the black background and the bright beam. Having passed on the subject beam up and down as long as it takes, press the button "Pause". Now you can save the scan result in a separate file using the "Save" button. There is another option - to immediately transfer the image for subsequent stitching with other scans, by pressing the “Transfer” button. When you click “Transfer”, the scan is transferred to the next stage (gluing together) without saving to the file, but we are not leaving the current stage and can repeat the scan by changing the object position (do not forget to press the “Delete” button before the new scan). Here it is important to understand: to create a model, you need to make several scans. For simple objects, it will be enough for you to rotate the object, for example, by 45º. If the surface of the object is complex, then you will need to scan it from different sides and only then sew scans. Another important point: scans must overlap each other to make it easier for the program to analyze them.

4th stage. Stitching forms. The last step before getting a model is the gluing of scans. If you did not save the scans, but transferred them to the gluing with the help of the corresponding button, then you can start stitching right away. Otherwise, click the "Add" button and load previously saved files. The stitching process can be divided into two stages: docking scans and actually stitching. Choosing pairwise scans, you point the program at the docking method. DAVID copes with this very well, provided that there is something to dock - the scans should overlap each other. If the patches do not overlap, you will have to go back to the previous stage and scan from those positions of the object that will give such an overlap. After completing the dock for all scans, click on the “Sew” button. Depending on the selected settings, after a few seconds we will see the result of stitching all scans into a single model. Click the "Save" button. Now you can download our model in ZBrush or Mudbox and bring it to perfection. The model is ready!
In the TriAngles program, due to the rotation of the object, the formation of the digitized surface would occur automatically, this is its advantage over DAVID. But how would she cope with the formation of the surface in the "dead" zones? I think in any way. Either in these places we would get an error. We wanted to get the model as accurate as possible. Therefore, additional actions for stitching scans will be considered necessary costs.


We finish the finished model in the 3D-editor

Instead of conclusion


Build a 3D scanner that will produce more than a decent result, it is quite possible at home. I hope you can make sure of it. Unfortunately, to scan small objects (and I needed to create objects for jewelry), we need a very good USB-camera with a CCD-matrix, which I don’t have (it is quite expensive), so my experience has remained the experience: apply it to In fact, to scan the jewelry did not work. But I experienced an unforgettable pleasure, getting full-fledged models of various objects with the help of a scanner that was assembled literally on my knee.


Homemade 3D-scanner allows you to get a good result


If there is no laser

For a 3D scan of an object, you can do without a laser (I'm not joking). A projector with a powerful lamp, the light of which needs to be directed through a narrow slit on the scanned object. Get a narrow white line - why not a white laser? However, in addition to the projector (which is not cheap by itself), we also need serious equipment to hold the projector in the right position. It is hemorrhoid. You can go from the opposite - to send a bright light, and on the object to hold a shadow from the tensioned thread: this is also provided by the developers of the program. In this case, the program can invert the processed image. However, something told me that it would not give a good result.

The developer’s website www.david-laserscanner.com has an excellent guide in Russian. Read it necessarily! There are described in detail both the hardware requirements, the scanning sequence, and various nuances that you may have.



image
Journal Hacker, October (10) 153
Edward Guz .

You can look through this material in a magazine layout here .

Subscribe to "Hacker"


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


All Articles