Library / SDK
ahujasid/camera-to-blender avatar
ahujasid/camera-to-blender

camera-to-blender: Phone Photo to 3D Model in Blender via Tripo3D

Take a photo of real objects, and paste them in Blender

840 stars83 forksJavaScriptMIT

At a glance

What is it?
camera-to-blender is a MIT-licensed tool that connects a phone camera to Blender through a local FastAPI server, a Tripo3D API call for 3D model generation, and a WebSocket-based Blender add-on. It is a proof-of-concept workflow with a hard dependency on a paid third-party API.
Who is it for?
camera-to-blender suits Blender users who want to quickly prototype object placement from real-world photos and who already have or can get a Tripo3D API key. It is a poor fit for production workflows, batch processing, or anyone who needs reproducible mesh quality, since the 3D output quality depends entirely on Tripo3D's model generation service.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 24 days ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 27, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What the Tool Does and Who It Is For

camera-to-blender solves a narrow, specific problem: you want a rough 3D representation of a real object inside Blender without the manual work of photogrammetry or hand-modelling. You point your phone at an object, take a photo, and the tool sends that photo through a background-removal step and a 3D model generation API, then pushes the resulting mesh directly into an open Blender session over a WebSocket connection.

The target user is a Blender artist or technical director doing rapid concept work who wants physical reference objects in their scene quickly. It is not a photogrammetry tool and does not produce production-ready meshes. The README describes the process as taking under a minute from photo to imported model, with the generation step taking roughly 30 to 60 seconds.

How the Pipeline Works: Relay Server, Tripo3D, and the Blender Add-on

The repository contains three components that work together. `relay_server.py` is a FastAPI application that acts as the central coordinator. `webapp/` holds the phone camera interface, a browser-based UI designed for mobile screens. `blender_addon/` contains the source for the Blender add-on, with a prebuilt `ws_import_addon.zip` ready to install.

The flow is: the phone opens the ngrok HTTPS URL, captures a photo, and submits it to the relay server. The server optionally calls the Gemini API to remove the photo background, then calls the Tripo3D API to generate a 3D model. The relay server holds a WebSocket connection to the Blender add-on, and once the model is ready, sends it over that connection. Blender receives the model and imports it into the active scene.

Tripo3D provides the actual 3D generation; the repository contains no generation code itself. If Tripo3D is unavailable or the API key is invalid, no model is produced.

Installation and Setup: Five Steps

The README walks through setup in four stages. First, install the Python dependencies and copy the environment file:

bash
pip install -r requirements.txt
cp .env.example .env

Add your API keys to the `.env` file:

code
TRIPO_API_KEY=your_tripo_api_key_here
GEMINI_API_KEY=your_gemini_api_key_here

Second, start the relay server:

bash
uvicorn relay_server:app --host 0.0.0.0 --port 8000

Third, in a separate terminal, start ngrok to expose the server over HTTPS:

bash
ngrok http 8000

ngrok prints a URL such as `https://abc123.ngrok-free.app`. Fourth, install the Blender add-on: open Blender, go to Edit, Preferences, Add-ons, Install, select `ws_import_addon.zip`, and enable it. In the 3D viewport, press N, open the WS Import tab, paste the ngrok URL with `wss://` and `/ws?client=blender` appended, and click Connect.

Once connected, open the ngrok URL on your phone, allow camera access, take a photo, and tap Send to Blender. The model appears in the scene within about 30 to 60 seconds.

Running Without a Phone and Troubleshooting Common Errors

If you want to test without a phone, the README says to skip ngrok and open `http://localhost:8000` directly in your browser while pointing the Blender add-on at `ws://localhost:8000/ws?client=blender` instead of the wss URL. A laptop webcam works in place of a phone camera.

The README documents four common failure modes. If the phone camera will not open, the phone requires the HTTPS ngrok URL, not a local IP address. If Send to Blender fails, the add-on is not connected; check that the WS Import panel shows "Connected" and that the URL starts with `wss://` and ends with `?client=blender`. Free ngrok URLs reset on every restart, so if the URL stops working, reconnect Blender with the new one. Background removal failures are typically a Gemini API quota or key problem; leaving `GEMINI_API_KEY` empty skips that step and uses the raw photo as the Tripo3D input.

If you modify the Blender add-on source, the README gives the repackaging command:

bash
zip -r ws_import_addon.zip blender_addon -x "*/__pycache__/*" "*.pyc"

Hard Dependency on Tripo3D: Costs and Quality

The Tripo3D API is the only 3D generation path in this tool. The README makes this explicit: "A Tripo3D API key is required, this makes the 3D models." Tripo3D is a commercial service at platform.tripo3d.ai, and API usage is billable; the repository contains no information about pricing or free tier limits.

The quality of the generated mesh is entirely a function of what Tripo3D produces from the photo input. The tool has no local generation fallback, no post-processing step, and no way to tweak generation parameters other than what the background removal step might change about the input photo. Users who need specific mesh topology, clean UV maps, or consistent polygon counts cannot achieve those goals through this tool.

The repository has no GitHub releases and was last pushed on 2026-09-05. It carries a JavaScript classification in GitHub despite the relay server being Python, because the webapp and add-on scripts account for much of the file count.

Limitations: What This Tool Cannot Do

camera-to-blender is not a photogrammetry pipeline. It does not take multiple photos from different angles to reconstruct geometry; it relies on Tripo3D's single-image model generation, which approximates an object's shape from one viewpoint. The README does not claim sub-centimetre accuracy or production-ready mesh output.

The WebSocket connection between ngrok and the Blender add-on is fragile in the ways the README documents: free ngrok URLs are ephemeral, and the connection is stateful. If Blender crashes or the server restarts, the whole setup must be reconnected manually.

There is no batch mode, no queue, and no way to process multiple photos without repeating the full interaction. For any workflow where you need to capture more than a handful of objects, the manual per-photo confirmation step becomes a bottleneck.

The Gemini background-removal step is optional and provided as a quality improvement. The README notes that leaving the key empty skips it entirely, and the tool still works, but Tripo3D then receives the original photo with whatever background was present.

Comparing to RealityCapture and Photogrammetry Pipelines

RealityCapture is a commercial photogrammetry application that produces high-quality 3D reconstructions from dozens or hundreds of photos taken from calibrated positions. It requires careful photography, camera overlap, and significant processing time. The output meshes are detailed enough for visual effects and game asset pipelines.

camera-to-blender's approach is the opposite: one photo, no calibration, fast result, rough output. It is closer to a quick reference import than to an asset production step. The difference in approach reflects a difference in purpose: RealityCapture is for measured reconstruction, and camera-to-blender is for getting a shape placeholder into a scene quickly without leaving Blender.

For teams that want local, offline single-image 3D generation without a paid API, tools built around TripoSR or other open-weight models exist, but they require local GPU setup and are outside the scope of this repository.

Editorial conclusion

camera-to-blender suits Blender users who want to quickly prototype object placement from real-world photos and who already have or can get a Tripo3D API key. It is a poor fit for production workflows, batch processing, or anyone who needs reproducible mesh quality, since the 3D output quality depends entirely on Tripo3D's model generation service. Before starting, confirm that Tripo3D's API pricing and output mesh format are compatible with your use case, because the tool has no fallback generation path if that service is unavailable.

Frequently asked questions

Does camera-to-blender work without a Tripo3D API key?

No. The README states that a Tripo3D API key is required, as it is the service that generates the 3D models. There is no local generation fallback in this repository.

Can camera-to-blender be used without a phone?

Yes. The README describes a laptop webcam mode: skip ngrok, open http://localhost:8000 in your browser, and point the Blender add-on at ws://localhost:8000/ws?client=blender instead of the wss ngrok URL.

Why does camera-to-blender require ngrok for phone use?

Phone cameras require an HTTPS origin to allow camera access in the browser. ngrok provides a public HTTPS URL that tunnels to the local relay server, which is running on HTTP over localhost.

Official sources

  1. ahujasid/camera-to-blender on GitHub
  2. Issues
  3. License: MIT
  4. README
For maintainers

Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/ahujasid-camera-to-blender.svg)](https://hysenlabs.com/projects/ahujasid-camera-to-blender)
Community notes

Community notes