{"id":55926,"date":"2018-10-18T17:59:54","date_gmt":"2018-10-18T17:59:54","guid":{"rendered":"http:\/\/gamefromscratch.com\/post.aspx?id=f7a1358c-5c10-4395-a0f3-5eb0ef0e499d"},"modified":"2018-10-18T17:59:54","modified_gmt":"2018-10-18T17:59:54","slug":"creating-3d-models-from-photos-using-meshroom","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2018\/10\/18\/creating-3d-models-from-photos-using-meshroom\/","title":{"rendered":"Creating 3D Models From Photos Using Meshroom"},"content":{"rendered":"<p><a href=\"https:\/\/alicevision.github.io\/#meshroom\">Meshroom<\/a> is a new, free and open source photogrammetry software from AliceVision.\u00a0 Photogrammetry software enable you to create a 3D scene using a series of photographs, generally the more the merrier.\u00a0 Currently documentation is a bit lacking, so I\u2019ve decided to create this quick tutorial.\u00a0 In this tutorial we are going to quickly walk through the process of using Meshroom using a photoset <a href=\"https:\/\/blenderartists.org\/t\/meshroom-free-photogrammetry\/1120286\/98\">available here<\/a>.\u00a0 That post links to a zip file containing 50 images that are confirmed to work with Meshroom.\u00a0 Simply extract them somewhere on your drive.\u00a0 Of course you need to download Meshroom, which is available for download <a href=\"https:\/\/github.com\/alicevision\/meshroom\/releases\/tag\/v2018.1.0\">right here<\/a>.\u00a0 Simply download the archive, extract then execute the Meshroom application.\u00a0 Note <strong>Meshroom requires a CUDA GPU and works on Windows and Linux!<\/strong>\u00a0 So this process will only work on nVidia GPUs, at least as of time of writing.<\/p>\n<p>Once you\u2019ve got Meshroom loaded, follow the following simple steps.<\/p>\n<p>Drag extracted images into the Images pane on the left.<\/p>\n<p><a href=\"https:\/\/www.gamefromscratch.com\/image.axd?picture=image_3400.png\"><img loading=\"lazy\" decoding=\"async\" width=\"554\" height=\"515\" title=\"image\" alt=\"image\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/10\/creating-3d-models-from-photos-using-meshroom.png\" border=\"0\" \/><\/a><\/p>\n<p>Save your project somewhere<\/p>\n<p><a href=\"https:\/\/www.gamefromscratch.com\/image.axd?picture=image_3401.png\"><img loading=\"lazy\" decoding=\"async\" width=\"207\" height=\"173\" title=\"image\" alt=\"image\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/10\/creating-3d-models-from-photos-using-meshroom-1.png\" border=\"0\" \/><\/a><\/p>\n<p>Click the green Start button.<\/p>\n<p><a href=\"https:\/\/www.gamefromscratch.com\/image.axd?picture=image_3402.png\"><img loading=\"lazy\" decoding=\"async\" width=\"176\" height=\"47\" title=\"image\" alt=\"image\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/10\/creating-3d-models-from-photos-using-meshroom-2.png\" border=\"0\" \/><\/a><\/p>\n<p>As it\u2019s running, you will see the progress across the top:<\/p>\n<p><a href=\"https:\/\/www.gamefromscratch.com\/image.axd?picture=image_3409.png\"><img loading=\"lazy\" decoding=\"async\" width=\"804\" height=\"34\" title=\"image\" alt=\"image\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/10\/creating-3d-models-from-photos-using-meshroom-3.png\" border=\"0\" \/><\/a><\/p>\n<p>This bar indicates a problem occurred.\u00a0 You can divine more details by locating the current task in the Graph, like so:<\/p>\n<p><a href=\"https:\/\/www.gamefromscratch.com\/image.axd?picture=image_3410.png\"><img loading=\"lazy\" decoding=\"async\" width=\"424\" height=\"176\" title=\"image\" alt=\"image\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/10\/creating-3d-models-from-photos-using-meshroom-4.png\" border=\"0\" \/><\/a><\/p>\n<p>With the node selected, check the Log (bottom right corner) for details.\u00a0 This is the error message you receive if you run the process on a non-CUDA (nVidia) GPU.\u00a0 Keep in mind, it can also be caused by the process running on a laptop with Optimus, not automatically selecting the right GPU.<\/p>\n<p><a href=\"https:\/\/www.gamefromscratch.com\/image.axd?picture=image_3411.png\"><img loading=\"lazy\" decoding=\"async\" width=\"554\" height=\"274\" title=\"image\" alt=\"image\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/10\/creating-3d-models-from-photos-using-meshroom-5.png\" border=\"0\" \/><\/a><\/p>\n<p>Hopefully however you encounter no such errors and the process is entirely green.\u00a0 On the bright side, it should pick right up where the error occured if you run the project again in the same directory, as Meshroom caches the results of each step as it goes.\u00a0 You will find the vast majority of time is spent on the DepthMap section,\u00a0 this is normal.\u00a0 As the process continues, you should start seeing results in the 3D viewer.<\/p>\n<p><a href=\"https:\/\/www.gamefromscratch.com\/image.axd?picture=image_3413.png\"><img loading=\"lazy\" decoding=\"async\" width=\"604\" height=\"619\" title=\"image\" alt=\"image\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/10\/creating-3d-models-from-photos-using-meshroom-6.png\" border=\"0\" \/><\/a><\/p>\n<p>You can pan, zoom and orbit the mouse using the LMB, scroll wheel and MMB respectively.\u00a0 More detail in the point cloud will fill in as the process runs.\u00a0 Once it completes successfully, you will see a button Load Model.<\/p>\n<p><a href=\"https:\/\/www.gamefromscratch.com\/image.axd?picture=image_3414.png\"><img loading=\"lazy\" decoding=\"async\" width=\"804\" height=\"77\" title=\"image\" alt=\"image\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/10\/creating-3d-models-from-photos-using-meshroom-7.png\" border=\"0\" \/><\/a><\/p>\n<p>You can now preview the results of your effort!<\/p>\n<p><a href=\"https:\/\/www.gamefromscratch.com\/image.axd?picture=FinalGif.gif\"><img loading=\"lazy\" decoding=\"async\" width=\"354\" height=\"355\" title=\"FinalGif\" alt=\"FinalGif\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/10\/creating-3d-models-from-photos-using-meshroom.gif\" \/><\/a><\/p>\n<p>A few steps in, it will have evaluated all of your photos, acceptable\/usable photos will be marked with a green checkmark.<\/p>\n<p><a href=\"https:\/\/www.gamefromscratch.com\/image.axd?picture=image_3412.png\"><img loading=\"lazy\" decoding=\"async\" width=\"504\" height=\"439\" title=\"image\" alt=\"image\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/10\/creating-3d-models-from-photos-using-meshroom-8.png\" border=\"0\" \/><\/a><\/p>\n<p>Review the remaining photos for flaws and inconsistency if you run it again.<\/p>\n<p>Go make some tea\u2026 it\u2019s going to be between 10 minutes and an hour depend on the speed of your machine.\u00a0 Once the process is complete, there will be a folder called MeshroomCache, with the following contents:<\/p>\n<p><a href=\"https:\/\/www.gamefromscratch.com\/image.axd?picture=image_3403.png\"><img loading=\"lazy\" decoding=\"async\" width=\"453\" height=\"268\" title=\"image\" alt=\"image\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/10\/creating-3d-models-from-photos-using-meshroom-9.png\" border=\"0\" \/><\/a><\/p>\n<p>This is a folder with all of the output files from each step in the process.\u00a0 Generally what you are going to be interested in is the obj, mtl and texture file in the Texturing folder.\u00a0 This can be imported into your 3D modelling application of choice, the obj format is fairly universal.\u00a0 The resulting mesh is extremely dense and you may consider checking out <a href=\"https:\/\/www.youtube.com\/watch?v=PR4KrKHqVTI\">Instant Meshes<\/a> for optimizing the results.<\/p>\n<p>Now that you know it works, it\u2019s time to start refining the process or providing your own picture set.\u00a0 I would recommend the following tips from my own experience:<\/p>\n<ul>\n<li>use an actual camera, not a phone.\u00a0 I got terrible results from my Pixel phone, but my Canon DLSR gave much better results.\u00a0 YMMV<\/li>\n<li>DO NOT green\/white screen your background.\u00a0 Unique markers in the background help Meshroom position each virtual camera<\/li>\n<li>try to get the entire object in frame on each shot<\/li>\n<li>get rid of any image with any blurring<\/li>\n<\/ul>\n<p>So far we just default settings in the Graph Editor.\u00a0 This graph represents a graph of nodes in the process, one for each directory shown in the screenshot above.\u00a0 Note when you select a node, there are a number of properties you can edit:<\/p>\n<p><a href=\"https:\/\/www.gamefromscratch.com\/image.axd?picture=image_3404.png\"><img loading=\"lazy\" decoding=\"async\" width=\"581\" height=\"263\" title=\"image\" alt=\"image\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/10\/creating-3d-models-from-photos-using-meshroom-10.png\" border=\"0\" \/><\/a><\/p>\n<p>You can also connect pins to multiple nodes to create multiple results.\u00a0 For example, if you wanted to create a set of TFF and lower resolution PNG textures, you can do the following.\u00a0 Right click the graph editor and select Texturing:<\/p>\n<p><a href=\"https:\/\/www.gamefromscratch.com\/image.axd?picture=image_3405.png\"><img loading=\"lazy\" decoding=\"async\" width=\"340\" height=\"241\" title=\"image\" alt=\"image\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/10\/creating-3d-models-from-photos-using-meshroom-11.png\" border=\"0\" \/><\/a><\/p>\n<p>This will create a new node in the graph.\u00a0 Now drag the output node from MeshFiltering and connect it to ini and inputMesh. <\/p>\n<p><a href=\"https:\/\/www.gamefromscratch.com\/image.axd?picture=image_3406.png\"><img loading=\"lazy\" decoding=\"async\" width=\"414\" height=\"238\" title=\"image\" alt=\"image\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/10\/creating-3d-models-from-photos-using-meshroom-12.png\" border=\"0\" \/><\/a><\/p>\n<p>Select the new Texturing node and have it create a lower detail texture set:<\/p>\n<p><a href=\"https:\/\/www.gamefromscratch.com\/image.axd?picture=image_3408.png\"><img loading=\"lazy\" decoding=\"async\" width=\"579\" height=\"272\" title=\"image\" alt=\"image\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/10\/creating-3d-models-from-photos-using-meshroom-13.png\" border=\"0\" \/><\/a><\/p>\n<p>Now when it runs, it will create two sets of textures for you.\u00a0 Note there are other nodes such as Decimation that aren\u2019t in the process by default.\u00a0 You can see the entire thing in process in the <a href=\"https:\/\/www.youtube.com\/watch?v=R0PDCp0QF1o\">video<\/a> attached below:<\/p>\n<p align=\"center\">[embedded content]<\/p>\n<p class=\"under\">&#013; <span class=\"categories\"><a href=\"https:\/\/www.gamefromscratch.com\/category\/Art.aspx\">Art<\/a><\/span>&#013; <span class=\"tags\"><a href=\"https:\/\/www.gamefromscratch.com\/?tag=\/Tutorial\" rel=\"tag\">Tutorial<\/a> <a href=\"https:\/\/www.gamefromscratch.com\/?tag=\/3D\" rel=\"tag\">3D<\/a><\/span>&#013; &#013;\n<\/p>\n<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>Meshroom is a new, free and open source photogrammetry software from AliceVision.\u00a0 Photogrammetry software enable you to create a 3D scene using a series of photographs, generally the more the merrier.\u00a0 Currently documentation is a bit lacking, so I\u2019ve decided to create this quick tutorial.\u00a0 In this tutorial we are going to quickly walk through [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":55927,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[71],"tags":[74],"class_list":["post-55926","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-game-development","tag-art"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/55926","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=55926"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/55926\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media\/55927"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=55926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=55926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=55926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}