v11 Render Pipeline

How we created photorealistic venue renders from a structural 3D model using Blender + Gemini AI. Every step, tool, and design decision documented.

Pipeline Overview

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.

1

3D Structural Model Blender + Python

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)

2

Cycles Render Mac mini M4 GPU

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.

3

AI Photorealistic Enhancement Gemini

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

4

Storage & Display Supabase + GitHub Pages

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.

Tools & Infrastructure

Blender 4.x

Open-source 3D modeling. Used headlessly via Python API (bpy) to build scene geometry, materials, cameras, and lights programmatically. No manual modeling.

Blender Cycles

Physically-based path tracer. Produces accurate lighting, reflections, glass refraction, caustics, and shadows. Metal GPU acceleration on Apple Silicon.

Mac mini M4 (Alpuca)

Dedicated render machine. GPU rendering via Metal. SSH-accessible at 192.168.1.200. Runs renders unattended in background via nohup.

Gemini Image Generation

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.

Supabase Storage

Cloud object storage for all generated images. Each upload includes metadata row in image_assets table with prompt, model, keywords, and file details.

Claude Code

AI coding assistant that wrote all scripts, managed the pipeline, coordinated between local machine and render server, and built this documentation page.

Design Decisions

Why structural renders first, not pure AI generation?

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.

Why square saunas?

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.

Why Cycles instead of EEVEE?

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.

Why clean daylight instead of sunset?

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 Setup (8 Views)

Camera Lens Purpose Special
CAM_aerialOrthographicFull campus overheadortho_scale: 100
CAM_hero24mmMain marketing perspectiveElevated angle, wide view
CAM_pool_spa32mmPool and spa areaDOF f/3.5
CAM_entrance24mmEye-level arrival experienceGround level, looking forward
CAM_greenhouse_detail85mmGreenhouse close-upDOF f/2.0, telephoto compression
CAM_firepit_evening35mmFire pit social areaString lights in frame
CAM_coffee_bar50mmCoffee bar atmosphereDOF f/2.8
CAM_spa_detail50mmSquare saunas + hot tubsDOF f/2.8

Scene Composition

The 3D model contains ~1000+ objects organized into 12 collections:

Collection Contents Object Count
Buildings7 buildings + coffee bar: walls, floors, roofs, doors, windows~120
TrussesExposed A-frame steel roof trusses on all buildings~80
PoolSwimming pool, deck, coping, steps, loungers, umbrellas~30
Spa2 square saunas, 2 hot tubs, cold plunge, deck~25
LandscapeGround plane, garden beds, trees, hedges, shrubs, flowers, fire pit, fountain, reflecting pool~250
PlantsPotted plants at entrances, climbing wall vines~150
FurnitureBenches, dining tables, stools, yoga deck~30
StringLights22 string light runs with emissive bulbs + point lights~180
PathsCovered walkways, stone radial paths, running circuit~40
InteriorsGreenhouse tables/shelves/plants, movement studio furniture~30
Site250m ground plane with procedural grass texture1

Material System

All materials are procedural PBR (physically based rendering) — no image textures. This keeps the script self-contained and the .blend file small.

Material types used:

Key material palette:

Material Roughness Metallic Use
Steel Frame0.300.90Trusses, posts, legs
Corrugated Metal0.450.70Building walls, roofing
Brick0.880.00Welcome Center, Dining Hall
Cedar Wood0.700.00Walkway posts, roof, saunas
Glass (tinted)0.050.00Greenhouse walls (alpha 0.30)
Glass (warm)0.030.00Windows with interior glow
Pool Water0.010.00Pool surface (alpha 0.60)
Sauna Wood0.550.00Square sauna walls

AI Enhancement Process

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.

Example prompt (CAM_spa_detail):

"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."

Render Configuration

# 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 History

Version Engine Key Changes Status
v4EEVEEInitial blockout, flat colors, no skySuperseded
v6CyclesClean geometry, first proper materialsSuperseded
v7CyclesAdded amenities, pool, pathsSuperseded
v8CyclesOrganic trees, golden hour lightingSuperseded
v9CyclesIndustrial-garden aesthetic, trusses, string lights, barrel saunasPrevious
v10Cycles 4K8192 spp, interiors, doubled vegetation, maximum qualityPrevious
v11Cycles + Gemini AISquare saunas with windows, clean daylight, AI photorealistic enhancementCurrent
v11 extCycles + Gemini AIGolden hour (5 cameras), blue hour (2 cameras), 4 new angles, geometry passes (depth/normal/AO/mist)Current

File Map

# 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