Skip to content

3DSceneAgent/PCGIntegrator3D

Repository files navigation

PCGIntegrator3D

A high-quality, extensible FastAPI service for Procedural Content Generation (PCG) of 3D assets. Currently supports Infinigen with a modular architecture designed for easy integration of additional PCG modules.

Features

  • 🚀 RESTful API - Clean, well-documented REST endpoints
  • 🔌 Modular Architecture - Easy to extend with new PCG modules
  • 📦 Infinigen Integration - Generate diverse 3D assets using Infinigen
  • 🔄 Async Support - Both synchronous and asynchronous generation endpoints
  • 📝 Auto-generated Documentation - Interactive API docs with Swagger UI
  • ⚙️ Configurable - Environment-based configuration management
  • 🛡️ Type Safety - Full Pydantic validation for requests and responses

Installation

Prerequisites

  • Ubuntu (Tested on Ubuntu24.04)
  • Conda (Anaconda3/Miniconda3)

Setup

  1. Clone the repository
git clone https://github.com/3DSceneAgent/PCGIntegrator3D.git
cd PCGIntegrator3D
  1. Run the install script
./install.sh

You may need to enter your password for sudo.

Usage

Starting the Server

Development mode (with auto-reload):

uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

Production mode:

uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4

The API will be available at http://localhost:8000

API Documentation

Once the server is running, access the interactive API documentation:

Configuration

Configuration is managed through environment variables. See .env.example for all available options.

Key configuration options:

Variable Description Default
PROJECT_NAME Service name PCGIntegrator3D
API_VERSION API version 1.0.0
ENVIRONMENT Environment (development/production) development
HOST Server host 0.0.0.0
PORT Server port 8000
OUTPUT_BASE_DIR Base directory for outputs outputs
INFINIGEN_DEFAULT_NUM_ASSETS Default number of assets 1

Extending with New PCG Modules

The architecture is designed for easy extension. To add a new PCG module:

  1. Create utility functions in utils/your_module_generate.py
  2. Define Pydantic models in app/models/your_module.py
  3. Create router in app/routers/your_module.py
  4. Register router in app/main.py:
from app.routers import your_module

app.include_router(
    your_module.router,
    prefix="/api/v1/your_module",
    tags=["YourModule"]
)

License

See LICENSE file for details.

Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch
  3. Follow the existing code style
  4. Add tests for new features
  5. Submit a pull request

Support

For issues and questions:

  • Open an issue on GitHub
  • Check existing documentation
  • Review API docs at /docs endpoint

Built with FastAPI - Modern, fast, and production-ready Python web framework.

About

A unified service framework that integrates and orchestrates multiple 3D procedural content generation (PCG) tools.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors