Photoreal Blender scenes from a one-paragraph brief, built by AI agents: image→3D props on fal, scripted layout, lighting, camera and grade.
Python
Studio: pick a sample reference plate instead of uploading one
Apekshik Panigrahia1499191ae5d
diff --git a/.gitignore b/.gitignoreindex cd74581..f7ac197 100644--- a/.gitignore+++ b/.gitignore@@ -66,3 +66,6 @@ refs/**/*.json# Unreal build logs*.outunreal_fx/work/+# sample reference plates for the Studio picker+!web/public/samples/+!web/public/samples/*.jpgdiff --git a/generate/samples.sh b/generate/samples.shnew file mode 100644index 0000000..28eb341--- /dev/null+++ b/generate/samples.sh@@ -0,0 +1,22 @@+#!/usr/bin/env bash+# Sample reference plates for the Studio's "try one" picker (web/public/samples). GPT Image 2.5 Sunburst, 16:9.+cd "$(dirname "$0")/.."+F="node generate/fal.mjs image --variant sunburst --quality high --size landscape_16_9"+STYLE="Candid photo, realistic, natural light falloff and sensor noise, no people, no text overlays."+declare -A P=(+ [apothecary]="Inside a narrow Victorian apothecary at dusk: floor-to-ceiling dark wood drawers with brass labels, glass jars of herbs and tinctures, a marble counter with brass scales and a mortar, gas lamps glowing amber, blue evening light through a bay window."+ [subway]="An abandoned 1980s subway platform at night: cracked white tile walls with graffiti, a single flickering fluorescent tube, puddles on the platform edge, rusted benches, an old route map, the dark tunnel mouth at the end."+ [cabin]="A small Scandinavian cabin kitchen on a winter morning: pale pine walls, a cast-iron wood stove with a kettle, open shelves of ceramics, a scrubbed table with bread and coffee, frost on the window and soft low sun across the floor."+ [arcade]="A 1985 video arcade at night: rows of upright cabinets with invented, unbranded game art (no real game titles or logos) glowing in the dark, patterned carpet, a change machine, neon strips on the ceiling, screens reflecting on glossy cabinet sides, haze in the air."+ [greenhouse]="An old Victorian glass greenhouse at golden hour: white-painted iron frames, overgrown ferns and palms, terracotta pots on slatted benches, a watering can, condensation on the glass, warm low sun streaming through."+ [noir]="A 1940s detective office at night: a heavy wooden desk with a green banker's lamp, typewriter, ashtray and files, a coat rack with a fedora, frosted glass door, venetian blinds casting stripes from a neon sign outside."+ [jazz]="A small basement jazz bar after hours: a grand piano under a single spotlight, round tables with candles in red glass, a brick back wall, a long bar with bottles lit from below, cigarette haze."+ [cargo]="Inside a worn sci-fi spaceship cargo bay: stacked hard-shell crates with stencils, a loading mech parked by the wall, grated metal floor, warning stripes, cold overhead strip lights and an amber beacon, steam venting from pipes."+ [diner]="A roadside desert diner at night: chrome counter with red vinyl stools, a pie case, a jukebox, checkered floor, neon OPEN sign glowing in the window, empty highway and dark desert outside."+ [forge]="A medieval blacksmith forge: a glowing coal hearth with bellows, an anvil with hammers and tongs, tools hanging on a timber wall, a quench barrel, sparks and smoke, daylight leaking through gaps in the plank door."+ [library]="An old university library reading room: tall arched windows, long oak tables with green glass lamps, endless shelves with rolling ladders, a spiral iron staircase, dust in shafts of afternoon light."+ [garage]="A cluttered home garage workshop at night: a half-restored vintage motorcycle on a stand, pegboard full of tools, oily concrete floor, a radio and coffee can of bolts on the workbench, a single bare bulb and the open door to a rainy driveway."+)+mkdir -p refs/samples+for k in "${!P[@]}"; do $F --force --out "refs/samples/$k" --prompt "${P[$k]} $STYLE" & done+waitdiff --git a/web/app/globals.css b/web/app/globals.cssindex 45110b0..7917fd2 100644--- a/web/app/globals.css+++ b/web/app/globals.css@@ -139,6 +139,15 @@ button:disabled { cursor: default; }.drop-empty { display: flex; flex-direction: column; gap: 6px; padding: 16px; text-align: center; }.drop-title { font-family: var(--font-head); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 15px; }.drop-hint { color: var(--dim-text); font-size: 12px; }+.samples { display: flex; flex-direction: column; gap: 8px; }+.samples-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }+.sample { display: flex; flex-direction: column; gap: 3px; padding: 0; background: none; border: 0; text-align: left; color: var(--ink); cursor: pointer; }+.sample img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--rule); transition: border-color 0.15s var(--ease); }+.sample span { font-size: 11px; line-height: 1.25; color: var(--dim-text); }+.sample:hover img, .sample:focus-visible img { border-color: var(--ink); }+.sample.on img { border: 2px solid var(--red); }+.sample.on span { color: var(--ink); }+.sample:disabled { cursor: default; opacity: 0.6; }.drop-change { position: absolute; right: 6px; bottom: 6px; font-size: 11.5px; background: var(--paper); border: 1px solid var(--ink); padding: 0 6px; opacity: 0; }.drop:hover .drop-change, .drop:focus-visible .drop-change { opacity: 1; }.cap { font-size: 12px; color: var(--dim-text); margin: -4px 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }diff --git a/web/components/BuilderInputs.tsx b/web/components/BuilderInputs.tsxindex 15cc82b..14591e3 100644--- a/web/components/BuilderInputs.tsx+++ b/web/components/BuilderInputs.tsx@@ -3,6 +3,7 @@import { useRef, useState } from "react";import Dials, { type DialValues } from "./Dials";import InfoTip, { HELP } from "./InfoTip";+import { SAMPLES, sampleFile, sampleThumb } from "@/lib/samples";export interface BuilderInputsState {file: File | null;@@ -27,6 +28,8 @@ interface Props {export default function BuilderInputs({ value, onChange, disabled, canBuild, building, onBuild, note }: Props) {const fileRef = useRef<HTMLInputElement>(null);const [over, setOver] = useState(false);+ const [loading, setLoading] = useState<string | null>(null);+ const [sampleError, setSampleError] = useState("");const set = (patch: Partial<BuilderInputsState>) => onChange({ ...value, ...patch });const take = (f: File | undefined) => {if (!f || !f.type.startsWith("image/")) return;@@ -71,6 +74,38 @@ export default function BuilderInputs({ value, onChange, disabled, canBuild, bui{value.previewUrl ? `plate 1 of 1: ${value.file ? value.file.name : "recorded reference"}` : "no plate loaded"}</p>+ <div className="samples">+ <span className="field-label">Or try one of ours</span>+ <div className="samples-grid">+ {SAMPLES.map((s) => (+ <button+ key={s.id}+ type="button"+ className={`sample ${value.file?.name === `${s.id}.jpg` ? "on" : ""}`}+ disabled={disabled || loading !== null}+ title={s.label}+ aria-label={`Use the sample reference: ${s.label}`}+ onClick={async () => {+ setLoading(s.id);+ setSampleError("");+ try {+ take(await sampleFile(s));+ } catch (err) {+ setSampleError(err instanceof Error ? err.message : String(err));+ } finally {+ setLoading(null);+ }+ }}+ >+ {/* eslint-disable-next-line @next/next/no-img-element */}+ <img src={sampleThumb(s.id)} alt="" loading="lazy" />+ <span>{loading === s.id ? "Loading" : s.label}</span>+ </button>+ ))}+ </div>+ {sampleError && <p className="error-note">{sampleError}</p>}+ </div>+<label className="field"><span className="field-label">Floor plan <span className="dim">optional</span>{" "}diff --git a/web/lib/samples.ts b/web/lib/samples.tsnew file mode 100644index 0000000..85f5583--- /dev/null+++ b/web/lib/samples.ts@@ -0,0 +1,31 @@+// Sample reference plates for trying the builder without your own image. Generated with GPT Image 2.5 Sunburst by+// generate/samples.sh; served from public/samples/<id>.jpg (1536 px) with <id>_thumb.jpg (384 px) for the picker.+export interface Sample {+ id: string;+ label: string;+}++export const SAMPLES: Sample[] = [+ { id: "apothecary", label: "Victorian apothecary" },+ { id: "noir", label: "1940s detective office" },+ { id: "diner", label: "Desert diner at night" },+ { id: "arcade", label: "1985 arcade" },+ { id: "jazz", label: "Basement jazz bar" },+ { id: "library", label: "University library" },+ { id: "cabin", label: "Cabin kitchen, winter" },+ { id: "greenhouse", label: "Victorian greenhouse" },+ { id: "garage", label: "Garage workshop" },+ { id: "forge", label: "Blacksmith forge" },+ { id: "subway", label: "Abandoned subway platform" },+ { id: "cargo", label: "Spaceship cargo bay" },+];++export const sampleUrl = (id: string) => `/samples/${id}.jpg`;+export const sampleThumb = (id: string) => `/samples/${id}_thumb.jpg`;++/** The sample as a File, so it goes through the same upload as a dropped image. */+export async function sampleFile(s: Sample): Promise<File> {+ const r = await fetch(sampleUrl(s.id));+ if (!r.ok) throw new Error(`Couldn't load the ${s.label} sample (HTTP ${r.status}).`);+ return new File([await r.blob()], `${s.id}.jpg`, { type: "image/jpeg" });+}diff --git a/web/public/samples/apothecary.jpg b/web/public/samples/apothecary.jpgnew file mode 100644index 0000000..71009d4Binary files /dev/null and b/web/public/samples/apothecary.jpg differdiff --git a/web/public/samples/apothecary_thumb.jpg b/web/public/samples/apothecary_thumb.jpgnew file mode 100644index 0000000..c51918fBinary files /dev/null and b/web/public/samples/apothecary_thumb.jpg differdiff --git a/web/public/samples/arcade.jpg b/web/public/samples/arcade.jpgnew file mode 100644index 0000000..ee0881bBinary files /dev/null and b/web/public/samples/arcade.jpg differdiff --git a/web/public/samples/arcade_thumb.jpg b/web/public/samples/arcade_thumb.jpgnew file mode 100644index 0000000..79efff3Binary files /dev/null and b/web/public/samples/arcade_thumb.jpg differdiff --git a/web/public/samples/cabin.jpg b/web/public/samples/cabin.jpgnew file mode 100644index 0000000..233a4a5Binary files /dev/null and b/web/public/samples/cabin.jpg differdiff --git a/web/public/samples/cabin_thumb.jpg b/web/public/samples/cabin_thumb.jpgnew file mode 100644index 0000000..c918425Binary files /dev/null and b/web/public/samples/cabin_thumb.jpg differdiff --git a/web/public/samples/cargo.jpg b/web/public/samples/cargo.jpgnew file mode 100644index 0000000..350deeaBinary files /dev/null and b/web/public/samples/cargo.jpg differdiff --git a/web/public/samples/cargo_thumb.jpg b/web/public/samples/cargo_thumb.jpgnew file mode 100644index 0000000..ab698aeBinary files /dev/null and b/web/public/samples/cargo_thumb.jpg differdiff --git a/web/public/samples/diner.jpg b/web/public/samples/diner.jpgnew file mode 100644index 0000000..c9c793fBinary files /dev/null and b/web/public/samples/diner.jpg differdiff --git a/web/public/samples/diner_thumb.jpg b/web/public/samples/diner_thumb.jpgnew file mode 100644index 0000000..7e9922dBinary files /dev/null and b/web/public/samples/diner_thumb.jpg differdiff --git a/web/public/samples/forge.jpg b/web/public/samples/forge.jpgnew file mode 100644index 0000000..45f998bBinary files /dev/null and b/web/public/samples/forge.jpg differdiff --git a/web/public/samples/forge_thumb.jpg b/web/public/samples/forge_thumb.jpgnew file mode 100644index 0000000..b9587c7Binary files /dev/null and b/web/public/samples/forge_thumb.jpg differdiff --git a/web/public/samples/garage.jpg b/web/public/samples/garage.jpgnew file mode 100644index 0000000..e081350Binary files /dev/null and b/web/public/samples/garage.jpg differdiff --git a/web/public/samples/garage_thumb.jpg b/web/public/samples/garage_thumb.jpgnew file mode 100644index 0000000..8182c75Binary files /dev/null and b/web/public/samples/garage_thumb.jpg differdiff --git a/web/public/samples/greenhouse.jpg b/web/public/samples/greenhouse.jpgnew file mode 100644index 0000000..6ced06eBinary files /dev/null and b/web/public/samples/greenhouse.jpg differdiff --git a/web/public/samples/greenhouse_thumb.jpg b/web/public/samples/greenhouse_thumb.jpgnew file mode 100644index 0000000..982bb12Binary files /dev/null and b/web/public/samples/greenhouse_thumb.jpg differdiff --git a/web/public/samples/jazz.jpg b/web/public/samples/jazz.jpgnew file mode 100644index 0000000..4827fb0Binary files /dev/null and b/web/public/samples/jazz.jpg differdiff --git a/web/public/samples/jazz_thumb.jpg b/web/public/samples/jazz_thumb.jpgnew file mode 100644index 0000000..fa8779fBinary files /dev/null and b/web/public/samples/jazz_thumb.jpg differdiff --git a/web/public/samples/library.jpg b/web/public/samples/library.jpgnew file mode 100644index 0000000..7e8073dBinary files /dev/null and b/web/public/samples/library.jpg differdiff --git a/web/public/samples/library_thumb.jpg b/web/public/samples/library_thumb.jpgnew file mode 100644index 0000000..b1c06faBinary files /dev/null and b/web/public/samples/library_thumb.jpg differdiff --git a/web/public/samples/noir.jpg b/web/public/samples/noir.jpgnew file mode 100644index 0000000..3990441Binary files /dev/null and b/web/public/samples/noir.jpg differdiff --git a/web/public/samples/noir_thumb.jpg b/web/public/samples/noir_thumb.jpgnew file mode 100644index 0000000..06ca7a8Binary files /dev/null and b/web/public/samples/noir_thumb.jpg differdiff --git a/web/public/samples/subway.jpg b/web/public/samples/subway.jpgnew file mode 100644index 0000000..1b82713Binary files /dev/null and b/web/public/samples/subway.jpg differdiff --git a/web/public/samples/subway_thumb.jpg b/web/public/samples/subway_thumb.jpgnew file mode 100644index 0000000..dc31df1Binary files /dev/null and b/web/public/samples/subway_thumb.jpg differ