An automated pipeline that transforms a text description into a production-ready 3D asset and marketing campaign.
- Concept to Image: Uses Gemini 1.5 to refine product concepts and generate high-quality visual prompts.
- Image to 3D: Full integration with Meshy.ai to create professional PBR-textured 3D meshes (
.glb) using base64 encoding. - Virtual Photoshoot: Automated offscreen rendering of the 3D asset into studio-quality marketing shots using
pyrenderandtrimesh. - Marketing Intelligence: AI-driven analysis of the final render to produce targeting strategies, slogans, and ad copy.
- AI: Google Gemini 1.5 Pro/Flash, Meshy.ai
- 3D: Trimesh, Pyrender (requires OpenGL/GPU or OSMesa)
- Language: Python 3.10+
-
Clone the repository:
git clone <your-repo-url> cd 3dmeshlogic
-
Install dependencies:
pip install -r requirements.txt
Note:
pyrendermay requires a valid OpenGL context or OSMesa for headless operation. -
Setup Environment: Create a
.envfile from the template:cp .env.example .env
Add your API keys:
GOOGLE_API_KEY: Get from Google AI Studio.MESHY_API_KEY: Get from Meshy.ai Dashboard.
Run the pipeline with a single command:
python main.py "A modern ergonomic desk lamp with carbon fiber finish"The results will be available in the outputs/ directory:
outputs/images/: The initial product concept.outputs/meshes/: High-quality 3D models (.glb).outputs/photoshoots/: Rendered production shots.
MIT