๐ฎ Text-to-3D generation app for Roblox using OpenAI's Shap-E
Transform your ideas into Roblox-ready 3D models using natural language descriptions!
- ๐ Fast 3D Generation: Create 3D models from text in seconds
- ๐ฏ Roblox Optimized: Automatic optimization for Roblox requirements (โค10k triangles, watertight meshes)
- ๐จ Multiple Formats: Export to OBJ, FBX, and GLTF
- ๐ฅ๏ธ User-Friendly Interface: Clean web interface with real-time preview
- โก Background Processing: Async generation with progress tracking
- ๐ฑ Responsive Design: Works on desktop and mobile
- Python 3.8+
- Node.js 16+
- Git
- Clone the repository
git clone <your-repo-url>
cd shap-e- Run the setup script
python setup.py- Start the backend
# Activate virtual environment
# Windows:
venv\Scripts\activate
# Linux/Mac:
source venv/bin/activate
# Start the API server
python src/api_server.py- Start the frontend (in a new terminal)
cd frontend
npm run dev- Open your browser
Navigate to
http://localhost:3000
- Enter a description of your 3D object (e.g., "a medieval sword with golden handle")
- Choose export format (OBJ recommended for Roblox)
- Click Generate and wait for processing
- Download your Roblox-ready 3D model!
- Download your generated model
- Open Roblox Studio
- Go to Avatar tab โ 3D Importer
- Select your downloaded file
- Click Import!
- "a futuristic spaceship with glowing engines"
- "a wooden treasure chest with golden clasps"
- "a cartoon-style robot with blue accents"
- "a magical staff with crystal orb"
- "a racing car with spoiler, low-poly style"
POST /api/generate- Start 3D generationGET /api/jobs/{job_id}- Check generation statusGET /api/jobs- List all jobsGET /download/{filename}- Download generated model
- Uses OpenAI's Shap-E for text-to-3D generation
- Leverages conditional implicit neural representations
- Fast generation (seconds to minutes vs hours)
- Triangle Reduction: Automatically reduces to โค10,000 triangles
- Mesh Cleanup: Removes degenerate faces and duplicate vertices
- Watertight Validation: Ensures meshes are properly closed
- Format Conversion: Exports in Roblox-compatible formats
Frontend (React) โ FastAPI Backend โ Shap-E โ Mesh Optimization โ Export
Create a .env file:
CUDA_VISIBLE_DEVICES=0 # For GPU acceleration
MAX_CONCURRENT_JOBS=2 # Limit concurrent generations
- Guidance Scale: Controls adherence to prompt (1-30, default: 15)
- Max Triangles: Triangle limit for Roblox (100-10000)
- Target Format: Output format (obj/fbx/gltf)
-
CUDA Out of Memory
- Reduce
batch_sizein generation config - Use CPU if GPU memory is limited
- Reduce
-
Shap-E Models Not Found
- Models download automatically on first use
- Ensure stable internet connection
-
Frontend Build Errors
- Run
npm installin frontend directory - Check Node.js version (16+ required)
- Run
-
Import to Roblox Fails
- Ensure model file size < 50MB
- Try different export format (OBJ usually most compatible)
shap-e/
โโโ src/
โ โโโ shapeforge_core.py # Core 3D generation logic
โ โโโ api_server.py # FastAPI backend
โโโ frontend/
โ โโโ src/
โ โ โโโ App.jsx # Main React component
โ โ โโโ main.jsx # React entry point
โ โโโ package.json
โโโ requirements.txt # Python dependencies
โโโ setup.py # Setup script
- New Export Format: Extend
RobloxExportPipelineclass - Custom Optimization: Modify
RobloxMeshOptimizerclass - UI Improvements: Edit React components in
frontend/src/
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - See LICENSE file for details
- OpenAI Shap-E for the core 3D generation
- Trimesh for 3D mesh processing
- FastAPI for the backend framework
- React and Three.js for the frontend
- ๐ง Create an issue for bug reports
- ๐ฌ Join our Discord for community support
- ๐ Check the wiki for detailed guides
Made with โค๏ธ for the Roblox creator community