Complete Photogrammetry course, part 1 of 5 (part 2-5 in description)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys welcome to the first video of my photogrammetry series so there are a lot of information online like on youtube covering how to do photogrammetry and there are bazillions of ways to do photogrammetry but i find most of these videos flawed in some way they're always something that they could have done a lot better and i've tried to streamline and perfect my process to overcome that because usually i mean you want to have some high quality scans obviously but it's also important to be time efficient you have to be do you have to be able to produce it fairly fast with the high quality and i found out that you don't have to choose between quality and speed you just have to do it the right way and for those of you who don't know what is photogrammetry well photogrammetry is when you shoot an object in a load of different angles and then you have a software to calculate the 3d data out of that by combining the angles and comparing them to each other there are a bunch of different programs to use you can have like the free versions like autodesk one to 3d which is cloud-based or you can have the more professional ones agisoft metashape or reality capture and i will actually focus on the professional ones because i you know i don't see a point of using the cloud-based cheaper simpler or the free versions of softwares in this case because what we are looking for is quality and throughout this series i will go through both programs agisoft and reality capture and why i will do that is not only you know partly because that was part of my own process my development process i started in one end i ended up in the other and i want to show you that process but also because i want you to be able to make your own decisions because the one program is not necessarily better than the other and it's good for you to know the differences of them and to be able to make up your own mind of what you want to use so in this series i will go through um basically from start to finish where i started doing photogrammetry and where most people do it basically with a phone and just walking outside and scanning things and i will go through it step by step to the point where i am today and also go through all the things that i learned through this process and there are a lot of questions that we have to cover along the way and like do i need like 500 images or can i do with 50 do i need like a 35 millimeter or can i use an 80 millimeter do i need prime lenses or zoom lenses do i need tripods do i need special lighting like soft boxes and stuff what is cross polarization and do i need it do i have to spend a fortune on gear and stuff like that to quickly answer the last question no you don't have to spend a fortune on gear but if you do you will get better results the quality is a direct result of what gear you're using so without further ado let's begin so this would be a very common place to start when you don't have any specific gear you would walk outside and just start shooting with your phone like this in all different kinds of angles and up and down and there are a couple problems with this so you are very depending actually on the lighting because you don't want to have sunlight because when you're doing photogrammetry you want to have your model unlit basically you don't want to have any lighting on it and right now if i would capture this right now i would get the sunlight in the shadows baked into the texture so shooting outside you are very weather dependent and another issue is that even though phones are actually really good today they're not really good enough so if you're not going to shoot with your phone then what should you use well obviously a real camera and currently oh jesus i'm having a mirror here just to show you because i can't film it currently i am using a sony a7r iii um anyway so the question is do you need such an expensive camera well no you don't but also you know how they say that megapixels don't really matter well in this case it actually does because the higher resolution images you can get the more 3d details you can have and also the bigger resolution textures you can get out of your scans so yeah you can absolutely use a cheaper camera and you can get amazing results out of that too but just bear in mind that it does affect the quality so what about lenses you have prime lenses you have zoom lenses you have wide angle you have tele lenses what is the best choice photogrammetry well i've basically tried them all here's an 80 millimeter 18 millimeter here's a 50 millimeter macro here's a 35 millimeter 85 millimeter 28 to 75 zoom lens a 100 millimeter macro and 105 millimeter actually i haven't used this i just uh i wanted to show it because it's it's so anyway uh don't use that what is the best choice i have realized by trying them all that it doesn't really matter what i have learned though is that it does actually affect the depth of field because if you use a lens with a smaller field of view like the 50 millimeter you will actually have shorter depth of field but what you want to have when you're doing photogrammetry is you want to have as much depth as possible so you don't want to have any blur on the object you're shooting so if you like shooting from up here you're focusing on this part you don't want to have this part blurred um because that will ruin your textures or make it a lot harder for you to to you know work the data so you want to have a lens with as high aperture number as possible some of them are like 18 some of them go to like aperture 22 so you want to have as high as possible so you can get as long depth of field as possible so you can use whatever you want really you will get some different trades from different kinds of lenses like for this example i get really really sharp images but i can't get close with this i can get close i get really sharp images because it's a prime lens but i will have issues with depth of field being more blurred than the others and with this one for example i can get really close i can get good depth of field but i am getting a little bit worse sharpness so some of these three i use that one use whatever you want so my next step is to move inside and how do you easiest shoot your objects in all different kinds of directions while being inside you can't just move around the object so yeah i got some kind of simple lazy susan this is just some kind of ikea table rotary table you can move it around so basically you can take a picture you can move it around take another picture move it around you do like that and then you move the cameras to get a higher position and then do the same thing all over so you get 360 degrees in different heights um but there's still one more problem because right now i'm having the aperture set to 2.8 which is too low because i will get a lot of depth of field so i have to change that to as high as possible which means that i will have to lower sorry i'm aiming wrong which means that i will have to lower the exposure time and here we have i need to go down to like two and a half seconds you don't want to crank up the iso because you don't want to induce noise in the images so keep isos as low lowest possible aperture as small as possible or in this case as high number as possible and then you only have the shutter speed to play with which means they will have to go really high so to be able to capture this now i will have to shoot it for two and a half seconds per image like that so you can imagine this takes a long time to move shoot the image move you get the point so how could i speed up this process because we have one more problem here and that is the lighting we have this ugly yellow lighting in here uh also actually we have shadows which you don't want to have so we can solve both the shutter speed issue and the lighting issue pretty easily and that's to get a flash so here's the solution ring flash now this is the godox ar 400 which is a ring flash which please bear this in mind there is a difference between ring flashes and ring lights now this one has a real strobe flash inside of it so you get really powerful light now you there are other leds like led lights as well which kind of feel the same purpose you place the camera here and you get the light from directly from the camera so you get you will basically remove all the shadows on the object to that extent they do the same job but please bear in mind that the led lights they're not very strong so you will still have to stop this table between each photo and i'll come back to that but it is important also i would suggest that you get one of these it's a quick release from manfrotto that you place here so that way you don't have to screw the camera on and off all the time when you're removing it so here's that quick release in place and all i have to do is to place the camera and click it on and there it sits like that now you can adjust here these knobs will adjust the height of this so you can get the lens centered now i have to tell you though this flash godox has discontinued it and i've noticed that it's actually really hard to get a this kind of flash right now you can there's like these elinchrom flashes which are like i don't know two or three times the price so this one is really really affordable and it is discontinued and they have not replaced it with a new model so if you want this flash and you can find it anywhere buy it before anyone else buys it first because you will you will not get hold of these so all i have to do now is to connect the flash to the camera so i have the sync sync pc sync cable there just plug it in and on this side i have a 35 millimeter uh the 3.5 millimeter just audio jack you can have a piece of sync as well if you have that kind of cable so i just turned this on now i have f 22 so the highest possible with this lens iso 100 and the shutter speed won uh 125th of a second so if i click this now did i get focused on that one yeah you can see that we have basically no visible shadows on the object so the lighting issue and the long shutter speed issue is solved so now we have another problem or i mean we had before too but we haven't solved it until now and that is that the principles of photogrammetry is that you walk around the object and the difference between angles it can it can compare them and by that read depth data and generate a 3d model out of that the problem right now is that we are having the camera fixed so even if we rotate the object the wall in the background is not moving and you will not trick the programs it'll focus on the ball and it'll be totally impossible to align this point cloud there are a couple of solutions to this like you made a shape for example you can add you can paint your own masks around the object which takes a lot of time if you're going to do that on 300 images another way is that you can remove the object and you can take a photo of the background like this and then you add the object and the program can itself find you know it can auto mask the object because it compares with the empty one and it knows what is background and what is object so that way that's a workaround but it's not very efficient it's not very accurate i mean you can get good results of it but i don't trust it so the best way we can do is to totally get rid of the background so here was my solution to this problem i bought a photo tent pretty big one but these come with a background as well completely black fabric so i'm not only solving kind of solving the background issue but i'm also adding some light because the light from the flash will bounce in these sides here and i will have some light coming from the sides of the object because when you have the light only from the front you will get these kind of dark outlines or shadows on the edges of the object because the light is is coming from you know such a steep angle while here these walls kind of helps um illuminating the object from the side and from the top a little bit not very much but a little so if i shoot this now there is not a lot of features in the background anymore for the program to stick to and this way it's a lot easier for you to trick the program that the camera is actually moving around the object it's not perfect if i zoom in here i can you can still see some textures in the background here so it's not perfect but you can in this case go into photoshop if you're shooting raw especially always shoot raw if you go into photoshop or camera raw you can just remove the blacks a little bit so you you uh you make this background a little bit darker there is however another solution and we will come to that in a bit but for now there is another problem i want to solve because i still have to move this table click move click and that takes a lot of time i don't want to do that so let's figure that out as well i'm giving you guys such an easy ride right now because all these problems that i'm solving right now step by step has taken me months to do and the problem with many like youtube videos stuff covering photogrammetry is that they they don't actually go through these problems so even though they can give you the final solution you won't learn why you had to take care or why you had to think about these things from the beginning so anyway let's move on so to solve this issue with with uh this really time consuming process i got myself a rotary table a motorized rotor table i just click this button and it starts to rotate now this in particular is making one circle in every 32 seconds and you want to pay attention to how fast they go another thing that you can you can keep in mind if you go out and google for these you will find these tables that are actually made for photography so you they have like a like a camera trigger built in so they move a little bit and then they stop trigger the camera and then they move a little bit stop trigger the camera and by having one of those you can easily use a ring led ring light instead of a flash because you can still have long shutter times and that is totally okay you will get good results out of that but however i think it takes too long i want to be time efficient so i don't want to wait for that that to stop and then having several seconds of shutter speed so by having a table like this that never stops and having a real ring flash i can shoot these while it's moving like that you can see that i still get sharp images thanks to the real flash the strobe i never have to stop the table really time efficient now the trick here to make this really time efficient is to use the built-in time-lapse feature in the camera depending on what camera you have it might or might not have such a feature and it might be named differently in the sony a7 i have something called interval shooting so if i can click that i can turn it on i can set the interval to one second so it's one second between each shot and because i know that this table takes 32 seconds to go one full circle i set this number of shots to 32 and now when i start shooting it'll just shoot all the images for me i don't have to do anything so now we are getting somewhere now this is actually becoming efficient however now we have another problem and i could show this to you in in the computer but i i don't want to waste your time do i can just explain it basically so what we have now if i look at this image we have this object which is pretty easy to track you know figure out so this would work pretty well but let's say i would have an object like this that is there's no apparent features they can track it's just one circular shape so the programs would have a really hard time figure you know aligning these images because now you have no features to track on the wall you have no features to track on the table the only features it can track on to align the images is the object itself and now you have some texture obviously but that is not always enough there is a couple of solutions one would be that you can go in in the photos afterwards and manually mark control points which in this case is pretty hard you have some kind of spots like here that you can add control points on to help it align the images but that is also manual work and you want to cut out all the manual work you can so there is an another thing that i tried so in order to get some more patterns for the program to be able to um to use just to align the camera's position in relation to the object i tried printing out a cow pattern so this is just something i find found on google you search for different kinds of patterns and i found a youtube channel that recommended a cow pattern so i found this on google i printed out on two pieces of paper and just taped them together like this also i added some lines with a ruler here and some circles to be able to easier find the center of the of the table so the other one would the object wouldn't like rotate around like this also i added some random letters and numbers around here to have additionally some more data for the programs to track and figure out the camera's position so i just put it on here put the object there you know if i shoot that will now see that i have a lot of features for the program to track and figure out the position of the cameras however now there is one more thing that i want to solve before before going into agisoft and reality capture to generate this mesh and that is reflections now reflections is a real problem when it comes to photogrammetry scanning because if you have an object that reflects a little bit like the flash or the surroundings you will have some really hard time aligning the images and figure out the the shape because a reflection the program will believe that the reflection is part of the shape even if it's not and then when the reflection moves it'll get confused you will not get a proper mesh so it's really important to be able to remove reflections and there is one way to do that and that is called cross polarization i'll give my best shot at explaining cross polarization i don't know much about it myself and there might be some fact issues in my explanation but i will try my best so basically when you have a light source what i do know is that light is electromagnetic waves and light is traveling these waves are traveling like this in all kinds of directions and this is basically um i don't know if you can call this a polarization but it is a direction at least so when you have a light source you have a surface you have a camera so when the light is leaving the light source it is going in all kinds of directions just like here and then when it's hitting the surface it is getting polarized by the surface so meaning that maybe the blue waves in this case waves that are going in one direction are filtered out partly so that means that the light that is coming into the camera is already partly polarized so if you have a polarization filter just a glass filter that basically allows light from one direction to travel through but it blocks the light from the other direction then you can remove reflections because the the light that is coming from that reflection is polarized in a certain way that it cannot travel through this lens however a surface is usually never fully polarized so that's why we i have to draw this again so that's why we have to add a polarization filter to the light source as well so the polarization here from this light is polarized in one direction and then when it comes back to the light here we can filter out everything but that direction something like that here are an illustration that shows what what a polarization filter does basically it blocks the light from certain angles to travel through and only letting through light from one certain angle so that's also why we will get a lot darker result when we are having polarization filters because a lot of the light is just not coming through so here i have the polarization film and i printed like a holder for that that i can put on the flash if you don't have the possibility to print this i've shared this file for free so if you have a 3d printer you can print this one if you don't have it you can just basically cut this fill manually and just tape it in front of the flash right here so now i'll just place this on my flash and now i made sure that all the light that is leaving the flash is polarized and then here is the polarization lens that i use this is from case but you can use whatever just make sure that you don't cheap out on this stuff because the cheapest filters they are not very good and they can introduce issues with the sharpness and and other you know all kinds of different artifacts in your images so make sure that you buy some quality stuff and now in order to calibrate this i just use a christmas ball so i can get some really nice reflections and i'll uh turn on the light on the flash so you can see now the led light is turned on there so i can see the reflection and then on the camera i'll just zoom in so oops here you can see the reflection of the light right there and i'll just rotate this filter until the light disappears you can see it's coming back now again if i rotate like that so this is there's a sweet spot where this filter on the flash is perfectly aligned with the filter on the lens and now it kills all the reflections you will still have reflections though from the table i mean from the tent for example or your environment and if i take a sh take a photo i can obviously still see the reflections of the tent here but you can see when i zoom in here on the flash there's no light it's completely black there's another benefit of doing this and also a downside the benefit is that since you're polarizing the light you're also polarizing the reflections hitting the back of the image i mean the tent so you can see now if i zoom in the back of the tent is completely black so now i don't have to do much that i can i still might have to like drag down the blacks a little bit in the photos but not very much however there is a downside of this as well and that if i flip through the images here now this is unpolarized this is cross polarized you can tell the big difference i have basically killed half of the light and that's because all the light that is polarized um in the direction that is opposite to what my lens is set to will be killed is removed it will not get through the lens which means that i in this case have to crank up the iso a little bit to 200 or i could use a higher strength of the flash but if i go more than to a fourth of power it will not be able to recharge before the next photo is triggering one second after so one fourth is the highest i can go i just want to crop this a little bit and this is what you want to have this is a perfect result and that's where this cowl pattern comes in you can see here this one looks amazing this is just great so i like this result we have a nice clean mesh so now we have an unwrapped model on a mesh that has subdivision history which we couldn't do before change the lighting a little bit as well so we got some kind of night scene so anyway here we have our aligned scan it is looking flawless looking really really good so also polygroup these individually which i don't want to have so this is why i use reality capture instead of agrisoft now what if you end up with two components when you're aligning your images here i have one component so now you can see we have a new component here which 192 out of 192 cameras so we have a successful scan looking good this is what we're being scanning today taking the model into 3ds max fixing it up and then taking it back to zbrush and then back to reality capture a little bit of tricky but you can see here these amazing nice details we're getting out of this so this is a process that i am happy to share with you so i hope you will like this video you
Info
Channel: Texture Supply
Views: 55,850
Rating: undefined out of 5
Keywords:
Id: 010lAKpr7JE
Channel Id: undefined
Length: 29min 1sec (1741 seconds)
Published: Sun Jul 19 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.