How To Share 3D Models With IPFS (2024)

Instead of Google Poly or Sketchfab

Justin Hunter

·

Follow

Published in

Pinata

·

7 min read

·

May 25, 2021

--

How To Share 3D Models With IPFS (3)

If you’ve been paying attention to the art world over the last 10 years, you’ve seen a huge spike in the use of 3D modeling in art. This spans personal art pieces to video games to NFTs. The pandemic even gave rise to the concept of virtual events and conferences that take place in 3D worlds. 3D objects are everywhere.

Except on IPFS.

While these 3D objects can easily be stored on IPFS, viewing them is a different story. And viewing the models is the whole point to creating them, right? Let’s explore how we can move away from platforms like (the soon-to-be-shuttered) Google Poly and Sketchfab and self-host 3D models on IPFS while still being able to view those models directly through IPFS gateways.

For this blog, you’ll need any paid plan account with Pinata. The Picnic Plan gets you both storage access as well as a dedicated IPFS gateway, and is a great introduction to Pinata’s more advanced features. This means your 3D models can be viewed on IPFS through a gateway that you own and can brand with your own domain. You can sign up here.

Once you’ve signed up, the first step is to pin the 3D objects you’d like to be able to store and view on IPFS. To do this, simply go to the Pin Manager and click the Upload button:

How To Share 3D Models With IPFS (4)

You’ll be given three options for how you’d like to get your content onto IPFS through Pinata:

  • Folder
  • File
  • CID

I am assuming your 3D object is a single file on your computer, so choose the file option.

How To Share 3D Models With IPFS (5)

You’ll then click the button in the file upload modal to select a file from your computer. Choose the correct file, then upload. When the upload is complete, your newly uploaded 3D model will be shown in the Pin Manager with an IPFS CID.

While with most files you can simply click on their name in the Pin Manager and view them directly through the IPFS gateway, you can’t do that with a 3D Model. Go ahead and try it. The file will be downloaded to your computer instead of viewable in the browser.

We’re going to fix that.

First, let’s create a dedicated gateway. Go to the Gateways tab on the left side. This will take you to the Gateways page. You have to be on a paid plan to create a gateway. We have a guide on setting up dedicated gateways here, but I’ll walk you through the process in this post.

Click the Create Gateway button to start.

How To Share 3D Models With IPFS (6)

When you do that, a Gateway Creation Wizard will pop up. The first step is to give your gateway a name. This name will act as a custom subdomain for your gateway. For example, if you chose the name “3dmodel”, and if that name was available, your gateway URL would be https://3dmodel.mypinata.cloud.

How To Share 3D Models With IPFS (7)

The next step in the process is determining if your gateway should be open or restricted. An Open Gateway allows content from the entire IPFS network to pass through it, even if you haven’t uploaded or pinned that content. A Restricted Gateway, on the other hand, only allows content that you have pinned to flow through it.

Make your selection, then click Create. This will only take a few seconds. Once the process is done, your gateway will be brought online behind the scenes. If you’d like to set up a custom domain (i.e., “alice.com”) for your gateway, we’ve got you covered. Here’s a guide that will help you do exactly that.

Now, we’ve got our 3D model uploaded and we have a dedicated gateway that we can, very soon, use to view our model. The question remains:

How do we make the gateway display 3D models rather than download them?

We’ve built a small app that can be served through your own gateway that will fetch 3D Models from your gateway and render them in the browser. The cool thing about this is you won’t even need to know it’s an app, you won’t have to touch any code, and it’s going to be entirely hosted on your gateway.

Head back over to the Pin Manager. Use that same upload button we used before, but this time choose the CID option. This option allows you to enter an IPFS CID rather than having to upload the file yourself. If that CID is available on the IPFS network, Pinata will find it, pull it in, and pin it to your account.

I’m going to give you the CID for the small app I mentioned before. When you pull that in, it should be pinned to your account quickly. So, go ahead and click the CID options. You’ll be presented with a modal that asked for the CID and a name for the pin.

How To Share 3D Models With IPFS (8)

You should enter this CID in the CID field:

QmUR2XyUZvGvsNMmLBA5joPduT4f95jSMGzzzmCkckKSF4

I would also recommend giving it a custom name so that you know this file is for the 3D Model Viewer. You can call it whatever you’d like. Once you’ve done so, click “Search and Pin”.

You won’t see anything update in the Pin Manager table right away, but if you refresh your browser after a few seconds, you should see the new file show up:

How To Share 3D Models With IPFS (9)

Once it shows up, then it’s ready to use. Now, all you need to know is the format of the URL you’ll use to view your 3D models. Let’s break that down.

First, you need to know your gateway URL. If you chose “pinnie” as your gateway name, your gateway URL will be https://pinnie.mypinata.cloud. If you created a custom domain, your gateway URL will be that custom domain.

Next, when we view content through a gateway, we need to add /ipfs/ to the URL. So your gateway URL with that tacked on would look like this:

https://pinnie.mypinata.cloud/ipfs/

Next, you need to grab the CID I provided you and that you pinned that represents the app that will help us view these 3D models and append that to the end of the URL like this:

https://pinnie.mypinata.cloud/ipfs/QmUR2XyUZvGvsNMmLBA5joPduT4f95jSMGzzzmCkckKSF4

This is the base URL you will always use to share your 3D models (replacing the “https://alice.mypinata.cloud” with your own gateway URL, of course). The last step is passing in the information about the 3D model we’d like to view through that URL.

We need to pass through two mandatory pieces of information:

  • object (the CID of the 3D model)
  • filename (the filename with extension for the model — the name can be made up but the extension needs to be correct)

Let’s take a look at an example:

https://pinnie.mypinata.cloud/ipfs/QmUR2XyUZvGvsNMmLBA5joPduT4f95jSMGzzzmCkckKSF4?object=QmW2cz7yws2ikxjCHkSxK2ZcEbQRA7japaDGx3DpvpC3ek&filename=my_custom_file.3ds

Notice the way the URL is formatted? The ? after the CID tells the browser that we’re about to give it a piece of information that it will need to read. We then tell the browser that piece of information’s name is object. The = tells the browser that the thing that comes after it is the value associated with the name. The value in this case is the CID for the actual 3D model you want to view.

You’ll notice the URL also includes an & and then another pair of name/values. The & is just telling the browser that we have another set of information for it to read. In this case, it’s the filename.

To help illustrate the way the URL is constructed, you can think of it this way:

How To Share 3D Models With IPFS (10)

Here’s an example using a test 3D object I uploaded and a custom Pinata dedicated gateway:

The URL for the above object looks like this:

https://pinnie.mypinata.cloud/ipfs/QmUR2XyUZvGvsNMmLBA5joPduT4f95jSMGzzzmCkckKSF4/?object=QmY9PdJRj71Qo1AP48gHtqULhJnHnJeuBKM6wzQor3u1Qz&filename=object.3ds

With this, you should be able to view the following types of 3D objects in the browser through your IPFS gateway:

obj, 3ds, stl, ply, gltf, glb, 3dm, off

As an added bonus, this now makes sharing your assets directly through your gateway so much easier. Put them on Twitter or Facebook. Email the links. As long as the recipient has access to a web browser, they will be able to load the models.

Pro tip time! If you want the browser tab to display a custom name for your 3D model, you can add on one more name/value pair to the end of the URL like this:

&customname=whatever name you want

While this is still just a proof of concept, it shows the power of having a dedicated IPFS gateway. We can’t wait to see your creations!

Happy pinning!

How To Share 3D Models With IPFS (2024)
Top Articles
Caribbean Mix Lake Ozark
18 Top-Rated Things to Do in Bakersfield, CA: by a Local
Walgreens Boots Alliance, Inc. (WBA) Stock Price, News, Quote & History - Yahoo Finance
Best Team In 2K23 Myteam
DENVER Überwachungskamera IOC-221, IP, WLAN, außen | 580950
Zitobox 5000 Free Coins 2023
Songkick Detroit
Jonathan Freeman : "Double homicide in Rowan County leads to arrest" - Bgrnd Search
Toyota gebraucht kaufen in tacoma_ - AutoScout24
Waive Upgrade Fee
Urinevlekken verwijderen: De meest effectieve methoden - Puurlv
Craigslistdaytona
Housing Intranet Unt
Jessica Renee Johnson Update 2023
Mycarolinas Login
Tokioof
Purple Crip Strain Leafly
Summoner Class Calamity Guide
Craigslist Pets Athens Ohio
Aucklanders brace for gales, hail, cold temperatures, possible blackouts; snow falls in Chch
Prosser Dam Fish Count
Missouri Highway Patrol Crash
Officialmilarosee
Metro Pcs.near Me
Kayky Fifa 22 Potential
The EyeDoctors Optometrists, 1835 NW Topeka Blvd, Topeka, KS 66608, US - MapQuest
Purdue 247 Football
Vernon Dursley To Harry Potter Nyt Crossword
Prey For The Devil Showtimes Near Ontario Luxe Reel Theatre
Cornedbeefapproved
Craigslist Pasco Kennewick Richland Washington
Horses For Sale In Tn Craigslist
Umn Biology
Pokémon Unbound Starters
Log in or sign up to view
N.J. Hogenkamp Sons Funeral Home | Saint Henry, Ohio
Robert A McDougal: XPP Tutorial
Issue Monday, September 23, 2024
Dumb Money, la recensione: Paul Dano e quel film biografico sul caso GameStop
Save on Games, Flamingo, Toys Games & Novelties
AsROck Q1900B ITX und Ramverträglichkeit
Laurin Funeral Home | Buried In Work
Jewish Federation Of Greater Rochester
Nearest Ups Office To Me
Craigslist Com Panama City Fl
Doublelist Paducah Ky
Boyfriends Extra Chapter 6
Plasma Donation Greensburg Pa
What your eye doctor knows about your health
Att Corporate Store Location
San Pedro Sula To Miami Google Flights
Koniec veľkorysých plánov. Prestížna LEAF Academy mení adresu, masívny kampus nepostaví
Latest Posts
Article information

Author: Duncan Muller

Last Updated:

Views: 5851

Rating: 4.9 / 5 (59 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Duncan Muller

Birthday: 1997-01-13

Address: Apt. 505 914 Phillip Crossroad, O'Konborough, NV 62411

Phone: +8555305800947

Job: Construction Agent

Hobby: Shopping, Table tennis, Snowboarding, Rafting, Motor sports, Homebrewing, Taxidermy

Introduction: My name is Duncan Muller, I am a enchanting, good, gentle, modern, tasty, nice, elegant person who loves writing and wants to share my knowledge and understanding with you.