Search the Community
Showing results for tags 'photogrammetry'.
Found 3 results
DJandLIMON111 posted a topic in Fossil PhotographyCreating a 3D model using photogrammetry Their is another tutorial pinned on here both work well this way is a little easier because of only needing one program but both work! Requirements: Any camera even a cell phone but a decent camera will produce better quality textures for the 3D model. A tripod helps but not required. A decent PC creating the 3D model takes alot of PC resources so having a recent CPU and GPU will speed up the process. Good lighting is important for the object you are trying to create a model of. Finally patience taking 30-50 pictures takes some time and sometimes you will have to go back and take different ones. So the first step will be to acquire the program that compiles all the pictures i use 3DF Zephyr it makes this process alot easier as you only need this program to compete the model start to finish. The free version limits the amount of photos to 50 but you can get some very nice results with that many. 3DF Zephyr Free Version Download 3DF Zephyr from the link above and install and we can get started making the model! Taking the photos Here is how I have taken my pictures with a old microwave revolving plate: Or you can take them like this: Either way take pictures from every angle making sure that at least 40-50% of each photo is overlapping do the same from above the object or any area you want in the model. 2. Copy images from your phone/camera to your PC 3. Open 3DF Zephyr and click on workflow top left then click new project a new window will open click on next 4. You will now be able to import all your pictures Click the + and select all your photos once imported click next then next again 5.Once on this window make sure it is set like this: 6.Click next once settings are set as above and then click run: 7. It will take a moment once done it will tell you how many photos worked in creating a general model sometimes it is unable to get points in the photos but as long as the outcome gets most details in the fossil/object you should be good click finish and look over the model see how the detailed it is if it is not detailed enough you can take more photos up to 50 in the free version and start from step 1. You should see something along the lines of above photo. Next click Workflow>Advanced>Dense Point Cloud Generation: This is the part that will take time and a good CPU comes into play depending on how many pictures you have taken it can take up to an hour this is when the details show up: Now we will generate the mesh: Once the mesh is generated we can do the final step making a textured mesh: Once it has finished Click "File" on top left and then "Save as" give it a name and save it, then all that is left is to export as a .obj so we can upload it to sketchfab to share. We will now reduce the size of the model Sketchfab limits the model size to 50mb unless you pay for a membership. So now to reduce the size right click on mesh and click properties and when the window opens under "statistics" you will see it says "points" with a number in my case my model has 2,500,000 points Next right click the mesh again but this time click Filters>Decimation and set the points to 200,000-300,000 and click "clone & apply filter" it should not take too long Once it is done we will create a new textured mesh from it click Workflow>Textured Mesh Generation when the window opens make sure where it says "Mesh to use:" that our 2nd cloned mesh is selected "Mesh 1 Filtered 1" it it is selected click next and then you will see on top right :" Now we will generate the textured mesh final step besides exporting. You should now see under "Mesh 1" another mesh called "Mesh 1 Filtered 1" Click on Workflow>Textured Mesh Generation Make sure "Mesh 1 Filtered 1" is selected where it says "Mesh to use:" then click next Now where it says "Settings" click and select Advanced Set "Max. Texture Size:" to 4096x4096 Set "Max. number of textures to 1" Click next and then Run It wont take long once done we can finally export as a .OBJ to upload we should now have two textured meshs "Textured mesh 1" and "Textured mesh 2" Click Export on top left then "Export textured mesh..." Make sure "Textured mesh 2" is selected And set "Export format" to obj/mtl Click export give it a name and find a place on your pc to save it! Make sure the exported files are under 50MB unless you have a Sketchfab membership if it is still over 50mb go back and reduce the points some more until it is under 50mb It is now ready to upload to sketchfab or wherever you would like to share it Sketchfab has a tutorial on how to upload them here: https://help.sketchfab.com/hc/en-us/articles/202508836-Uploading-3D-Models Thanks for reading have fun making models! If anybody needs help let me know and i will try to help.
Prompted by recent discussions of 3D printing fossils, I want to start a topic for it. As ZiggieCie points out, 3D printing will have an increasing impact on the fossil world. The recent publication of the discovery of Homo naledi, accompanied by 86 3D-printable bone specimens, surely marks an inflection point in the scientific sharing of 3D fossil data. Popular sites describe how to print your own H. naledi fossils. Folks have shared prints of their own. Below is a 3D print from the authors of the study. Here on TFF, Cris himself has explored using photogrammetry to generate 3D data for a whale vertebra. (Photogrammetry is the use of photographs to make measurements, particularly precise distance measurements between surface points.) That prompts the question: can anything for which we have 3D data be 3D printed? The answer is: not without significant work. 3D viewable data and 3D printable data are very different. You can view 3D data that's pure fantasy. Consider a geometrically ideal plane with mathematically zero thickness. Easy to view on a computer screen. Quite impossible to produce in reality. And 3D printing is all about reality. The key idea is that, to 3D print an object, it must be a solid three-dimensional object that is watertight. Technically, it must be manifold: every object must be composed of polygons that share each edge with exactly one other polygon. Non-manifold objects can't be 3D printed. The 3D printing site Shapeways has a detailed tutorial on fixing non-manifold models. From personal experience, I can say that fixing manifold issues, even with models designed for 3D printing that have gone off the rails, can be a tremendous pain. Tools are getting better for fixing non-manifold models. At this stage in the development of the technology, it's still critical to know what manifold objects are. So for Cris's photogrammetry data, it can be visualized easily, but for 3D printing, it's a big deal that the bottom of the whale vertebra wasn't scanned. The model just ends in midair, meaning it's not manifold, and can't be 3D printed without repair work. Hope to hear more from others who have tried 3D printing. I've posted a topic on 3D printing a trilobite sculpture -- not fossil data -- which may also be helpful if you've never seen a 3D print being made before.
I decided to do a little experiment yesterday after reading a little about photogrammetry and how it's being used in archaeology for 3D scanning sites. The idea of digitizing fossils in 3D is very, very cool to me. I decided to do a little more research on it and possibly give it a try. For this experiment: All software was completely free. I didn't use an expensive camera....In fact, I used my smartphone to take all the photos. Image size was only 1000x1000px and quality wasn't that great (it's a phone) I didn't have a good light setup. I used the flash on my phone. I had no experience with any of this prior to this experiment. For the subject, I used a whale vert that has some odd preservation. It seems like it was crushed a little during fossilization. The whole thing is off center and cracked in a lot of places. I thought it would be a good fossil to play around with for this. So, I took 46 photos at different angles all around the fossil, making sure to keep the distance the same and tried my best to keep my phone's camera in focus. There were two main steps after the photos were taken. 1. Create a point cloud that could be put into a program and used to make a 3D model from the 46 2D photographs 2. Use the same 46 images to create a texture to apply to the new 3D model. Thankfully, both steps were much easier than I expected them to be thanks to some software created as research projects by different students in a few different universities. I'm happy with the results considering it was done with free software and a cell phone. I could have used higher resolution photos and it probably would have looked nicer, but I didn't for this first test. I plan on messing around with this sort of thing more. There's tons of filters and options in the different programs that I haven't tested to see what they would do...and I haven't even tried a real camera with better lighting yet. I'm guessing that a good camera in direct sunlight would make a huge difference. A couple of things on the model didn't come out right, but that was probably just because I didn't get enough photos from different angles in certain places. Also, the bottom of the vert where it was sitting on the table obviously didn't get photographed, so it's just black. I'm sure you could flip the thing over, do the whole thing again and then put it all together, but that would require a lot more experience with these programs. If anybody is interested in playing around with this themselves, I can post the programs used..or I could write out a tutorial. When some even better software comes out, I can see this becoming a pretty common thing. Imagine a "gallery" full of 3D fossil scans! Whale Vertebra 4½" Tall Miocene Hawthorn Fm. Alachua County, FL Here's an additional two-part scan done using this method and a DSLR camera with more photographs: Titanis walleri Phalanx Pleistocene Gilchrist County, FL Beginner Tutorial The Programs & Configuration First, you need Visual SFM. (This is the program that turns the photos into a 3D point cloud) Next, you need CMVS for Windows or if you're not on Windows, go here. (This is just a few files that we put into Visual SFM that helps create our texture that gets applied to the 3D model) The last thing you'll need is Meshlab. (This is a very powerful 3D program that does all kinds of stuff. We'll be using it to turn our 3D point cloud into an actual model and apply our material to it...among a couple other things) Download Visual SFM & CMVS then extract them. Navigate to the correct folder for your computer and copy the contents of the CMVS folder. I'm on Windows 7 64 bit, so I went to the first folder I extracted, "CMVS-PMVS-master" > CMVS-PMVS-master > binariesWin-Linux > Win64-VS2010 and copied everything in there (minus the Readme.txt). Paste those files directly into the Visual SFM folder (the one with all the .dll files where the application to launch the program is) that you just extracted. Obviously, this is a one time thing. You get those files in the right place and every time you open Visual FSM to make a 3D model, it'll have CMVS right where it needs to be. Photographing When I took my photos, I placed the vert on a piece of newspaper with a lot of different colors, lines, images, etc. It's important that the software has common places of reference between different images so it can map out he point cloud accurately. Here's my vert set up ready to be photographed: Thinking about it now, it probably would have been smarter to elevate the vert slightly above the newspaper on a little block or something. I had a little trouble cropping the bright newspaper away from the vert. I took photos starting at a low angle spaced out as I slowly rotated around the fossil. I'd take a pic, move a tiny bit, take another, move a tiny bit, etc. Here's what four of my photos in sequence look like: I went in a full circle until I was sure that I had rotated around the fossil completely and even overlapped a bit, taking photos of the same angle I started with (better to have too many than too few). Then I angled the camera (well, phone in this case) at about a 45 degree angle and rotated around the fossil completely again. Those photos look like this: As you can tell, this are not great photos. I think that the model would have turned out much better looking if I took better photos in better lighting. After I completed that pass, I took one photo of the very top of the vert, facing downward. I made sure to always get a fair amount of the newspaper for tracking purposes. Then I used a great free program called Photoscape and it's batch editor to apply the same filter and crop to all the images at once. Make sure not to crop out your newspaper or whatever you're using to help with tracking. Do not use images with larger dimensions than 3200px! I read in a couple places that this would cause worse tracking and a lot of other problems. If you want to experiment with larger than that, go for it and see what happens..When I tried it, the program ran for a very long time and eventually froze my computer...but my original images were over 5000px each. Visual SFM When your photos are done, open up Visual SFM by going to the folder you extracted and clicking on the application. This is what it looks like: I wrote out some arrows to the things you'll be using in there. #1 is Open Multiple Images. Just click that, navigate to your images and upload them. You'll see the log window to the right doing some stuff....You should see your image thumbnails in the program in just a few moments. When that's done and there's no more activity in the log window, click on #2, Compute Missing Matches. This is the first thing that some computers could have trouble with. This one can take a little while depending on how many images you have and how large they are. When this is done and there's no more activity in the log window, we can get to the cool stuff. Click on #3, Compute 3D Reconstruction. This part is seriously amazing. It takes all of your images and automatically calculates where you were in relation to the object when you took the photo. Then it shows all the places an image was taken and it displays the point cloud in the center. It looks like this: The squares are everywhere I took a photo...You can see that I did a circle around the fossil down low and then a very sloppy "circle" above it. In the center, you'll see your sparse point cloud. If you want to make the little image icons bigger or smaller, it's ctrl + mouse wheel, if you want to change the size of the point cloud points, it's ctrl + alt. Time for the next step. When you clicked on button #3 and got your point cloud, a couple new buttons showed up. This is the one you need: #4 is Run Dense Reconstruction. When you click this, it's going to act like you're saving something. What you're doing is giving the software a directory to dump the files it's going to create. Make a new folder, give the file some name and click save. When you click save, look at the log window (if it's gone, the show/hide button for it is at the top, far left) and look for this: If you see the highlighted part, it means you correctly moved over the files from the CMVS folder you downloaded into the Visual SFM folder. It'll tell you that "this could take quite some time" and it definitely does. For my project (46 images at about 1.2MB each - 1000x1000px) it took 5 - 10 minutes, but before I resized those photos they were over 5000px each and this step ran for nearly an hour before my computer finally froze. Like I mentioned above in the photography part, I read in a few places that your images should be below 3200px on the longest side. You might want to think about closing down other programs that use up a lot of memory while you run this unless your computer has a lot of memory to spare. I closed out my browser and a bunch of other stuff just in case. When the log window says this is done, you should be able to hit Tab on your keyboard and see your dense point cloud....again, you can mess with the size of the points with ctrl + mouse wheel. This is still just a point cloud even though you'll start to see some color and image coming through. There's no need to save anything after this step is done. The program automatically wrote everything you need into the new folder that you created. And that's it for Visual SFM! Meshlab Go ahead and install Meshlab if you haven't already. It can look a little overwhelming at first, but we'll only be doing a couple pretty basic things. This is what Meshlab looks like: Go up to File and click Open Project (or the second button from the left, #1 in the photo above). Remember the folder you had to create when doing the last step (the dense point cloud) in Visual SFM? Navigate to that folder and you'll see a .nvm folder with the name. Open that file. It'll take a few moments to open. When it does, you'll see your point cloud open up into the program (upside down). Now is a good time to try to learn how to navigate around the viewport. The mouse wheel zooms in and out. Holding the left mouse button and moving the mouse rotates around the center. Holding the mouse scroll wheel and moving the mouse will pan the point cloud (or later, the mesh) around. I usually center it in the middle of the center rotation widget. Holding Alt and scrolling the mouse wheel will change the size of your point cloud points....You may need to do that to make them easier to see since we need to delete some soon. All this might take a little getting used to, but if you're patient you'll get the hang of it. Next, click on Show Layer Dialog, the #2 button in the image above. You'll see the little window on the right pop up. If you're at all familiar with photo editing, this layer window should be pretty familiar to you. Now we need to get our cameras showing up. Go to Render (#3) > Show Camera (#4). From there, go over to drop down arrow next to Show Camera on your side window below your layers (#5) and click it. Check on the Scale Factor here and make sure it's set to something like 0.04 or smaller depending on what you want. When I first did this, the camera scale factor was very high when I first clicked on Show Camera and it made it so I couldn't see my point cloud anymore. Time for bringing in our dense point cloud. First, click the little eye next to your layer in the side bar (#6) and you'll see your point cloud disappear. Next, go to File > Import Mesh (#7) and navigate to the same folder you created in Visual SFM where your .nvm file was. You'll see in the same folder a .ply file with the same name. Click that and import it. Reposition the mesh in the center and zoom in. Under Show Camera on the side bar, you may want to uncheck Show Raster Cameras so they don't get in your way for this next step. We're going to be selecting and deleting the stuff that we don't want in our finished model. Position your model carefully and click the Select Vertexes (#8) button. You can then click with the mouse and drag a rectangular selection around the stuff you don't want (#9). Be careful NOT to delete any of the actual model, only the surrounding stuff that was used for tracking (the newspaper in my case) and any random artifacts that might be hovering above or around the model. This isn't difficult, but it can be a little time consuming. This is why I recommended above that you elevate your fossil on a little block or something. Then you could just change to a side view and delete all the newspaper at once, cutting the block in half. When you drag the box around the stuff you don't want, that stuff will turn red meaning it's selected (see #9). When you have the right stuff selected, click #10, which is a Delete Vertices button. The area selected is gone now. Repeat 8, 9 and 10 changing angles carefully to get rid of everything that you need gone. Sometimes the wrong layer gets automatically selected (the invisible one) and when you hit the delete button, it won't do anything. Just click the layer ending in .0.ply if the top one gets selected and keep going. Don't hit the delete button if even a tiny piece of the model is selected...There's no undo button that I've seen, so if you make that mistake, you may have to go back to step 7 and import the mesh again. Here's another angle I used: Remember that you can hold Alt and scroll the mouse wheel to make the points bigger and smaller. If they're too small, you'll have trouble seeing what to delete and what not to. Next, go to Filters > Point Set > Surface Reconstruction: Poisson (#11) here: Then change the settings in the box that pops up to 12, 7, 1, 1 (or experiment a little, but that's what I used) like this: When that's done, hit apply and let it run. What comes out is a 3D model of your fossil! It's just missing the texture right now, but it's still very cool looking. Click the little eye on the layer that ends with .0.ply to hide it. It'll look something like this: Next, we need to go to go to Filters > Selection > Select Non Manifold Edges (#12), making sure the right layer is selected like so: A box will pop up. Just hit apply, then click the Delete Vertices (#13) button. This is just a preventative measure, you shouldn't notice much happening when you click delete. We're getting close! Just one last step and you'll have a fully textured 3D model. Go to Filters > Texture > Parameterization + texturing from registered rasters (#14). A box will pop up. I doubled the size of the texture and left everything else default. The default is 1024, I changed that to 2048. Go ahead and name your texture whatever you want. This step is taking all those images we took and making a single image file that has all angles on it. Hit apply. And there you go! A fully textured 3D model of a fossil from nothing but images: You can go ahead and export your model now. Click File > Export Mesh, give it a name, select the file type drop down here: I made sure to save in a couple different file formats. I saved in .obj and .dae. When you go to upload the 3D model somewhere, all you have to do is upload one of these files and then find your texture image that you created on step (#14) to apply to it. Keep in mind that this technique is not limited to small objects. You can map out environments in 3D too. Archaeologists use this technique (usually with high tech equipment) to take 3D models of archaeological dig sites. This technique can also be used for very detailed topographic mapping if you had a way of taking aerial pics. I'd love to see if anybody gives this thing a shot. If you try it and have trouble, let me know...I'm still very much a newbie at all this, but I'll do whatever I can to help figure it out. I'll post more in this thread as I make more 3D fossils. If anybody gives this a shot, have fun! It's definitely a learning experience. -Cris