whatisgithub

What is cast3d?

yulab-smu/cast3d — explained in plain English

Analysis updated 2026-05-18

2RAudience · researcherComplexity · 2/5Setup · easy

In one sentence

An R package that turns a photo into an interactive 3D model you can view in a browser or Shiny app, using the Tripo AI image-to-3D API.

Mindmap

mindmap
  root((repo))
    What it does
      Photo to 3D model
      Interactive viewer
      Shiny integration
    Tech Stack
      R
      Three.js
      Shiny
    Use Cases
      Presentation visuals
      Embed in Shiny app
      Batch generate models
    Audience
      Researchers
      R developers
    Architecture
      API layer httr2
      Task polling
      Viewer widget

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Turn a photograph into a rotatable 3D model for a report or presentation.

USE CASE 2

Embed an interactive 3D model viewer inside a Shiny web app.

USE CASE 3

Automate batch generation of 3D models from a folder of images.

USE CASE 4

Check basic metadata like vertex and face count for a generated 3D model.

What is it built with?

RThree.jsShinyhttr2

How does it compare?

yulab-smu/cast3dhadley/loggerhadley/mylittlepony
Stars2118
LanguageRRR
Last pushed2024-10-162018-11-09
MaintenanceStaleDormant
Setup difficultyeasyeasyeasy
Complexity2/52/51/5
Audienceresearcherdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires a Tripo API key from an external paid service before any model can be generated.

The README does not state a license, so terms of use are unclear.

So what is it?

cast3d is a small R package that turns a photo, or a short text description, into an interactive 3D model you can view and rotate right in a browser or inside a Shiny app. It works by sending the image to Tripo, an external AI service that builds 3D models from images, and getting back a GLB file, which is a common format for storing 3D shapes. Using it is meant to be simple. After installing the package from GitHub, a user sets up their Tripo API key once, then calls a single function that takes a photo and returns a finished 3D model. Behind that one function are smaller pieces that can also be used on their own: one that submits the image to Tripo, one that repeatedly checks whether the model is ready yet, one that downloads the finished .glb file to a local cache, and one that opens an interactive viewer built on the Three.js JavaScript library, complete with mouse controls to orbit around the model. Another function reports basic facts about a model, like how many vertices and faces it has and how large the file is. The API key can be set through the setup function or as a plain environment variable, and the package will pick it up automatically when loaded. For people building web apps with Shiny, cast3d includes ready made components so a generated 3D model can be dropped straight into a Shiny page and rendered as an interactive widget. Internally the package is organized in four layers: a bottom layer that handles authenticated requests to the Tripo API with retries and timeouts, a task layer that creates and polls generation jobs, a model layer that downloads files and reads their metadata, and a top viewer layer that wraps Three.js as an R htmlwidget. The example included in the project turns a photo of a bacteriophage into a viewable 3D model.

Copy-paste prompts

Prompt 1
Help me set up cast3d with my Tripo API key and generate a 3D model from a photo.
Prompt 2
Show me how to embed a cast3d 3D viewer inside a Shiny app.
Prompt 3
Explain what each layer of cast3d's architecture does, from API calls to the Three.js viewer.
Prompt 4
Help me write an R script that batch-generates 3D models for a folder of images using cast3d.

Frequently asked questions

What is cast3d?

An R package that turns a photo into an interactive 3D model you can view in a browser or Shiny app, using the Tripo AI image-to-3D API.

What language is cast3d written in?

Mainly R. The stack also includes R, Three.js, Shiny.

What license does cast3d use?

The README does not state a license, so terms of use are unclear.

How hard is cast3d to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is cast3d for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.