{
  "path": "/posts/3d-solana-nfts",
  "site": "at://did:plc:ia2zdnhjaokf5lazhxrmj6eu/site.standard.publication/3mbykzswhqc2x",
  "tags": [
    "web3",
    "nfts",
    "tutorials"
  ],
  "$type": "site.standard.document",
  "title": "How to Create 3D NFTs on Solana",
  "description": "Learn how to scan and mint real life objects on Solana",
  "publishedAt": "2022-05-18T04:00:00.000Z",
  "textContent": "import medium from \"../../assets/medium.png\";\nimport OutLinkButton from \"@/components/common/OutLinkButton\";\n\n<OutLinkButton\n\tlink=\"https://medium.com/pinata/how-to-scan-and-create-1-1-3d-nfts-on-solana-using-polycam-and-pinata-df513dd87937\"\n\tsite=\"Medium\"\n\timage={medium}\n/>\n\nThe growth and evolution of NFTs has come a long way from the early days. Some of the early NFT projects were simple .png files or a link to a YouTube video, but now they are an entire industry that consumes brand, utility, even augmented reality. Metaverses, 3D objects, and other virtual reality experiences are all the rage, and I firmly believe we will see more of this in the near future.\n\nOne unique tool that I stumbled upon was Polycam. Polycam is a mobile iOS app that utilizes the iPhone’s LiDAR scanner to map 3D objects and environments. 3D NFTs are certainly popular, but what about 3D NFTs of real life objects? Or even better: real life environments? I think this is an angle that not many people have thought about creating, and opens up a whole new realm of artistic expression in ways people have not seen before.\n\nIn this tutorial we’ll cover how to use Polycam to scan and create a 3D models and environments, and then we’ll cover how to make them into NFTs using Pinata and Solana.\n\nScanning with Polycam\n\nTo get started you’ll want to download the Polycam app on the App Store. Be aware that this is only for iPhones, and scanning environments will be more effective if you have a LiDAR scanner on your iPhone. Having a LiDAR scanner is not necessary though! Once you download it you will need to make an account with them and start their 14 day free trial.\n\nOnce you do that Polycam will take you to the “captures” page where you can see all your scans. To learn how the scan process works, I would highly recommend their well done tutorials on their website and in the app.\n\nUsing LiDAR Mode to Capture Large Spaces\n\nUsing Photo Mode to Capture 3D Objects\n\nIn short, you will want to use the LiDAR mode when you are trying to scan environments or large spaces, and for 3D objects you will want to use the photo mode!\n\nFor this tutorial I’m going to scan my desk space using the LiDAR method, and for the 3D objects we’ll use an old book, and of course Pinnie!\n\nWith the video below you can get glimpse of how the LiDAR scanner maps over surfaces. Taking it real slow and covering every angle really helps with scanning environments.\n\n<div style=\"padding:216.22% 0 0 0;position:relative;\">\n\t<iframe\n\t\tsrc=\"https://player.vimeo.com/video/703877466?h=9659ba4952\"\n\t\tstyle=\"position:absolute;top:0;left:0;width:100%;height:100%;\"\n\t\tframeborder=\"0\"\n\t\tallow=\"autoplay; fullscreen; picture-in-picture\"\n\t\tallowfullscreen\n\t></iframe>\n</div>\n<script src=\"https://player.vimeo.com/api/player.js\"></script>\n\nAfter you’re done scanning there will be a processing step that will take all the data and map it into a 3D environment!\n\n<div style=\"padding:216.22% 0 0 0;position:relative;\">\n\t<iframe\n\t\tsrc=\"https://player.vimeo.com/video/703880632?h=52b5f574b7\"\n\t\tstyle=\"position:absolute;top:0;left:0;width:100%;height:100%;\"\n\t\tframeborder=\"0\"\n\t\tallow=\"autoplay; fullscreen; picture-in-picture\"\n\t\tallowfullscreen\n\t></iframe>\n</div>\n<script src=\"https://player.vimeo.com/api/player.js\"></script>\n\nOnce it’s processed you can go ahead and view the 3D model/environment! Polycam really is first class; you can create videos, you can view the model in Augmented Reality, it just has so many awesome features! My model isn’t the cleanest since I have so many small detailed objects on my desk, but for something a bit simpler this feature is amazing.\n\n<div style=\"padding:216.22% 0 0 0;position:relative;\">\n\t<iframe\n\t\tsrc=\"https://player.vimeo.com/video/703884780?h=de95c5de7a\"\n\t\tstyle=\"position:absolute;top:0;left:0;width:100%;height:100%;\"\n\t\tframeborder=\"0\"\n\t\tallow=\"autoplay; fullscreen; picture-in-picture\"\n\t\tallowfullscreen\n\t></iframe>\n</div>\n<script src=\"https://player.vimeo.com/api/player.js\"></script>\n\nNow that we got our model, we can upload it to the cloud and look at it through our web browser! Just click on the little cloud icon on the top of the screen when viewing your model and it will be uploaded to your cloud storage with Polycam.\n\nOnce viewing it in the web browser, we can download the model by clicking “export.”\n\n!image>\n\nFrom there we want to select the GLTF format and start the download!\n\n!image>\n\nOk so we got our 3D file for our environment, now lets do some 3D objects as well! The process is pretty similar, except for 3D objects we’ll switch to the “photo” mode instead of the LiDAR mode. The photo mode will take a bunch of different pictures and put them together to make a 3D model! In the video below you can see what the process looks like as I scan one of my prized possessions, a 1930's edition of Moby Dick illustrated by Rockwell Kent.\n\n<div style=\"padding:216.22% 0 0 0;position:relative;\">\n\t<iframe\n\t\tsrc=\"https://player.vimeo.com/video/704181596?h=92cada3864\"\n\t\tstyle=\"position:absolute;top:0;left:0;width:100%;height:100%;\"\n\t\tframeborder=\"0\"\n\t\tallow=\"autoplay; fullscreen; picture-in-picture\"\n\t\tallowfullscreen\n\t></iframe>\n</div>\n<script src=\"https://player.vimeo.com/api/player.js\"></script>\n\nOnce we finish scanning the book, I like to select the higher end of the quality allowance, and I like to use the object masking to get all the fine details. These photo mode objects are a bit more work, so when you take one Polycam sends it off to a server for higher powered processing. Due to how intense the work is, you can only take 150 of these a month, but I don’t think that will be an issue for most people. Once they finish processing it, the model looks like this!\n\n<div style=\"padding:216.22% 0 0 0;position:relative;\">\n\t<iframe\n\t\tsrc=\"https://player.vimeo.com/video/704185926?h=2a929c3d73\"\n\t\tstyle=\"position:absolute;top:0;left:0;width:100%;height:100%;\"\n\t\tframeborder=\"0\"\n\t\tallow=\"autoplay; fullscreen; picture-in-picture\"\n\t\tallowfullscreen\n\t></iframe>\n</div>\n<script src=\"https://player.vimeo.com/api/player.js\"></script>\n\nThe download process looks exactly the same as we did the desk, very easy! Also while you’re still in Polycam, you can edit, adjust, crop, etc. your model all inside their app or website, so that way when the model is exported it’s ready to be turned into an NFT!\n\nLast but not least, we got a model of Pinnie too 😉\n\nPinata Polycam Capture\n\nCreating 1/1 NFTs on Solana\n\nAlright alright alright, we got our models from Polycam, now lets turn them into 1/1 NFTs on Solana!\n\nFirst thing you’ll want to do is get a Pinata account. I would recommend getting the professional account so you can use a Dedicated Gateway, you’ll see why as we go further!\n\nThere’s a lot of great benefits of using IPFS for NFTs, such as content addressability and portability, but especially speed using a dedicated gateway. Since Solana is still adopting IPFS, not all the wallets and marketplaces have their own gateway solutions to resolve links like “ipfs://CID.” However with our own dedicated gateway we can use a standard “https://” link and deliver it with speed. You’ll see how we’ll do this in a bit!\n\nLet’s log into Pinata and upload our file. Really simple, just click on the upload button in the top left, give it a name, and upload!\n\n!image>\n\nThen we just need to choose a subdomain and make sure its available. If it is, click next!\n\nIf we just clicked on this file to preview it, it’s gonna take us straight to download since the browser doesn’t know what to do. That’s ok! We’re gonna format the link for our NFT metadata. It will look something like this.\n\nFor our particular CID the link will look like this!\n\nOk our 3D file is on IPFS, the next step is to create a metadata file that will point to that 3D file. Open up your terminal and run:\n\nThen open up that pinnie.json file in your text editor of choice. Since we’re using Solana we will want to use Metaplex Token Metadata Standard which you will definitely want to save as a reference, but we’ll be simplifying ours just a little bit.\n\nCouple of things you’ll want to take note here. We could use an image URL if you wanted a backup, just make sure you upload a separate file to Pinata. For our example I’ve left it as null. The key thing to notice is the “animation_url” which I have set to our link we created earlier. Under properties and files, we left the image null again, and created another one that includes:\n\nThe uri is the link to our content, and the type defines the kind of file we want to use, which in this case is virtual reality (vr) and the file format (glb). Once you get familiar with the metadata standard it’s pretty straight forward. Now that we created this metadata file, save it and upload it to Pinata as well. Once it’s uploaded take note of the CID and save the link to it, should look something like this:\n\nWe’re really close to minting this NFT! Solana is an up and coming blockchain that is capable of incredible speeds and low transactions fees. Before we go any further you’ll want to make sure you have a couple of things installed on your computer:\n\n- Solana CLI\n- Metaboss\n\nBe sure to follow the instructions for installing each very carefully! The Solana CLI is the tool that will let us interact with the Solana blockchain, and Metaboss is nicknamed “The Solana Metaplex NFT ‘Swiss Army Knife’” and rightly so. It is packed with features, including the minting NFTs!\n\nOnce you’ve installed both, let’s make sure the Solana CLI is setup properly by running the following command.\n\nIf that returns the version then we are good to go! Next thing we’ll do is create a wallet, set our network to devnet, and get some fake sol. To create a new wallet run the command below.\n\nThis will create a file on your computer and is the code version of a new Solana wallet! Next we want to set our Solana config to use this wallet by default.\n\nLast but not least, we’ll set our Solana config to use the devnet environment so we can use fake money and have room to",
  "canonicalUrl": "https://stevedylan.dev/posts/3d-solana-nfts"
}