Skip to main content
NOV 20, 2022
4min read 708 words

Using Polycam Scans In Three Js

In which I turn my gear page into a video game inventory with spinning 3D models because I'm a total dork and it's going to be amazing

Building a Video Game Inventory for My Real-World Gear

I have a /gear section on my website that lists all my camping and adventure equipment. It's functional but boring—just text descriptions and maybe some product photos. But I've been obsessed with this idea: what if I turned it into a video game inventory with little spinning 3D models of everything?

I know it's dorky, but imagine browsing someone's gear collection like you're managing your RPG character's equipment. Click on that ultralight backpack and it spins slowly, showing all the details. Hover over the camping stove and get stats like weight, fuel efficiency, and burn time.

Here's how I'm building this ridiculous but delightful experience using Polycam scans and Three.js.

The Vision: RPG Inventory Meets Real Gear

The goal is simple: every piece of gear gets its own spinning 3D model that you can interact with. Think of classic RPG inventories where items rotate in their slots, but instead of fantasy weapons, it's my actual MSR camping stove and Patagonia jacket.

Each item should:

  • Spin slowly by default (because spinning things are mesmerizing)
  • Respond to mouse interaction for closer inspection
  • Show gear stats and details on hover or click
  • Load quickly without destroying the page performance

Step 1: Creating Polycam Scans

Polycam makes this surprisingly easy. The key is good lighting and taking your time:

  1. Set up in good, even lighting. I use natural light from a big window or go outside on an overcast day.

  2. Use a neutral background. A white sheet or large piece of paper works great. You want the object to be the star, not whatever's behind it.

  3. Scan methodically. Start at one height and work your way around the object, then move up or down and repeat. Polycam needs overlap between photos to build the 3D model.

  4. Get the details. Don't rush. The better your scan, the less cleanup you'll need later.

For gear, I've found that items with interesting textures (like worn leather or technical fabric) scan beautifully, while super reflective or transparent materials can be tricky.

Step 2: Exporting for Web Use

Polycam gives you several export options, but for web use you want:

  • Format: GLB (smaller file sizes than OBJ)
  • Quality: Medium (balances detail with file size)
  • Texture resolution: 1024x1024 (plenty for web viewing)

The files are still going to be several megabytes each, so this isn't for dial-up users, but modern web connections can handle it fine.

The Technical Challenge

The basic idea is straightforward: scan gear with Polycam, export 3D models, display them with Three.js in a grid that feels like a video game inventory. But like most things that sound simple, the devil is in the details.

The main technical hurdles:

  • Getting good Polycam scans (lighting, background, scanning technique)
  • Optimizing file sizes for web delivery
  • Setting up Three.js to render multiple models without killing performance
  • Making the interface feel game-like rather than just "here are some spinning objects"

Game Design Elements

The key to making this feel like an actual RPG inventory rather than just a fancy product showcase:

RPG-style stats: Instead of boring product specs, present gear info like game stats:

  • Weight: 2.3 lbs
  • Durability: 95/100 (based on wear/age)
  • Temperature Rating: -10°F
  • Rarity: Uncommon (color-coded borders)

Categories: Organize gear into classic RPG categories—Shelter, Cooking, Navigation, Survival, etc.

Interaction feedback: Hover effects, selection states, maybe subtle sound effects

Visual polish: Proper lighting for the 3D models, consistent styling, grid layouts that feel like inventory slots

Why Build This?

Is it practical? Absolutely not. Is it delightful? Completely.

Sometimes the best reason to build something is because it would make you smile every time you use it. Plus it's a fun way to show off both your gear obsession and your web development skills in one ridiculous package.

Tools used:

The complete source code for my gear inventory is available on GitHub—because if you're going to be a dork about gear organization, you might as well be an open-source dork.

If you found value in this, consider supporting my work

github ·