It's Time To Put Open Source Photogrammetry In Your Toolbox

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
recently I watched Superfast Matt's video on why we should add a 3D scanner to our toolbox it inspired me to share my workflow to get physical objects into CAD using photogrammetry and exclusively open source software the requirements for this process are a camera such as your smartphone and an Nvidia GPU that supports Cuda to begin with we will need to prepare our object photogrammetry has trouble with transparent and reflective surfaces as an example scanning this reflective container as it is will give us a poor result like this how you prepare your object is a trade-off between High scan quality low cost and easy cleaning if your part is simple and you only need certain areas to be reconstructed you can cover these parts with masking tape while this will result in lower quality cleanup is simple and cost is close to none for more complex Parts you will want to use something that can be applied as a spray a cost-effective solution is foot powder which can be wiped or washed off if you won't be able to wash your object commercial products such as sublimating scanning sprays disappear after a few hours without leaving any residue after covering the container in foot powder the 3D model is a lot better after we treated the surface we want to place our object in a well and evenly lit area next to it we place an object with known Dimensions later this will allow us to scale the mesh to real world dimensions in this case I'll be using a ruler the next step is to take pictures after we started we may not change or move anything that will confuse the photogrammetry software take pictures orbiting around the object the amount of pictures depends on the complexity of the object but 100 is a good starting point focus on areas where Precision is important to you keep camera settings such as focal length consistent the rest of the workflow takes place at your PC create a project folder and copy the pictures into an image folder we open mesh room and create a project file in our project folder after importing the images we need to verify that the camera intrinsics are set mushroom extracts that information about your camera from image metadata and completes it with an internal database if your metadata is incorrect or your camera is not in the database follow this guide to add your device we will have to change the texture file format to PNG because exr is not supported in mesh lab now save the project and press start after mesh room finished processing double-click the texturing and meshing node to preview the textured and untextured mesh now we use mesh lab to scale and clean up our mesh we open mesh lab and import our textured mesh that mashroom created for us you will find it in your project folder under mushroom cache texturing and a folder of seemingly random characters a few tricks to make mesh lab more usable if your mesh is large and you are experiencing performance issues it might be that mesh lab is using the Legacy immediate mode rendering instead of the more performant buffer object rendering to fix that we can configure mashlab to dedicate more GPU memory to the geometry open the options window and select Max GPU mem dedicated to Geometry here you can increase the memory in megabytes and save your changes after restarting mesh lab and loading the mesh you should see po rendering mode in use while mesh lab does not have an undo button you can always duplicate your current layer and apply changes to that copy if you don't like the result delete the layer and try again use the measuring tool to measure the distance of our reference dimension when using a mesh lab tool press escape to switch between the tool and manipulating the trackball calculate a scaling Factor by dividing the real world Dimension by the mesh lab dimension use this factor in the scale filter and make sure to use a period as the decimal separator if you now can't see your model properly use the reset trackball option to recenter it at this point we hide the textures as we don't need them anymore we want to orient and translate the mesh so that it is mostly centered and the floor lies in the X Y plane use the selection brush tool to select faces that are in a plane and run the rotate to fit to a plane filter after resetting the trackball and clearing the selection we can turn on the X Y and Z axes to confirm the mesh is aligned if it is still flipped use the rotate filter to turn it by 180 degrees at this point we trim away the parts of the mesh we don't need use the select faces inside a polyline tool draw a polyline press Q to add to the selection and I to invert once happy with the selection delete the selected faces and vertices to make a selection it can be beneficial to enable the orthographic camera I will repeat the same trimming steps for the floor without inverting the selection this time the remove isolated pieces filter is useful to remove small blobs that aren't connected to the rest of the mesh and smaller than a specified diameter the default settings work well there are several filters we run to repair our mesh so that later filters don't fail with error messages the ones I use are remove duplicate faces remove duplicate vertices remove unreferenced vertices remove zero area faces and repair non-manifold edges the mesh we have now has too many faces and vertices to be useful in CAD software there are many filters to simplify our mesh quadratic Edge collapse decimation works well and allows us to specify the target number of faces here I use 100 000. I've also had good experiences with surface reconstruction screen poisson remeshing isotropic explicit remeshing and uniform mesh resampling to visualize the changes better we can hide faces and show points or the wireframe experiment with different filters and don't forget to duplicate your layer our last step in mesh lab is to export to an obj file at this point you have your mesh and can use it with any CAD software of your choice I will show how I use freecad an open source parametric modeler I import the mesh using the mesh design workbench and create a shape from the mesh using the part workbench I create a new body in the part design workbench and create a sub-shape binder to get the mesh shape into the body I changed its appearance by disabling transparency to make selecting vertices easier a process I find useful is to attach a datum plane to the mesh with the help of three vertices I can then attach a sketch to that plane and draw geometry with the mesh as a reference this sketch allows me to measure Dimensions which would be hard to take physically or create new geometry that was it easy right Jokes Aside while this process is quite complex it allows you to get started with 3D scanning without first having to invest into specialized Hardware or software I highly recommend you watch super fast meds video to see which tools are available to you once you reach the limits of photogrammetry
Info
Channel: Daniel Jutz
Views: 174,535
Rating: undefined out of 5
Keywords:
Id: 8wQGbmLulBw
Channel Id: undefined
Length: 9min 22sec (562 seconds)
Published: Mon May 15 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.