[MUSIC] After the 3D scanning process, you can export the result and see how much detail you've captured. But, it is not ready to turn into a physical object yet. Before 3D printing, it will require some post-processing to repair the mesh. In this video, I will walk through the one strategy for preparing a scan for 3D printing. This is Agisoft PhotoScan it is photogrammetry software that you can run on your own computer. It takes photographs, in this case the 74 photographs we took of our raspberry tart, and turns them into a 3D model. If you go to agisoft.com you can download a free demo of this so you can practice this technique of 3D scanning without investing in a license. So Standard Edition, you can download whatever works for your OS. The Professional Edition is if you have a cluster of hundreds of servers, you have thousands and thousands of photos to do. So maybe that's you, but we are going to use the Standard Edition for this video. So everything you need to do is in the Workflow menu. This is very intuitive software. We'll add the photos. We'll align the photos, which is what you see here with all these blue rectangles. These are the photographs and where the computer places them relative to each other. And then we will build a point cloud. This is the sparse point cloud. Then we'll build a dense point cloud, which is what we see here a very good representation of the surface. And then from there build a mesh which is the resulting model that we can export in 3D prints. So we'll start from the beginning, I'll hit New. I'll show off the photo set for a second here. Here's all the photographs we took with my cell phone. Again the cell phone was useful because it has a deep depth of field. We can get a lot of things in focus even when we're shooting close up. So, these photographs be a little tougher to get with an SLR. It'll be a good example of the limitations of using natural light especially with this kind of object. So, we have the sunlight come through the window. So we have this harsh shadows and reflections. So especially this kind of object will show the limitations of using photographs and what kind of objects that you can successfully get a model of. We have reflections, we have deep shadows. The custard is shiny, and the raspberries are a little bit see-through, a little bit translucent. Which is a problem with both raspberries and people. The color changes depending on how the light hits it. So this'll be a fairly challenging object for photogrammetry especially. So I'll demonstrate how good of a job Agisoft does, let's take a look. First step is to get these photos into the program. After opening Agisoft, If it's your first time running the program, it's important, this is in the manual but I'll show you anyway, to go to Tools > Preferences > OpenCL and make sure that it is using your graphics card, photogrammetry is graphics intensive. If you have a gaming card, it's going to help a lot. Make sure that Agisoft is using your graphics card, things will go a lot faster for you that way. So, Workflow > Add Photos. I can click on the first photo, scroll all the way down and hit Shift + click on the last photo and open all the photos at once, that appears over here as 74 photographs. And notice that it says 0/74 aligned. Let's see if we can change that with the next option. So I love this. As soon as you do one operation, the next operation appears. So you can't do anything wrong. You can't do anything out of order. Before we build the dense cloud, we have to align the photos. So the default values weren't great on here. With your accuracy, anytime you go up or down, you get an exponential increase or decrease in how long in this operation takes. So, we'll try to align the photos first, hit OK. [SOUND] After about ten minutes of processing, we're met with this view, we have a sparse point cloud which means that if I zoomed in there's really not a lot of information there, it's just a preview of what object Agisoft thinks it sees here. As well as all the positions of the camera you need to photograph. So, each one of these blue rectangles is where the camera was when I took the picture. So you can see you got pretty good coverage of the entire object. But we can also see that there is a little bit of a doubling going on here, the edge of the tart is duplicated. So, I'm going to solve two problems in one go because not only do we have a little extra information here that we don't want but there's a lot of information out here, if I zoom out, there's a lot of points representing the background, the room around the object. And the good thing about the sparse point cloud is that it is a preview of what it's going to have to process in the next step of the workflow, which is to build the dense point cloud. So, any points that we keep here, it's going to take time to add more points to it, to add more detail to it. So, I'm going to crop my 3D object here to get rid of all the extra points, so that we don't waste any time processing information we don't need. Up here by the Navigation button, we have some selection tools, a circle selection, a rectangle selection. But circle's going to be convenient for me and I can simply look at my object from the top down, use my circle selection tool, clicking direct from the center of the circle, and let go. If I go back to my navigation I can look at it from all sides and see that I've captured all of the tart except the duplication there and everything outside of it. So, after that selection I can click this button here to crop. This button here toggles the camera views. I don't need them anymore, so I can hide those. And now I just have my sparse point cloud that I want to turn into a dense point cloud. So let's go ahead and do that. Build Dense Cloud. Again, default value is going to be fine. It might take 20 minutes for me to do a medium, an hour, an hour and a half to do high. So let's stick with medium for now. [SOUND] So it might not look very different after doing all that processing but a new button has appeared up here. So this button shows the point cloud, this button shows the dense cloud. So, I click on that and our object will materialize. So, this is on medium quality. It shows us we have 22,000 points here to represent this object. Something that you might notice is that we selected only a small portion of the point cloud, and the dense clouds still adds up a lot of material. So before we finish this up, let's crop this one more time. Click and drag from the center. And crop, there we go. So now we have just the part that we want to export. So a point cloud is one form of 3D model that is useful for a lot of things. But for a 3D printing we need a mesh. So I'm going to go to Workflow and the last option here is Build Mesh. Again you can choose whether you want to do a medium setting or a high setting, but I'll do a medium setting so it doesn't take too long. Here is the resulting model and this is after performing both Workflow > Build Mesh and then after it processes the mesh it looks like this. It's a little bit uglier. But once it finishes that stuff of building the mesh then you can go to Workflow > Build Texture and it processes a little bit longer and produces this finished result. So it takes those photographs and applies it to the surface that it captured. So it looks really pretty photo realistic. You get some kind of funny effects from how bright some of the photographs were and how dark some of the other photographs were. But for the most part, it looks like a nice 3D scan. So from here, we can upload it to Sketchfab to share with others. But if you want a 3D printing there one more step to do. So it has this giant hole in the bottom, it's unsealed, so we couldn't send this directly to a 3D printer program. We'll use a program called NetFabb Basic to fill in that hole. But as it is I will show you how Agisoft can save this model and we will be done with Agisoft. So File > Export Model brings up this menu which gives you the choice of a lot of different file formats. I'm going to choose .obj because a lot of programs can open it including Sketchfab and NetFabb, so it's a nice universal file format. And I'll give it a name, I'll call it myTart and save that. And it asks if I want to save the texture. So if you don't have this option make sure you've selected build texture. But once you gotten that processed, if it looks like this you should have this option to export that texture. So I'll hit OK. And the result's in my file system, in myRaspberryTart folder. Down here is myTart.obj which is the mesh, myTart.jpeg which is the photograph, so this is the single photograph that wraps around the mesh to give it that photo realistic appearance. And then myTart.mtl which is a simple text file that basically tells a program what texture to use for this model. So to upload this to Sketchfab we need all three of these files, myTart.jpeg, myTart.mtl, myTart.obj, in a zip folder, so either .zip or .7z, something like that. So in Windows I can simply select all three files, right click and send to a compressed folder. And now this is ready to upload to Sketchfab. [NOISE] This is Netfabb Basic. It's free software, free to download and use, it's not open source. It's provided to show you few of the features of the professional software, but it still has some things that are very useful to us. So I will go ahead and open our model right here or you can either click here or right click anywhere and add a part. I'll open that .obj file which is just the mesh. And it'll show up really tiny down here because where in Agisoft it doesn't really matter how big it is, the scale doesn't really come into it. In NetFabb you're preparing to print it into a physical object, so it does consider how large the model is. So on import, we get 4.5 millimeters. This is a program where you can start scaling and rotating the object to prepare it for 3D printing. The only thing we care about at this moment is to fill in this hole. So the model is selected. The option exists right up here for repair. That's the only tool we'll really use here, is repair. And all we have to do is click Automatic Repair and Execute. So that fills in the bottom and we can apply, we can remove the old part, that old part is the one with a hole in it. And now we have a finished sealed model. As long as we're in here, if I was about to 3D print it, I could right click on this and rotate it. I'm looking down here and seeing that it has to be rotated along the x axis. So I'll say 90 degrees on the x axis. There we go, I can zoom in here. So now that it's rotated the right way, I can right-click and scale it. And I can tell it my target size, so that's really useful. I'll say I want this to be 75 millimeters, and then hit scale. And now I can move this around and right click to select and now grab it by the center to move it around. I can hold down shift to move around NetFabb. So it's right click to rotate, Shift + right click to pan, to navigate this 3D viewer a little bit different than others. Right click to select the model and I can move it around after that. So this also allows me to export this as an OBJ or an STL, for 3D printing I might use an STL. And I'll save it again, it'll automatically save myTart repaired.stl and I can save it and now optimize, sure, Export. And so now I'll have an STL file that is ready for 3D printing. So that is what we can use Netfabb for. [SOUND] The last step to share the model is to go to sketchfab.com. Once you're all logged into your own account, you can hit UPLOAD. And it tells you if you're only uploading a model, you can go ahead and hit the .obj and .stl. But if you have a texture which is also called a material, then you need to put all of your materials in a zip or otherwised a compressed folder. So, I'll choose my file and use that myTart.zip that i created from three my files here. So I can open that dot zip and it will tell me what files it found in there. At this point Sketchfab will tell you if there are errors, if there are problems with your model. But it shows me that these are all good and I can hit Continue and it let's me come up with a name. I'll call it Raspberry Tart with Texture. I can add tags at this point. And it's all uploaded, I'll hit CONTINUE. [SOUND] You're brought to its page, where you can edit its description. But you can also edit how it looks. So if I view this, it has a bit of different look than Agisoft gave me. So I can choose how it is rendered on the screen by going on to my 3D settings. So it brings you to this page, where I have a few options. If you brought in a model that was rotated incorrectly, you could correct the rotation here. But ours was already okay. But I will show you how to fix this particular problem. It's rendering it with a PBR engine where I'm going to use a classic engine to make it look the way Agisoft was showing it. So PBR, Classic, Metcap, that ignores the texture there. Those are just different ways of lighting the model, different ways of calculating the color of the model, so you can just choose which one looks best for your upload. We also have this neat adjustment you can make. So you can just decide what looks good for your object and whether there is no shading which I think looks best on this particular model because our photograph already had the shading in it. If we try to add lighting to it, it looks a little funny. So I'm going to just keep it without any shading, without special lighting, just show the photographic texture. So those are some of the options that you can use. You can change the background materials. Sketchfab has a lot of features that you can explore on your own. You can change how the background looks, upload your own photo. I think that looks okay. Lots of things to play around with. But once you're happy you can hit Publish. Save and publish. And in just a moment it will give you a link where you can share it. So here I can go to this address. Share this link with whoever I like. And it will load the model. I can full screen it. And there you have it. [MUSIC]