Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

0xGF/avatar-3d

Repository files navigation

Avatar 3D

Generate interactive 3D avatars from a single photo using AI. Choose between cursor-tracking rotation or full 3D model export.

Features

  • Two Generation Modes:
    • Cursor Tracking - Generate a grid of head rotation frames for mouse-follow effect
    • 3D Model - Generate an actual GLB 3D model you can use in Blender, Unity, etc.
  • Pixar-Style Preprocessing - Photos are transformed into stylized 3D characters
  • Custom Style Prompts - Add accessories, change styles (cyberpunk, cartoon villain, etc.)
  • Export Options - Download GLB files, HTML embeds, individual frames, or React components

Inspiration

Inspired by Wes Bos's Eye Ballz project, which creates interactive eye-tracking avatars. This project extends the concept with AI-powered stylization and true 3D model generation.

How It Works

  1. Upload a photo with a face
  2. The app preprocesses your photo using google/nano-banana-pro to create a Pixar-style 3D character
  3. Based on your selected mode:
  4. Preview and export your creation

Getting Started

Prerequisites

Installation

# Clone the repo
git clone https://github.com/0xGF/avatar-3d.git
cd avatar-3d
# Install dependencies
pnpm install
# Copy environment variables
cp .env.example .env.local
# Add your Replicate API token to .env.local
# REPLICATE_API_TOKEN=r8_xxxxx
# Run the dev server
pnpm dev

Open http://localhost:3000 in your browser.

Configuration

Cursor Tracking Mode

  • Horizontal/Vertical Steps: Number of images in each direction (5x5 = 25 frames)
  • Higher step counts = smoother rotation but more API calls

3D Model Mode

  • Texture Size: Resolution of the model texture (512-2048px)
  • Mesh Quality: Detail level of the 3D mesh (50-100%)

Cost Estimates

  • Preprocessing: ~0ドル.01 per image
  • Cursor Tracking: ~0ドル.01 per frame (5x5 grid ≈ 0ドル.25)
  • 3D Model: ~0ドル.05-0.10 per generation

Tech Stack

Star History

Star History Chart

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /