How we created photorealistic venue renders from a structural 3D model using Blender + Gemini AI. Every step, tool, and design decision documented.
The v11 pipeline combines precise 3D structural modeling with AI image generation to produce photorealistic renders that accurately represent the venue layout while looking like real photographs.
Build the entire Sponic Garden campus programmatically in Blender using Python. Every building, walkway, plant, light, and fixture is placed via script with exact coordinates in meters.
Script: scripts/blender/build_v11_rapid.py (~900 lines)
Render 8 camera views using Blender Cycles path tracing on a Mac mini M4 (Alpuca). 2K resolution, 2048 samples per pixel, clean daylight lighting, OIDN denoising. ~4-6 hours total render time.
Each structural render is sent to Gemini image generation as a layout/depth guide with a camera-specific prompt describing the desired photorealistic result. The AI adds real-world textures, vegetation detail, atmospheric lighting, and material realism while preserving the exact structural layout.
Model: gemini-2.0-flash-preview-image-generation
All images uploaded to Supabase storage with full metadata (prompt, model, camera, keywords). Displayed side-by-side (structural vs. photorealistic) on the venue design page.
Open-source 3D modeling. Used headlessly via Python API (bpy) to build scene geometry, materials, cameras, and lights programmatically. No manual modeling.
Physically-based path tracer. Produces accurate lighting, reflections, glass refraction, caustics, and shadows. Metal GPU acceleration on Apple Silicon.
Dedicated render machine. GPU rendering via Metal. SSH-accessible at 192.168.1.200. Runs renders unattended in background via nohup.
Google's multimodal AI model. Accepts an input image + text prompt, generates a new image preserving the structural layout while adding photorealism. Used via google-genai Python SDK.
Cloud object storage for all generated images. Each upload includes metadata row in image_assets table with prompt, model, keywords, and file details.
AI coding assistant that wrote all scripts, managed the pipeline, coordinated between local machine and render server, and built this documentation page.
Pure text-to-image AI generation cannot reliably produce a specific venue layout with exact building positions, sizes, and spatial relationships. By rendering the structural model first, we get pixel-perfect layout accuracy. The AI step then adds visual realism without rearranging anything.
v9 and v10 used barrel (cylindrical) saunas. v11 switches to square/rectangular cedar cabins with glass windows. This matches the industrial-garden aesthetic better — the geometric forms echo the corrugated metal buildings, and the windows allow warm interior light to glow outward, enhancing the evening atmosphere.
EEVEE renders in seconds but produces flat, game-engine-quality output. Cycles path tracing produces physically accurate lighting, glass refraction, water caustics, and depth of field — giving the AI enhancement step much better depth and material cues to work with. With 8 hours available on the M4 GPU, the quality trade-off is worthwhile.
v9 used dramatic sunset lighting for mood. v11 uses neutral daylight (sun elevation 50°, near-white color) for structural clarity. When AI-enhancing, the model can more accurately interpret building materials, vegetation, and spatial relationships from an evenly-lit scene. The AI can add atmospheric mood on top.
| Decision | Choice | Rationale |
|---|---|---|
| Render engine | Cycles (GPU) | Physically accurate lighting gives AI better depth/material cues |
| Resolution | 2560 × 1440 (2K) | Sharp enough for AI input, half the render time of 4K |
| Samples | 2048 spp | Clean enough with OIDN denoising; 4× faster than v10's 8192 |
| Sauna shape | Square with windows | Matches industrial-garden aesthetic, allows warm interior glow |
| Lighting | Clean daylight | Structural clarity for AI interpretation; AI adds mood |
| AI model | Gemini 2.0 Flash Preview | Supports image-to-image, preserves structural layout |
| Camera count | 8 views | Aerial + hero + 4 key areas + 2 details covers all features |
| Color management | AgX Punchy | Film-like tonemap, handles bright skies and dark interiors well |
| Camera | Lens | Purpose | Special |
|---|---|---|---|
| CAM_aerial | Orthographic | Full campus overhead | ortho_scale: 100 |
| CAM_hero | 24mm | Main marketing perspective | Elevated angle, wide view |
| CAM_pool_spa | 32mm | Pool and spa area | DOF f/3.5 |
| CAM_entrance | 24mm | Eye-level arrival experience | Ground level, looking forward |
| CAM_greenhouse_detail | 85mm | Greenhouse close-up | DOF f/2.0, telephoto compression |
| CAM_firepit_evening | 35mm | Fire pit social area | String lights in frame |
| CAM_coffee_bar | 50mm | Coffee bar atmosphere | DOF f/2.8 |
| CAM_spa_detail | 50mm | Square saunas + hot tubs | DOF f/2.8 |
The 3D model contains ~1000+ objects organized into 12 collections:
| Collection | Contents | Object Count |
|---|---|---|
| Buildings | 7 buildings + coffee bar: walls, floors, roofs, doors, windows | ~120 |
| Trusses | Exposed A-frame steel roof trusses on all buildings | ~80 |
| Pool | Swimming pool, deck, coping, steps, loungers, umbrellas | ~30 |
| Spa | 2 square saunas, 2 hot tubs, cold plunge, deck | ~25 |
| Landscape | Ground plane, garden beds, trees, hedges, shrubs, flowers, fire pit, fountain, reflecting pool | ~250 |
| Plants | Potted plants at entrances, climbing wall vines | ~150 |
| Furniture | Benches, dining tables, stools, yoga deck | ~30 |
| StringLights | 22 string light runs with emissive bulbs + point lights | ~180 |
| Paths | Covered walkways, stone radial paths, running circuit | ~40 |
| Interiors | Greenhouse tables/shelves/plants, movement studio furniture | ~30 |
| Site | 250m ground plane with procedural grass texture | 1 |
All materials are procedural PBR (physically based rendering) — no image textures. This keeps the script self-contained and the .blend file small.
| Material | Roughness | Metallic | Use |
|---|---|---|---|
| Steel Frame | 0.30 | 0.90 | Trusses, posts, legs |
| Corrugated Metal | 0.45 | 0.70 | Building walls, roofing |
| Brick | 0.88 | 0.00 | Welcome Center, Dining Hall |
| Cedar Wood | 0.70 | 0.00 | Walkway posts, roof, saunas |
| Glass (tinted) | 0.05 | 0.00 | Greenhouse walls (alpha 0.30) |
| Glass (warm) | 0.03 | 0.00 | Windows with interior glow |
| Pool Water | 0.01 | 0.00 | Pool surface (alpha 0.60) |
| Sauna Wood | 0.55 | 0.00 | Square sauna walls |
Each structural render is sent to Gemini as an image-to-image input with a camera-specific prompt. The prompt describes:
Critical constraint: Every prompt includes "Keep the EXACT same layout, building positions, sizes, and shapes" and "do NOT rearrange, add, or remove any buildings or features." The AI adds visual realism to existing geometry — it does not redesign the venue.
"Transform this close-up 3D render into a photorealistic
photograph of the spa area at Sponic Garden. TWO SQUARE
wooden sauna cabins with glass windows (NOT barrel saunas),
cedar hot tubs, and a concrete cold plunge pool. Wooden deck
underneath. Hedges provide privacy. Industrial Spa House
building visible behind. Keep the EXACT same layout, sauna
shapes (rectangular/square with flat roof and windows), hot
tub positions, and camera angle. Add realistic cedar wood
grain, steam rising from hot tubs, warm window glow from
inside saunas, wet deck surfaces, and lush surrounding
plantings."
# Engine engine: Cycles (GPU / Metal) device: Mac mini M4 — Apple Silicon GPU tile_size: 256 (optimized for Metal) # Quality resolution: 2560 x 1440 (2K) samples: 2048 spp adaptive: threshold 0.005 denoiser: OpenImageDenoise (Accurate) # Bounces max_bounces: 24 diffuse: 6 glossy: 8 transmission: 12 (glass/water) caustics: reflective + refractive # Lighting sky: Hosek-Wilkie (sun 50deg, clear) sun_energy: 4.0 (near-white daylight) fill_energy: 1.5 (cool blue fill) exposure: 0.3 view_transform: AgX Punchy # Color color_space: AgX look: Punchy
| Version | Engine | Key Changes | Status |
|---|---|---|---|
| v4 | EEVEE | Initial blockout, flat colors, no sky | Superseded |
| v6 | Cycles | Clean geometry, first proper materials | Superseded |
| v7 | Cycles | Added amenities, pool, paths | Superseded |
| v8 | Cycles | Organic trees, golden hour lighting | Superseded |
| v9 | Cycles | Industrial-garden aesthetic, trusses, string lights, barrel saunas | Previous |
| v10 | Cycles 4K | 8192 spp, interiors, doubled vegetation, maximum quality | Previous |
| v11 | Cycles + Gemini AI | Square saunas with windows, clean daylight, AI photorealistic enhancement | Current |
| v11 ext | Cycles + Gemini AI | Golden hour (5 cameras), blue hour (2 cameras), 4 new angles, geometry passes (depth/normal/AO/mist) | Current |
# Scripts scripts/blender/build_v11_rapid.py # Blender scene builder (1275 objects) scripts/blender/render_v11_passes.py # Geometry passes (depth/normal/AO/mist) scripts/blender/render_v11_golden.py # Golden hour re-lighting (5 cameras) scripts/blender/render_v11_newcams.py # 4 new camera angles scripts/blender/render_v11_bluehour.py# Blue hour twilight (2 cameras) scripts/render_v11_all.sh # Alpuca orchestrator (chains all phases) scripts/gemini_enhance_renders.py # Gemini AI enhancement (all variants) scripts/upload_renders_supabase.py # Supabase storage upload scripts/poll_and_enhance.sh # Auto-pull from Alpuca + enhance # Outputs — Daylight (8 cameras) design/renders/v11/ # Structural Blender renders design/renders/v11-photo/ # AI-enhanced photorealistic # Outputs — Extended Pipeline design/renders/v11-golden/ # Golden hour structural design/renders/v11-golden-photo/ # Golden hour AI-enhanced design/renders/v11-bluehour/ # Blue hour structural design/renders/v11-bluehour-photo/ # Blue hour AI-enhanced design/renders/v11-newcams/ # New angles structural design/renders/v11-newcams-photo/ # New angles AI-enhanced design/renders/v11-passes/ # Geometry passes (depth/normal/AO/mist) # Display design/venue.html # Side-by-side gallery (all variants) design/design-process.html # This page # Remote (Alpuca Mac mini M4) [email protected]:~/Projects/sponic-garden-3d/ scripts/build_v11_rapid.py # Deployed to render machine renders/v11/ # Raw render output renders/v11-golden/ # Golden hour output renders/v11-bluehour/ # Blue hour output renders/v11-newcams/ # New angles output renders/v11-passes/ # Geometry passes output sponic-garden-v11.blend # Saved .blend file