Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 86 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</a>

<p align="center">
A 3D model generation application powered by Hyper3D Rodin API.
A 3D model generation application powered by the Hyper3D Rodin API.
</p>

<p align="center">
Expand All @@ -15,42 +15,104 @@

<p align="center">
<a href="#about"><strong>About</strong></a> ·
<a href="#how-to-use"><strong>How to Use</strong></a> ·
<a href="#tech"><strong>Tech</strong></a> ·
<a href="#demo"><strong>Demo</strong></a> ·
<a href="#getting-started"><strong>Getting Started</strong></a> ·
<a href="#configuration"><strong>Configuration</strong></a> ·
<a href="#features"><strong>Features</strong></a> ·
<a href="#author"><strong>Author</strong></a>
<a href="#tech-stack"><strong>Tech Stack</strong></a> ·
<a href="#project-structure"><strong>Project Structure</strong></a> ·
<a href="#contributing"><strong>Contributing</strong></a>
</p>
<br/>

## About

3D Model Generator is an AI-powered application that allows you to create 3D models from text prompts or images. Powered by the Hyper3D Rodin API, this tool makes 3D creation accessible to everyone, regardless of their 3D modeling experience.
3D Model Generator provides an end-to-end workflow for creating, previewing, and downloading AI-generated 3D assets from natural language prompts or reference imagery. It orchestrates the experience around Hyper3D's Rodin API so that artists, designers, and developers can experiment with 3D model creation without leaving the browser.

## How to Use
## Demo

1. **Enter a prompt**: Describe the 3D model you want to create
2. **Upload images** (optional): Add reference images to guide the generation
3. **Adjust settings**: Customize quality, format, and other parameters
4. **Generate**: Click the submit button to create your 3D model
5. **Download**: Once generated, download your model in the selected format
- Explore the community build on [Vercel v0](https://v0.dev/community/3-d-model-generator-powered-by-hyper3-d-rodin-bTIhXEOJa8w)
- Preview assets with the integrated `three.js` viewer before downloading the final files

## Tech
## Getting Started

- React & Next.js
- Three.js for 3D rendering and visualization
- Hyper3D Rodin API for 3D model generation
- Tailwind CSS for styling
- Shadcn/UI components
### Prerequisites

- Node.js 18.18+ (or 20+)
- `pnpm` 9+ (recommended) or another Node package manager

### Installation

```bash
git clone <your-fork-url>
cd 3d-model-generator
pnpm install
```

### Local development

```bash
pnpm dev
```

The app starts on `http://localhost:3000`. Any changes under `app/` or `components/` hot-reload automatically.

### Production build

```bash
pnpm build
pnpm start
```

Use `pnpm lint` to run Next.js linting before committing changes.

## Configuration

The app interacts with Hyper3D's Rodin endpoints through Next.js API routes located in `app/api/*`.

- **API key**: replace the placeholder `API_KEY` constant in `app/api/rodin/route.ts`, `app/api/status/route.ts`, and `app/api/download/route.ts` with your Hyper3D key. Avoid committing private keys.
- **Environment variables**: for a cleaner setup, you can move the API key into `.env.local` and access it via `process.env`. (Example: `process.env.HYPER3D_API_KEY`).
- **CORS & downloads**: `app/api/proxy-download/route.ts` streams file responses so downloads work consistently across browsers.

## Features

- Text-to-3D generation
- Image-to-3D generation
- Multiple file format support (GLB, USDZ, FBX, OBJ, STL)
- Adjustable quality settings
- Real-time 3D preview
- Responsive design for desktop and mobile
- Advanced options for fine-tuning generation
- Prompt-based and image-conditioned 3D model requests
- Fine-grained quality, format, and lighting controls via the form UI
- Job status polling with progress feedback and error surfaces
- Built-in viewer powered by `three.js` / `@react-three/fiber`
- Multi-format downloads (GLB, USDZ, FBX, OBJ, STL)
- Responsive layout with dark/light theme support

## Tech Stack

- Next.js 15 & React 19 with the App Router
- Three.js, `@react-three/fiber`, and `@react-three/drei` for rendering
- Tailwind CSS and shadcn/ui for component primitives
- Zod & `react-hook-form` for schema-driven validation and forms
- TypeScript end to end

## Project Structure

```
app/ # Next.js app router, pages, layouts, API routes
components/ # Reusable UI and scene components
hooks/ # Custom hooks for media queries, toasts, etc.
lib/ # Form schemas, API helpers, general utilities
public/ # Static assets used across the app
styles/ # Global Tailwind entrypoint
```

Notable entry points:

- `app/page.tsx` wires form state, job orchestration, and viewer layout
- `components/model-viewer.tsx` is the primary `three.js` canvas
- `components/form.tsx` defines the input options surfaced to users

## Contributing

1. Fork the repository and create a feature branch.
2. Ensure `pnpm lint` passes and include relevant tests or screenshots for UI tweaks.
3. Submit a pull request with a clear description of changes and testing notes.

## Author

Expand Down