Showcase · Fiktive Marke Altamo
Altamo
Klicken Sie unten auf „Morning“ oder „Night“: Der Van sinkt eine Viertel Bildschirmhöhe in den Talnebel, im tiefsten Moment wechselt die Tageszeit, dann taucht er wieder auf. Himmel, Nebelfarbe, Navigation, Überschrift und Knopf ziehen mit. Der Nebel ist kein Video, sondern ein Shader — er bewegt sich endlos und wiederholt sich nie.
- Hero-Section
- WebGL-Nebel
- Tag/Nacht
Anleitung
So ist es entstanden.
01/ 03
HiggsfieldSoul 2 · Qwen EditEin Foto, vier Varianten
Erst das Morgenfoto, daraus Nacht und zwei leere Himmelsplatten — Horizont und Grat liegen überall an derselben Stelle.
02/ 03
macOS Vision
ffmpegSwift
Freistellen
Beide Vans freistellen; das retuschierte Kühlerfeld zurück ins volle Original setzen.
03/ 03
Claude CodeHTML · WebGL2 · JS
Seite bauen
Bilder und Schrift in „assets“, den optimierten Prompt an Claude Code, fertig.
Alle Prompts im Wortlaut
Cinematic wide landscape photograph, 16:9, golden sunrise in the high alps: a compact matte sand-beige overland camper van with a closed grey rooftop tent stands on a grassy alpine ridge, three-quarter front view, parked exactly in the center of the frame, the van is large and fills the lower middle of the image, its roof at about 45 percent of the frame height, its wheels at about 80 percent. Low alpine grass, small rocks and wild flowers in the foreground filling the bottom of the frame. Behind and below the ridge a soft sea of valley fog, distant blue mountain peaks, a huge clean pale peach and soft gold sky with lots of empty space in the upper half. Calm, premium, photorealistic, completely unbranded van, no logos, no text, no people
# 1 · Grille badge out (Qwen Image Edit, morning photo as reference) Keep the exact same photo, same van, same framing, crop, camera angle, scale, light and landscape. Only change the front of the van: the grille is completely plain with no emblem, no badge and no logo, and there is no license plate on the bumper, just a smooth sand-beige bumper. Photorealistic, no text, no logos # 2 · Night (from 1) Turn this exact photo into a clear night scene. Keep the exact same van, the same framing, crop, camera angle and scale, the same ridge, grass, rocks, fog and mountains in the same places. Deep navy blue night sky with fine stars, the sea of valley fog below glowing in cool blue moonlight, the mountains as dark slate blue silhouettes. The rooftop tent glows warm amber from the inside through its window, the van's side window glows warm amber, soft warm light spills onto the grass beside the van, headlights off. Cinematic, photorealistic, calm, no text, no logos # 3 · Empty morning plate (from 1) Remove the camper van completely. Keep the exact same photo, the same framing, crop, camera angle, light and colours. Where the van stood, continue the grassy ridge, the soft sea of valley fog, the distant mountains and the pale peach and gold sky naturally, as if the van was never there. Photorealistic, no vehicle, no text, no logos # 4 · Empty night plate (from 2) Remove the camper van completely, including its warm light on the grass. Keep the exact same photo, the same framing, crop, camera angle, light and colours. Where the van stood, continue the dark grassy ridge, the blue moonlit sea of valley fog, the distant mountain silhouettes and the deep navy starry sky naturally, as if the van was never there. Photorealistic, no vehicle, no text, no logos
// cutout.swift — frees a person from the background with macOS Vision (macOS 14+)
// swiftc -O -o cutout cutout.swift && ./cutout look-1.png cut-1.png
import Foundation
import Vision
import CoreImage
import CoreImage.CIFilterBuiltins
import ImageIO
import UniformTypeIdentifiers
let args = CommandLine.arguments
let input = CIImage(contentsOf: URL(fileURLWithPath: args[1]))!
let handler = VNImageRequestHandler(ciImage: input)
let request = VNGenerateForegroundInstanceMaskRequest()
try handler.perform([request])
let result = request.results!.first!
let mask = CIImage(cvPixelBuffer: try result.generateScaledMaskForImage(forInstances: result.allInstances, from: handler))
let blend = CIFilter.blendWithMask()
blend.inputImage = input
blend.backgroundImage = CIImage.empty()
blend.maskImage = mask
let cg = CIContext().createCGImage(blend.outputImage!.cropped(to: input.extent), from: input.extent,
format: .RGBA8, colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!)!
let dest = CGImageDestinationCreateWithURL(URL(fileURLWithPath: args[2]) as CFURL, UTType.png.identifier as CFString, 1, nil)!
CGImageDestinationAddImage(dest, cg, nil)
CGImageDestinationFinalize(dest)# Qwen returns 1280 × 720: patch only the clean grille back into the 2048 original ffmpeg -i morning-raw.png -i edit-2048.png -filter_complex \ "[1]crop=150:150:1375:715,format=rgba,geq=r='r(X,Y)':g='g(X,Y)':b='b(X,Y)':a='255*min(1,min(min(X,149-X),min(Y,149-Y))/22)'[p];[0][p]overlay=1375:715" morning.png # Cut out both vans (cutout.swift), then encode cwebp -q 80 -resize 1600 900 plate-morning.png -o sky-morning.webp cwebp -q 80 -resize 1600 900 plate-night.png -o sky-night.webp for t in morning night; do cwebp -q 82 $t.png -o $t-2048.webp cwebp -q 80 -resize 1280 720 $t.png -o $t-1280.webp cwebp -q 84 -alpha_q 100 $t-cut.png -o $t-cut-2048.webp cwebp -q 82 -alpha_q 100 -resize 1280 720 $t-cut.png -o $t-cut-1280.webp done
Build one page with plain HTML, CSS and one vanilla script with raw WebGL2, no libraries: a full-viewport hero with header called "Altamo" for a fictional camper van brand. A sand-coloured camper with a pop-up roof stands on an alpine ridge above a sea of fog, under a big centred headline. A glass Morning / Night toggle sits at the bottom. Clicking it sinks the van and ridge about a quarter of the screen into rising fog, swaps the time of day while they are hidden, and floats them back up in the new light; sky, fog colour, nav, headline and button change with it. Inline <style> is fine; the script lives in altamo.js (the page runs under a CSP without 'unsafe-inline' for scripts). Everything self-hosted. RULES 1. Three layers, one moving. A blurred sky plate stays still. Van and ridge sit in one layer that moves on Y only. Fog is a live shader canvas above both; all text sits above the fog. 2. Two images make the moving layer: the full photo, masked so only the part below the horizon shows, and the transparent van cut-out on top at full size — its outline stays crisp against the blurred sky. 3. The swap happens at the deepest point, when the fog fully covers the roof. 4. One clock: no CSS transitions on the scene. One requestAnimationFrame function computes sink, fog surge and colours from the time since the click and writes CSS variables and shader uniforms. 5. Colours are mixed, not swapped: every text colour is a color-mix() on --k (0 morning, 1 night). 6. No video: the fog is a generated shader that moves forever and never loops. ASSETS (./assets/, all 16:9, object-fit cover, object-position 50% 62%; 52% 62% at ≤ 820px) sky-morning.webp / sky-night.webp (empty plates, 1600w), morning-1280/2048.webp, night-1280/2048.webp (full photos), morning-cut-* / night-cut-* (transparent cut-outs), instrument-sans-latin.woff2 (variable 400–600). srcset 1280w/2048w with sizes "(max-width: 820px) 178svh, 100vw"; preload the night cut-out and the font. PAGE html/body/hero background #071328; hero 100svh, min-height 520px, overflow hidden, isolation isolate. Unit --u = min(100vw/1600, 100vh/900), 1px at ≤ 820px. Starts on Night (--k 1, night set visible, Night pressed). LAYERS (bottom to top) 1. .sky: morning plate, night plate on top with opacity var(--k); both blur(7u), scale(1.05). 2. .home: translate3d(0, var(--sink), 0), will-change transform. Two sets (#setM, #setN), only .is-on visible (visibility). Each set: .ground (full photo, mask linear-gradient(transparent 63%, #000 72%) — the measured horizon), then the cut-out. 3. .tilt: backdrop-filter blur(9u), mask linear-gradient(transparent 72%, #000 94%). 4. #fog canvas, pointer-events none. Without WebGL2 a static CSS gradient of ground fog instead. 5. .ui: all text and buttons, z-index 2. COLOURS (measured: sky behind the headline #cbc3b8 by morning, #05122b by night) --ink #1d1914 → #fff, --nav and --soft #2a231b → #e9eef7 / #d9e1ee, logo mark #b9562a → #f4b96c, CTA #1d1914 with white text → white with #0e1526 text. "park where the" uses --k2 and a muted #7a6650 by morning, so the headline is two-tone by day and all white at night. HEADER (padding 22u top, 38u sides; logo and right side flex 1 1 0 so the links stay centred) Logo: a mountain mark with a sun dot (38u), "Altamo" 25u, weight 500, tracking -.025em. Links 16.5u, weight 500, gap 42u: Vans · Build Yours · Routes · Stories · Rentals. Right: "Owners", then the pill "Configure Your Van" (46u high, 26u padding, lifts 1px on hover). HEADLINE (58u below the bar, 64u, line-height 1.09, weight 500, tracking -.022em) "Sleep Above the Clouds" / "park where the Road Ends". DOCK (40u bottom padding) Toggle 524 × 86u, radius 16u, 2u padding, rgba(128,122,112,.34), 1px rgba(255,255,255,.2) border, backdrop blur 14u, role group "Time of day". Two <button type="button" aria-pressed>: "Morning" / "Sunrise at 2,140 m" and "Night" / "Heated to 20 °C" (23u / 15u at 72%). The active one shows a :before gradient 160deg #fdf3e4 → #f6cf9c with inset white glow; its opacity is --on (1 − k for Morning, k for Night), so the buttons crossfade. Label colour mixes #2a1c10 and #fff on --on. Caption 22u below, 16.4u, colour --soft: "A pop-up roof bed, 3 kWh of silent power and a heater that holds 20 °C at two thousand metres. / Park on the ridge at dusk and wake up above a sea of fog." THE SWITCH (SINK 240, RISE 820, DEPTH .27; d = ms since the click) Sink: d < SINK → y = x²(3 − 2x)·DEPTH. The first frame with d ≥ SINK swaps the set. Rise: y = (1 − x)^3.4·DEPTH. --sink = y × hero height. Fog surge s = smooth(0, SINK·.92, d)·(1 − smooth(SINK+70, SINK+RISE·.92, d)). UI dip = smooth(30,190,d)·(1 − smooth(330,720,d)): links, "Owners", line 1 and "Road Ends" fade by 80–82 %, the CTA by 62 %; "park where the" stays. k eases to the target on smooth(120,520,d), k2 on smooth(340,760,d). A click during the switch is queued (cancelled if it matches the current target). Reduced motion: instant swap. FOG SHADER (one fullscreen triangle, canvas ≤ 960px wide, premultipliedAlpha; uniforms R, P, T, S, K) Five-octave value-noise fbm, pre-rotated by mat2(.8,.6,-.6,.8) + 5.3, octave matrix mat2(1.6,1.2,-1.2,1.6). t = T·.05; domain warp w, density d, slower e. Resting fog: low (smoothstep(.70,1.04,y+(d−.5)·.34)) + side edges at 20 % + mid-air wisps at 18 %. Surge: front 1.02 − S·.68, rise = smoothstep(front−.02, front+.26, y+(d−.5)·.5), haze = S·(.3+.46d). Alpha = max(rest, rise·.97, haze). Colour by density: morning (.84,.77,.67) → (.99,.94,.86), night (.12,.17,.30) → (.42,.50,.66), blended by K. At night an amber (.96,.63,.31) glow at P tints the fog by 42 % and fades during a surge. P is the warm spill on the grass (image point .45, .765) converted to viewport uv through the cover/object-position maths, plus the current sink. PERFORMANCE & ACCESSIBILITY requestAnimationFrame only while the hero is in view and the tab is visible; write CSS variables only when they change. Reduced motion: the fog stands still (one frame per change). Compile errors are checked, a failed shader falls back to the CSS fog. 2px white focus ring on the toggle, currentColor on links. PHONES (≤ 820px) Links and "Owners" hidden, bar padding 16px, logo 21px, CTA 40px high. Headline clamp(32px, 9.6vw, 56px) with text-wrap: balance on both lines. Toggle full width up to 440px, 74px high, labels 19px / 13px. Caption 14px, its line break removed. No horizontal scroll.
Was die Demo zeigt
- Drei Ebenen, nur eine bewegt sich: unscharfer Himmel steht, Van und Grat sinken, darüber ein Nebel-Shader in WebGL2
- Der Van ist freigestellt und liegt über dem vollen Foto, das nur unterhalb des Horizonts sichtbar ist — seine Kontur bleibt vor dem weichen Himmel scharf
- Der Tausch passiert am tiefsten Punkt, wenn der Nebel das Dach ganz bedeckt — der Wechsel selbst ist nie zu sehen
- Eine Uhr steuert alles: Absinken, Nebelwelle, Abblenden und Farbmischung werden pro Frame aus der Zeit seit dem Klick berechnet, keine CSS-Transitions
- Farben werden gemischt, nicht getauscht: jeder Ton ist ein color-mix() auf einer einzigen Variablen zwischen Morgen und Nacht
- Nachts färbt das warme Licht aus dem Van den Nebel im Gras — der Lichtfleck folgt dem Bildausschnitt auch auf dem Handy
- Rendert nur, solange der Hero sichtbar ist; bei „Bewegung reduzieren“ steht der Nebel still und der Wechsel erfolgt sofort
Woher Bilder und Bewegung kommen
- Marke, Fahrzeug und Angaben sind erfunden.
- Das Morgenfoto ist KI-generiert (Higgsfield, Soul 2); Nachtvariante, leere Himmelsplatten und die Retusche des Kühleremblems mit Qwen Image Edit; freigestellt mit macOS Vision.


