generated-models
generated-models
GENERATED MODELS — TRELLIS.2 props (fal.ai `fal-ai/trellis-2`, image → 3D) loaded as `asset(asset="model:…")` and dressed into a set at real size.
Read the rig's notes
MAKE ONE: npm run models:trellis -- --project <promo dir> --name <asset> --prompt "…" (or --image)
It writes <promo dir>/models/<asset>.glb (+ <asset>.ref.png, the FLUX reference
the mesh was lifted from); `model:<asset>` looks there before assets/models.
This reel's live in ./models — it uses seven:
trellis-coffee-mug · trellis-succulent-pot · trellis-desk-lamp · trellis-earbuds-case
(the lineup), plus trellis-book-stack · trellis-notebook-pen · trellis-floor-plant
(desk dressing: book stack scale=240, notebook 200, floor plant 1150).
Prompt for the framing TRELLIS lifts best — one object, three-quarter view. A
top-down reference (the notebook) comes back standing upright; lay it flat
with rotation x=−90.
THE ONE KNOB — scale. TRELLIS normalises every mesh into a 1-unit box centred
on the origin (longest side = 1, one PBR material, one mesh `geometry_0`).
1 authored unit = 1 mm, so `scale` IS the object's longest side in mm, and
the prop's centre sits scale × |min y| above whatever it stands on:
asset scale longest side min y y on a surface at 0
trellis-coffee-mug 130 x (with handle) -0.353 45.9
trellis-succulent-pot 150 y -0.501 75.2
trellis-desk-lamp 450 y -0.501 225.5
trellis-earbuds-case 60 x -0.452 27.1
Lighting: the GLBs are metal/rough PBR — they need an `environment(hdr=…)`
or they read as flat cutouts. No material_overrides needed (and the single
`geometry_0` mesh means a re-skin is all-or-nothing).
SCREENS — Tailwind HTML (generated-models.screens.html) → scripts/html-screens.mts
(…sections.json → …screens.json) → pasted below; the only hand edits are the
animation tracks, the buds bar (swapped for a `progress-bar` so it can fill),
and icon sizes nudged by 0.01 where two glyphs share a size + colour (ui
surfaces are shared by a spec key — unnudged, every row drew the same icon).
s01-lineup the four props on a plinth, each with a spec placard (ui3d) flush
on the plinth face — the scale table above, made physical
s02-desk a desk set built from primitives, props dressed at real size (one
model reused at a second scale on the shelf), a laptop running
Kiln — the queue flips the last prop from Generating to Ready
Preview: http://localhost:4444/runtime?project=promos/primitives/scenes/generated-models/generated-models.promo- Topic
- scenes
- Scenes
- 2
- Kind
- reference rig
//
GENERATED MODELS — TRELLIS.2 props (fal.ai `fal-ai/trellis-2`, image → 3D)
loaded as `asset(asset="model:…")` and dressed into a set at real size.
MAKE ONE: npm run models:trellis -- --project <promo dir> --name <asset> --prompt "…" (or --image)
It writes <promo dir>/models/<asset>.glb (+ <asset>.ref.png, the FLUX reference
the mesh was lifted from); `model:<asset>` looks there before assets/models.
This reel's live in ./models — it uses seven:
trellis-coffee-mug · trellis-succulent-pot · trellis-desk-lamp · trellis-earbuds-case
(the lineup), plus trellis-book-stack · trellis-notebook-pen · trellis-floor-plant
(desk dressing: book stack scale=240, notebook 200, floor plant 1150).
Prompt for the framing TRELLIS lifts best — one object, three-quarter view. A
top-down reference (the notebook) comes back standing upright; lay it flat
with rotation x=−90.
THE ONE KNOB — scale. TRELLIS normalises every mesh into a 1-unit box centred
on the origin (longest side = 1, one PBR material, one mesh `geometry_0`).
1 authored unit = 1 mm, so `scale` IS the object's longest side in mm, and
the prop's centre sits scale × |min y| above whatever it stands on:
asset scale longest side min y y on a surface at 0
trellis-coffee-mug 130 x (with handle) -0.353 45.9
trellis-succulent-pot 150 y -0.501 75.2
trellis-desk-lamp 450 y -0.501 225.5
trellis-earbuds-case 60 x -0.452 27.1
Lighting: the GLBs are metal/rough PBR — they need an `environment(hdr=…)`
or they read as flat cutouts. No material_overrides needed (and the single
`geometry_0` mesh means a re-skin is all-or-nothing).
SCREENS — Tailwind HTML (generated-models.screens.html) → scripts/html-screens.mts
(…sections.json → …screens.json) → pasted below; the only hand edits are the
animation tracks, the buds bar (swapped for a `progress-bar` so it can fill),
and icon sizes nudged by 0.01 where two glyphs share a size + colour (ui
surfaces are shared by a spec key — unnudged, every row drew the same icon).
s01-lineup the four props on a plinth, each with a spec placard (ui3d) flush
on the plinth face — the scale table above, made physical
s02-desk a desk set built from primitives, props dressed at real size (one
model reused at a second scale on the shelf), a laptop running
Kiln — the queue flips the last prop from Generating to Ready
Preview: http://localhost:4444/runtime?project=promos/primitives/scenes/generated-models/generated-models.promo
promo#generated-models(width=1920 height=1080 fps=30)
// =========================================================================
// S01 · LINEUP — four props, four scales, one plinth. The props yaw slowly
// so the reconstructed backs (TRELLIS invents them from one view) show.
// =========================================================================
scene#s01-lineup(duration=8 transition=none)
// NO tone curve (tone_mapping=None + film_grain output_transform=2 = sRGB
// encode only): ACES flattens and pastels the props. AA is SSAA, never FXAA.
renderer(tone_mapping=None exposure=1 shadow_map=true shadow_map_type=pcf-soft)
camera(type=perspective fov=30 near=10 far=20000 position="-160 330 1650" look_at="30 150 0")
properties
frame(smooth=0.3)
keyframes
kf(time=0 position="-160 330 1650" look_at="30 150 0" fov=30)
kf(time=8 position="120 240 1260" look_at="40 150 0" fov=30 easing=easeInOutSine)
postprocessing
step(name=render)
step(name=film_grain grain=0.02 scanlines=0 vignette=0.22 vignette_start=0.5 output_transform=2 exposure=1.0)
step(name=aa method=ssaa samples=2)
background(top=#e9e5de bottom=#cfc8bd)
environment(hdr="photo_studio_