{"id":142060003661,"date":"2023-09-22T08:00:22","date_gmt":"2023-09-22T06:00:22","guid":{"rendered":"https:\/\/sketchfab.com\/blogs\/community\/?p=142060003661"},"modified":"2023-10-24T13:45:29","modified_gmt":"2023-10-24T11:45:29","slug":"mars-in-3d-a-beginners-guide-to-3d-modeling-the-martian-terrain","status":"publish","type":"post","link":"https:\/\/sketchfab.com\/blogs\/community\/mars-in-3d-a-beginners-guide-to-3d-modeling-the-martian-terrain\/","title":{"rendered":"Mars in 3D! A Beginner\u2019s Guide to 3D Modeling the Martian Terrain"},"content":{"rendered":"<p>3D modeling is a fun and easy way to engage in current NASA missions, though relatively few have tapped into its full potential. This blog guides readers through the step-by-step process used by the Mastcam-Z subteam at Cornell University to create structure-from-motion (SfM) models of the Martian terrain in hopes of increasing engagement and accessibility to groundbreaking science techniques for all. Though this tutorial focuses on modeling Martian features, please note the same process is applicable to any scientific, artistic, and recreational projects.<\/p>\n<div class=\"sketchfab-embed-wrapper\">    <iframe title=\"Mars2020, WATSON: Roubion Abrasion (sol 160)\" id=\"\" class=\"\" width=\"690\" height=\"388\" src=\"https:\/\/sketchfab.com\/models\/af2cd51018f94370a6dd3697e4f45a76\/embed?ui_hint=2\" frameborder=\"0\" allow=\"autoplay; fullscreen; xr-spatial-tracking\" allowfullscreen=\"\" mozallowfullscreen=\"true\" webkitallowfullscreen=\"true\" xr-spatial-tracking=\"true\" execution-while-out-of-viewport=\"true\" execution-while-not-rendered=\"true\" web-share=\"true\"><\/iframe><\/div>\n<p>This tutorial will model the first abrasion patch made by Perseverance Rover: the Rubion Abrasion. The rover cuts away the top few millimeters of a rock\u2019s rough surface using a rotating flat drill bit to expose a flat, unweathered surface in a circle of 5 cm in diameter. The rover\u2019s WATSON camera then captures images of this patch from multiple angles to maximize the measurements our Mars2020 mission team can do back here on Earth. The surface of the Rubion Abrasion, however, was a bit too bumpy and was thus deemed unfit for proximity-based measurements. In creating a 3D model of this abrasion site, we can examine the site for ourselves to find irregularities that would have otherwise gone unnoticed.<\/p>\n<h2>Part I: Data Collection<\/h2>\n<h3>1. Gathering the Images<\/h3>\n<p>To gather the images needed for modeling the Rubion Abrasion path, we turn to NASA\u2019s official Mars2020 Mission website to find <a href=\"https:\/\/mars.nasa.gov\/mars2020\/multimedia\/raw-images\/\" target=\"_blank\" rel=\"nofollow\">raw images<\/a> by Perseverance Rover. Using the site\u2019s filter feature, set the range to only target those images taken by Perseverance\u2019s SHERLOC-WATSON instrument between sols 160 and 161 in order from oldest to newest. (See Figure 1)<\/p>\n<div id=\"attachment_142060003665\" style=\"width: 1402px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image4.png\"><img decoding=\"async\" aria-describedby=\"caption-attachment-142060003665\" class=\"size-full wp-image-142060003665 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image4.png\" alt=\"\" width=\"1392\" height=\"1524\" \/><p id=\"caption-attachment-142060003665\" class=\"wp-caption-text\"><noscript><img decoding=\"async\" class=\"size-full wp-image-142060003665 lazyload\" src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image4.png\" alt=\"\" width=\"1392\" height=\"1524\" srcset=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image4.png 1392w, https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image4-274x300.png 274w, https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image4-941x1030.png 941w, https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image4-768x841.png 768w, https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image4-913x1000.png 913w\" sizes=\"(max-width: 1392px) 100vw, 1392px\" \/><\/noscript><\/a> <strong>Figure 1<\/strong> Tips &amp; Tricks: Downloading all files within this tutorial to the same folder on your device will make locating them a lot easier when uploading them to Agisoft Metashape.<\/p><\/div>\n<p>Once filtered, download the first full frame colored image that follows each series of greyscale and extreme focus image pairs. These images should each have a small, black frame and may continue on page 2. In filtering these images, we now have a total of seven images from this specific abrasion site to download for our model.<\/p>\n<p>For convenience, all data used throughout this tutorial can be downloaded from this \u201c<a href=\"https:\/\/drive.google.com\/drive\/folders\/178oRz3-bbA9U-ENR16RzrEm90peoIT4M?usp=sharing\" target=\"_blank\" rel=\"nofollow\">Mars in 3D Tutorial Toolkit<\/a>\u201d; however, we recommend following the process detailed above since it is applicable to all future models.<\/p>\n<h2>Part II: Creating a Model in Agisoft Metashape<\/h2>\n<p>To download the latest version of Agisoft Metashape, follow the instructions outlined on <a href=\"https:\/\/www.agisoft.com\/downloads\/installer\/\" target=\"_blank\" rel=\"nofollow\">Agisoft\u2019s installation webpage<\/a>. By navigating the site, new users can find tutorials, tips, user manuals, and solutions to common errors such as <a href=\"https:\/\/agisoft.freshdesk.com\/support\/solutions\/articles\/31000152092\" target=\"_blank\" rel=\"nofollow\">this tutorial<\/a> that covers these same basics. Please note this tutorial uses Agisoft Metashaper Pro 1.8.2, but we recommend either downloading the latest version of the software or taking advantage of Agisoft\u2019s 30-day free trial to gain access to new features and avoid any bugs.<\/p>\n<h3>1. Importing Images to Agisoft Metashape<\/h3>\n<p>Upon starting Metashape, add the seven WATSON images by either double-clicking \u201cChunk 1\u201d and navigating to the images\u2019 directory on the device or simply selecting \u201cadd photos\u201d from the \u201cWorkflow\u201d tab at the top of the screen. (see Figure 2) Notice that Metashape calls each photo a \u201ccamera&#8221; because all images are taken from a unique camera angle. Camera positions will be incredibly important in later steps as they\u2019re used to estimate the distance in a 3D space between the camera itself and the features present within the image.<\/p>\n<div id=\"attachment_142060003663\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image1.gif\"><img decoding=\"async\" aria-describedby=\"caption-attachment-142060003663\" class=\"size-full wp-image-142060003663 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image1.gif\" alt=\"\" width=\"800\" height=\"500\" \/><p id=\"caption-attachment-142060003663\" class=\"wp-caption-text\"><noscript><img decoding=\"async\" class=\"size-full wp-image-142060003663 lazyload\" src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image1.gif\" alt=\"\" width=\"800\" height=\"500\" \/><\/noscript><\/a> <strong>Figure 2<\/strong> Tips &amp; Tricks: Images can also be imported to Metashape by simply dragging and dropping them into \u201cChunk 1\u201d from another window.<\/p><\/div>\n<p>Please note that Metashape does not currently offer an auto-save feature and thus the regular use of the \u201cCtrl+S\u201d keyboard shortcut is highly encouraged.<\/p>\n<h3>2. Masking Images<\/h3>\n<p>Masking allows users to identify the image pixels associated with unwanted features. This feature is extremely useful since parts of Perseverance Rover often sneak their way into the camera\u2019s line of view, and most images contain a black border around them.<\/p>\n<p>Metashape allows users to either import a mask or mask an image manually. To import a mask, select all the images within Chunk 1, and double-click the selection to bring up the \u201cimport masks\u201d tab. Set the following image parameters on the proceeding pop-up window: \u201cMethod: From File,\u201d \u201cOperation: Replacement,\u201d \u201cFilename template: SIF_mask_.jpg,\u201d \u201cApply to: Selected Cameras,\u201d and select \u201cOK\u201d after navigating to the downloaded folder\u2019s directory. (see Figure 3) These settings will add a premade mask to all the selected images. A white outline indicating the masked features should now appear on each image.<\/p>\n<div id=\"attachment_142060003694\" style=\"width: 410px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/figure-3.gif\"><img decoding=\"async\" aria-describedby=\"caption-attachment-142060003694\" class=\"wp-image-142060003694 size-full lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/figure-3.gif\" alt=\"\" width=\"400\" height=\"250\" \/><p id=\"caption-attachment-142060003694\" class=\"wp-caption-text\"><noscript><img decoding=\"async\" class=\"wp-image-142060003694 size-full lazyload\" src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/figure-3.gif\" alt=\"\" width=\"400\" height=\"250\" \/><\/noscript><\/a> <strong>Figure 3<\/strong> Tips &amp; Tricks: Files may not appear visible or selectable when navigating to the mask\u2019s directory as the software was already informed of the file\u2019s name and how to import it within the previous step. Thus, clicking \u201cOK\u201d once within the file\u2019s directory is enough for the software to find the mask itself. If an error occurs after clicking \u201cOK,\u201d make sure the file name matches the one within its home directory.<\/p><\/div>\n<figure><\/figure>\n<h3>3. Adding Camera Calibration (Optional)<\/h3>\n<p>Structure from Motion software is largely dependent on supplied images and metadata (extra data) to create models. The most important metadata is what kind of camera captured the images. Metashape has a good way of guessing the right camera parameters, but the more information you can give it the better. The most important parameter is the camera\u2019s <a href=\"https:\/\/en.wikipedia.org\/wiki\/Focal_length\" target=\"_blank\" rel=\"nofollow\">focal length<\/a> in pixels, millimeters, or <a href=\"https:\/\/en.wikipedia.org\/wiki\/35_mm_equivalent_focal_length\" target=\"_blank\" rel=\"nofollow\">35mm equivalent<\/a>. The focal length combined with the image\u2019s number of pixels (which Metashape automatically gets in front of the images) gives you the camera\u2019s field-of-view (FOV). The Mars 2020 WATSON camera has a FOV of about 30 degrees. Just by knowing that and doing a little trigonometry, you can calculate that WATSON\u2019s focal length is about 3000 pixels. But you don\u2019t need to do any math. Just change the type to \u201cPre-Calibrated\u201d and put the focal-length value of pixels in Metashape\u2019s \u201cCamera Calibration\u201d window. (see Figure 4) From just the images and that focal-length value, Metashape can adequately constrain the camera further. See Figure 4 for where to find those options.<\/p>\n<div id=\"attachment_142060003669\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image11.gif\"><img decoding=\"async\" aria-describedby=\"caption-attachment-142060003669\" class=\"size-full wp-image-142060003669 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image11.gif\" alt=\"\" width=\"600\" height=\"387\" \/><p id=\"caption-attachment-142060003669\" class=\"wp-caption-text\"><noscript><img decoding=\"async\" class=\"size-full wp-image-142060003669 lazyload\" src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image11.gif\" alt=\"\" width=\"600\" height=\"387\" \/><\/noscript><\/a> <strong>Figure 4<\/strong> Users are able to import camera positions to assist the software\u2019s depth perception by going to \u201cTools\u201d on the navigation bar, selecting \u201ccamera calibration,\u201d and selecting the file icon on the pop-up menu to import data.<\/p><\/div>\n<h3>4. Aligning Photos<\/h3>\n<p>Agisoft Metashape converts 2D images into a 3D model by identifying shared features across multiple images. Metashape then uses these \u201ckey points\u201d to estimate camera positions, generate depth maps, and determine the 3D shape. Under \u201cWorkflow\u201d on the top menu bar, find \u201cAlign Photos,\u201d and set the following specifications: set accuracy to \u201cHighest;\u201d turn on \u201cgeneric pre-selection;\u201d make sure \u201cadaptive camera model fitting\u201d and \u201cexclude stationary tie points\u201d are the only checkboxes enabled under \u201cadvanced;\u201d and set the \u201ckey point limit\u201d to zero as this will allow Metashape to find as many similarities across images as possible. (see Figure 5) All other default settings can remain unchanged.<\/p>\n<div id=\"attachment_142060003696\" style=\"width: 410px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/figure-4.gif\"><img decoding=\"async\" aria-describedby=\"caption-attachment-142060003696\" class=\"size-full wp-image-142060003696 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/figure-4.gif\" alt=\"\" width=\"400\" height=\"250\" \/><p id=\"caption-attachment-142060003696\" class=\"wp-caption-text\"><noscript><img decoding=\"async\" class=\"size-full wp-image-142060003696 lazyload\" src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/figure-4.gif\" alt=\"\" width=\"400\" height=\"250\" \/><\/noscript><\/a> <strong>Figure 5<\/strong> In the Workflow tab, select the &#8220;Align Images&#8221; option and press &#8220;OK.&#8221; This action will establish a correlation between the images and determine their relative positions in three-dimensional space.<\/p><\/div>\n<p>Several blue and grey points will now be projected onto each image. If these points are not visible, make sure \u201cShow Points\u201d is enabled by selecting the four-dot symbol on the main toolbar. Both types of points are correspondences found between images, but only the blue points are accurate enough to use.<\/p>\n<p>Double-click on \u201cTie Points\u201d in the workspace window to see the 3D point cloud. The \u201c7\u201d keyboard key will give a top-down centered view of the x-y axis projection; other navigation shortcuts are available by finding the \u201cPredefined Views\u201d tab within the drop-down menu under the top menu bar\u2019s \u201cModel\u201d tab. Enabling the camera symbol on the main toolbar will display the rover\u2019s camera positions with respect to the point cloud.<\/p>\n<div id=\"attachment_142060003667\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image6.gif\"><img decoding=\"async\" aria-describedby=\"caption-attachment-142060003667\" class=\"size-full wp-image-142060003667 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image6.gif\" alt=\"\" width=\"800\" height=\"513\" \/><p id=\"caption-attachment-142060003667\" class=\"wp-caption-text\"><noscript><img decoding=\"async\" class=\"size-full wp-image-142060003667 lazyload\" src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image6.gif\" alt=\"\" width=\"800\" height=\"513\" \/><\/noscript><\/a> <strong>Figure 6<\/strong>\u00a0(Optional) To reduce any potential alignment errors, find the \u201cOptimize Camera Alignment\u201d feature under the \u201cTools\u201d drop-down menu located at the top menu bar. Check the first few boxes in the menu. It is also good to choose \u201cAdaptive camera model fitting\u201d under \u201cAdvanced\u201d and select \u201cOK.\u201d<\/p><\/div>\n<h3>5. Generating a Mesh from Depth Maps<\/h3>\n<p>Now we turn this point cloud into a continuous 3D surface or mesh. Similar to a blank canvas, in 3D modeling, a \u201cmesh\u201d is considered to be the structural foundation onto which a model is projected. This process is possible by connecting points within the point cloud to form two-dimensional polygons within a three-dimensional plane.<\/p>\n<p>Navigate to the \u201cBuild Mesh\u201d feature under \u201cWorkflow\u201d on the top menu bar, and set the following specifications: \u201cSource Data: Depth Maps;\u201d \u201cSurface type: Arbitrary 3D;\u201d \u201cQuality: Ultra High;\u201d \u201cDepth filtering: Mild;\u201d enable \u201cinterpolation;\u201d and disable vertex color calculation to prevent difficulties when exporting the model. See Figure 7 for our recommended build mesh settings. Note that this step takes the most time, so feel free to let your computer run for a while (1-10 minutes depending on your computer\u2019s power).<\/p>\n<div id=\"attachment_142060003671\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image5-2.gif\"><img decoding=\"async\" aria-describedby=\"caption-attachment-142060003671\" class=\"wp-image-142060003671 size-full lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image5-2.gif\" alt=\"\" width=\"800\" height=\"500\" \/><p id=\"caption-attachment-142060003671\" class=\"wp-caption-text\"><noscript><img decoding=\"async\" class=\"wp-image-142060003671 size-full lazyload\" src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image5-2.gif\" alt=\"\" width=\"800\" height=\"500\" \/><\/noscript><\/a> <strong>Figure 7<\/strong> When the images are aligned and optimized, choose the \u201cBuild Mesh\u201d option in the \u201cWorkflow\u201d menu. This will analyze the tie points to make the best continuous 3D model that it can.<\/p><\/div>\n<p>To view the resulting mesh, exit Image View by selecting the \u201cModel\u201d tab. You may notice a box-like shape surrounding the generated point cloud and mesh. The area located within the box\u2019s vertices is known as the model\u2019s region. In cases where the point cloud displays a larger desired area than desired for the model, or if the model requires cropping, users are able to resize, rotate, and move the region to indicate the specific area from which a mesh should be generated.<\/p>\n<p>Note, if there is an annoying white ball in the middle of your model, then go to the \u201cModel\u201d tab and under \u201cShow\/Hide\u201d Items deselect \u201cShow Trackball\u201d.<\/p>\n<h3>6. Creating a Texture<\/h3>\n<p>If a mesh is analogous to a canvas, then a texture can be thought of as the design projected on to the canvas. This is the stage where the model will finally resemble our desired final product. To create a texture, find the \u201cBuild Texture\u201d feature under \u201cWorkflow\u201d along the main menu bar, and set the following specifications: \u201cTexture Type: Diffuse Map;\u201d \u201cSource Data: Images;\u201d \u201cMapping Mode: Generic;\u201d \u201cBlending Mode: Mosaic;\u201d \u201cTexture Size\/Count:\u201d choose 2048 or 4096 depending on the desired resolution. Models with higher texture quality can have larger file sizes and take more of your computer\u2019s memory when loading them. Under \u201cAdvanced,\u201d enable both hole-filling and ghost-filtering as seen in Figure 8.<\/p>\n<div id=\"attachment_142060003697\" style=\"width: 410px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/figure-6.gif\"><img decoding=\"async\" aria-describedby=\"caption-attachment-142060003697\" class=\"size-full wp-image-142060003697 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/figure-6.gif\" alt=\"\" width=\"400\" height=\"250\" \/><p id=\"caption-attachment-142060003697\" class=\"wp-caption-text\"><noscript><img decoding=\"async\" class=\"size-full wp-image-142060003697 lazyload\" src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/figure-6.gif\" alt=\"\" width=\"400\" height=\"250\" \/><\/noscript><\/a> <strong>Figure 8<\/strong> Tips &amp; Tricks: Texture sizes are optimized with texture sizes generated from multiples of 2: typically 1024, 2048, or 4096.<\/p><\/div>\n<p>To view the resulting texture, switch the model view from either \u201cModel Solid\u201d or \u201cModel Confidence\u201d to \u201cModel Textured.\u201d (See Figure 9) Notice that features from the original WATSON images are now projected onto the corresponding region on the mesh.<\/p>\n<h3>7. Editing the Model<\/h3>\n<p>Agisoft Metashape offers many methods of editing models to make sure they meet the user\u2019s expectations for the final product. If heavy shadows or unwanted features show up on the generated mesh, users can try either manually masking shadows within the original images under Chunk 1 or simply disabling problematic images altogether. Additionally, if the source images were taken under different lighting conditions, users can try calibrating colors and white balance under \u201cTools\u201d along the main menu bar (see Figure 9). Regenerate the texture to see the changes. If the colors do not look better, then go back to the \u201cCalibrate Colors\u201d window and push \u201cReset\u201d to return the images to their original colors.<\/p>\n<div id=\"attachment_142060003695\" style=\"width: 410px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/figure-7.gif\"><img decoding=\"async\" aria-describedby=\"caption-attachment-142060003695\" class=\"size-full wp-image-142060003695 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/figure-7.gif\" alt=\"\" width=\"400\" height=\"250\" \/><p id=\"caption-attachment-142060003695\" class=\"wp-caption-text\"><noscript><img decoding=\"async\" class=\"size-full wp-image-142060003695 lazyload\" src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/figure-7.gif\" alt=\"\" width=\"400\" height=\"250\" \/><\/noscript><\/a> <strong>Figure 9<\/strong> Since some images can have different lighting, it often helps to white balance the images so that the images are more consistent. Find the \u201cCalibrate Colors\u201d option in the \u201cTools\u201d menu, and click \u201cCalibrate White Balance\u201d and push \u201cOK\u201d.<\/p><\/div>\n<h3>8. Exporting the Model<\/h3>\n<p>To export the model, right-click the model\u2019s name along the left navigation bar and select \u201cExport Model\u2026\u201d in the resulting pop-up window. (see Figure 10)\u00a0 When a 3D model is exported and downloaded as an OBJ file format, the system splits the model into three separate components: mesh, texture, and material. Each component is exported as its own individual file, allowing for greater flexibility and ease of inspection. The mesh file contains information about the geometry and shape of the model, including its vertices, edges, and faces. The texture file holds the information about the color and appearance of the model&#8217;s surface, such as its patterns and images. Finally, the material file contains information about the physical properties of the model, such as its reflectivity, transparency, and surface roughness. By having these components separated, it becomes easier to examine and edit each component independently, providing greater control and precision in the modeling process.<\/p>\n<div id=\"attachment_142060003698\" style=\"width: 410px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/figure-8.gif\"><img decoding=\"async\" aria-describedby=\"caption-attachment-142060003698\" class=\"size-full wp-image-142060003698 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/figure-8.gif\" alt=\"\" width=\"400\" height=\"250\" \/><p id=\"caption-attachment-142060003698\" class=\"wp-caption-text\"><noscript><img decoding=\"async\" class=\"size-full wp-image-142060003698 lazyload\" src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/figure-8.gif\" alt=\"\" width=\"400\" height=\"250\" \/><\/noscript><\/a> <strong>Figure 10<\/strong> Exporting the model as an obj. file allows for the model to be more accessible as those who download it will be able to directly investigate the mesh, texture, and material text file.<\/p><\/div>\n<h2>Part III: Uploading a model to Sketchfab<\/h2>\n<p>Science isn\u2019t truly completed until it\u2019s communicated. To ensure our models reach the largest audience possible, we turn to <a href=\"https:\/\/sketchfab.com\/\">Sketchfab<\/a>, a leading 3D model-sharing platform containing a vast community of 3D artists from every background.<\/p>\n<h3>1. Importing a Model<\/h3>\n<p>Upon creating a Sketchfab account, navigate to the \u201cUpload\u201d icon on the site\u2019s toolbar. On the proceeding screen, click the \u201cbrowse\u201d button and navigate to the directory on your device containing the model\u2019s saved obj, JPEG, and HTML files that were downloaded from Agisoft Metashape earlier. (see Figure 10)<\/p>\n<div id=\"attachment_142060003668\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image9.gif\"><img decoding=\"async\" aria-describedby=\"caption-attachment-142060003668\" class=\"size-full wp-image-142060003668 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image9.gif\" alt=\"\" width=\"800\" height=\"500\" \/><p id=\"caption-attachment-142060003668\" class=\"wp-caption-text\"><noscript><img decoding=\"async\" class=\"size-full wp-image-142060003668 lazyload\" src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image9.gif\" alt=\"\" width=\"800\" height=\"500\" \/><\/noscript><\/a> <strong>Figure 10<\/strong> Tips &amp; Tricks: Files can also be imported by simply dragging and dropping them into Sketchfab\u2019s Upload page from another window.<\/p><\/div>\n<h3>2. Setting up the Model for Display<\/h3>\n<p>Once fully loaded, enabling \u201ctexture inspection\u201d and free downloads of the model provides the audience with more accessibility to the model.<\/p>\n<p>Navigate to the \u201cEdit 3D Settings\u201d page where final edits to the model can be made before publishing. Select the \u201creset orientation\u201d symbol under the \u201cGeneral\u201d drop-down menu and click the right \u201cx\u201d arrow once under \u201cstraighten model.\u201d (see Figure 11) These settings provide the uploaded model with a proper orientation reference when viewed. To properly display the model on Sketchfab, start by adjusting the shading settings to &#8220;shadeless.&#8221; Next, change the field of view to 30 degrees and turn off the &#8220;vertex color&#8221; option. After making these changes, don&#8217;t forget to save the file. Sketchfab\u2019s \u201cpost-processing filters\u201d also allow users to edit aspects of the model such as sharpness and color balance to fix any irregularities that may have resulted from lighting differences in the original image sets. (see Figure 11)<\/p>\n<p>Finally, to set the model&#8217;s thumbnail on Sketchfab, simply click &#8220;save view&#8221; while the model is in the desired position. Once all these steps have been completed, select \u201cpublish\u201d and congratulate yourself on your contribution to the Mars Sample Return Mission!<\/p>\n<div id=\"attachment_142060003664\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image3.gif\"><img decoding=\"async\" aria-describedby=\"caption-attachment-142060003664\" class=\"size-full wp-image-142060003664 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image3.gif\" alt=\"\" width=\"800\" height=\"500\" \/><p id=\"caption-attachment-142060003664\" class=\"wp-caption-text\"><noscript><img decoding=\"async\" class=\"size-full wp-image-142060003664 lazyload\" src=\"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/image3.gif\" alt=\"\" width=\"800\" height=\"500\" \/><\/noscript><\/a> <strong>Figure 11<\/strong> Tips &amp; Tricks: If the model&#8217;s texture isn\u2019t visible when uploaded to another platform, whether given an error or presented with a monochromatic version of the model, try downloading the model as a glb file. Downloading the model as a glb file will automatically snap the model\u2019s texture onto its mesh. Alternatively, try turning off \u201cVertex color\u201d on the Sketchfab \u201c3D Settings\u201d page, or the base color under \u201cmaterials.\u201d<\/p><\/div>\n<p>Generating models like these is a photogrammetric process called <a href=\"https:\/\/www.nytimes.com\/2020\/10\/13\/insider\/photogrammetry-3D-maps.html\" target=\"_blank\" rel=\"nofollow\">Structure from Motion (or SfM)<\/a>. SfM compiles several images taken from different angles of the same scene and semi-automatically produces a 3D product. <a href=\"https:\/\/all3dp.com\/1\/best-photogrammetry-software\/\" target=\"_blank\" rel=\"nofollow\">Software applications for SfM<\/a>, such as Agisoft Metashape which we use for these models, are readily available and continue to grow in performance and accessibility. SfM models have grown in popularity through 3D modeling communities, like Sketchfab \u2013 the social media viewer and repository for 3D models used in the above models, making it easier for developers to share their work with all.<\/p>\n<p>To learn more about how these models are used to visualize the Mars Sample Return mission at the <a href=\"https:\/\/mastcamz.asu.edu\/mars-in-3d-update-1\/\" target=\"_blank\" rel=\"nofollow\">Rochette sample site<\/a>, the extraction of <a href=\"https:\/\/mastcamz.asu.edu\/sample-cores\/\" target=\"_blank\" rel=\"nofollow\">samples<\/a>, 3D <a href=\"https:\/\/sketchfab.com\/Mastcam-Z\">modeling<\/a> of the martian terrain, and how to access <a href=\"https:\/\/mastcamz.asu.edu\/mastcam-z-data-for-all\/\" target=\"_blank\" rel=\"nofollow\">images and data<\/a> directly from the Perseverance Rover, please visit our own Mastcam-Z <a href=\"https:\/\/mastcamz.asu.edu\/category\/blog\/\" target=\"_blank\" rel=\"nofollow\">blog<\/a> to browse a vast collection of news and updates!<\/p>\n<p><em>Note: All original image files for this blog can be downloaded from this <a href=\"https:\/\/drive.google.com\/drive\/folders\/1JgOQTuY25Fd0X99XUoCMNNplLaiBVATm?usp=sharing\" target=\"_blank\" rel=\"nofollow\">Google Drive link<\/a>.<\/em><\/p>\n<p>Additional blog inspiration:<\/p>\n<ul>\n<li><a href=\"https:\/\/styly.cc\/ja\/tips\/photogrammetry_discont_metashape\/\" target=\"_blank\" rel=\"noopener nofollow\">Introduction to photogrammetry: How to use Metashape for Mac (in Japanese)<\/a><\/li>\n<li><a href=\"https:\/\/dinosaurpalaeo.wordpress.com\/2015\/10\/11\/photogrammetry-tutorial-11-how-to-handle-a-project-in-agisoft-photoscan\/\" target=\"_blank\" rel=\"noopener nofollow\">Photogrammetry tutorial 11: How to handle a project in Agisoft Metashape (Photoscan)<\/a><\/li>\n<li><a href=\"https:\/\/www.liverpool.ac.uk\/media\/livacuk\/victoriagalleryandmuseum\/garstangmuseum\/Guide,for,Agisoft,Metashape,-,Museums,of,the,North,West,Photogrammetry,Hub.pdf\" target=\"_blank\" rel=\"noopener nofollow\">Creating 3D Models with Agisoft Metashape<\/a><\/li>\n<li><a href=\"https:\/\/agisoft.freshdesk.com\/support\/solutions\/articles\/31000152092\" target=\"_blank\" rel=\"noopener nofollow\">Agisoft Help Desk: 3D model reconstruction<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to use Agisoft Metashape to create structure-from-motion (SfM) models of the Martian terrain!<\/p>\n","protected":false},"author":23,"featured_media":142060003684,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[582],"tags":[956,984],"class_list":["post-142060003661","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial","tag-metashape","tag-tutorial-photogrammetry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/sketchfab.com\/blogs\/community\/wp-content\/uploads\/2023\/09\/mars2020__watson__roubion_abrasion__sol_160_.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sketchfab.com\/blogs\/community\/wp-json\/wp\/v2\/posts\/142060003661","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sketchfab.com\/blogs\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sketchfab.com\/blogs\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sketchfab.com\/blogs\/community\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/sketchfab.com\/blogs\/community\/wp-json\/wp\/v2\/comments?post=142060003661"}],"version-history":[{"count":12,"href":"https:\/\/sketchfab.com\/blogs\/community\/wp-json\/wp\/v2\/posts\/142060003661\/revisions"}],"predecessor-version":[{"id":142060003785,"href":"https:\/\/sketchfab.com\/blogs\/community\/wp-json\/wp\/v2\/posts\/142060003661\/revisions\/142060003785"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sketchfab.com\/blogs\/community\/wp-json\/wp\/v2\/media\/142060003684"}],"wp:attachment":[{"href":"https:\/\/sketchfab.com\/blogs\/community\/wp-json\/wp\/v2\/media?parent=142060003661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sketchfab.com\/blogs\/community\/wp-json\/wp\/v2\/categories?post=142060003661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sketchfab.com\/blogs\/community\/wp-json\/wp\/v2\/tags?post=142060003661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}