Showcase
Archive
Shinya Ramen (深夜ラーメン) · 2.5D Diorama
Real-Time WebGL / WebGPU Sandbox

Desktop mouse, keyboard & touch ready

Gemini 4 Neon3D Worlds & Ecosystems2026-11-19

Shinya Ramen (深夜ラーメン) · 2.5D Diorama

60 fps Interactive 2.5D Living Anime Diorama from One 705 KB JPEG · Local AI Depth & GPU Puddles

01 / The Story & Idea

Think of this like turning one flat 705 KB anime illustration into a living 3D pop-up book — with zero AI video generation, zero looping MP4s, and zero external audio files. Instead of generating a blurry AI video that warps faces over time, local AI estimates depth, Python slices the scene into layered cards and paints the hidden walls behind them, and live browser shaders drive rain, rippling puddles, glowing neon, blinking eyes, and interactive physics at a locked 60 fps.

02 / How It Was Built

  1. 01

    Start From One Static JPEG

    Everything begins with a single 1376×768 anime frame (705 KB). No 3D meshes, no video clips, and no cloud video APIs are used anywhere.

  2. 02

    Local AI Depth & Hidden-Wall Painting

    Depth-Anything-V2-Large runs locally on Apple Silicon to separate near from far, while Python cuts out the woman, curtains, and lanterns and paints the hidden wall & brick behind them.

  3. 03

    Smart Pixel Stencils Lock Every Effect

    Seven automated region masks tell the GPU exactly where rain belongs, where puddles ripple, which neon signs glow, and where the indoor ramen counter stays completely dry.

  4. 04

    Live 60 fps Shaders, Tactile Physics & Audio

    Eleven custom WebGL2 shaders animate her breathing, blinking, hair sway, steam, and GPU water waves — plus you can brush the curtains, spark neon signs, splash puddles, and drag a live Before/After compare curtain.

Visual Pipeline Proof · Click Any Frame to Inspect6 Stages
Three.js r187WebGL2GLSLDepth-Anything-V2-Large (Local MPS)OpenCV / SciPyWeb Audio API

03 / Under the Hood

Deep Engineering Specs, Shaders & Architecture (6 technical notes)

Engineered end-to-end with Gemini 4 Neon from a single 705 KB static anime JPEG at zero cloud video cost: (1) local Apple Silicon MPS Depth-Anything-V2-Large monocular depth + OpenCV guided edge filtering + GrabCut & zone-split inpainting to slice 5 perspective-locked parallax plates (inpainted wet neon alley, rear/front red lanterns, 6-panel 深夜ラーメン noren curtains, and seated woman + counter), 7 packed RGB semantic stencils, and an 8×-supersampled eyelid patch; (2) eleven Three.js r187 WebGL2 GLSL passes including a 128 × 72 Live2D character vertex rig (chin-palm pivot head nod, breathing, hair breeze, eye gaze & 3-stage blink with 5-tap CAS sharpening), a 256 × 256 HalfFloat ping-pong GPU shallow-water puddle PDE with reflective Neumann boundaries, tactile cursor springs on noren cloth & coupled pendulum lanterns, click-to-spark flickering neon signs, curl-noise bowl/pot steam, depth-occluded slanted rain + awning drips, passing taxi headlights, sheet lightning brownouts, and a live draggable Before/After Split-Compare Curtain; and (3) zero-asset spatial Web Audio synthesis (rain, pitched drips, broth pot simmer, 120 Hz neon buzz & sparks, thunder, wet-tire whoosh, distant train rumble, and toggleable Kitchen Lo-Fi Radio).

  1. 01Single-Image AI & Vision Pipeline: Starts from a single static anime illustration ($0 cloud cost); runs Depth-Anything-V2-Large locally on Apple Silicon MPS with OpenCV guided edge filtering, slices 4 foreground transparent plates via GrabCut + 12 px edge-bleed dilation, inpaints hidden warm kitchen wall, vertical wood slats, counter lip, and alley brick behind every cutout, and extracts 7 packed A=255 RGB semantic masks plus exact anchor coordinates for lantern hooks, awning valley, AC fan ellipse, ramen bowl, broth pot, and eyes.
  2. 02Scene & Depth Scale: 3.5833 × 2.000 world artwork plane (1376×768, 1.7917:1 aspect, camera distance 5.0, 1.036 parallax overscan, ±0.26 horizontal / ±0.14 vertical shift) arranged across five perspective-locked depth plates (z = -0.36 inpainted wet neon alley backdrop, -0.05 rear red lantern, +0.15 6-panel 深夜ラーメン noren curtains, +0.20 front red lantern, +0.34 locked seated woman + counter + ramen bowl + stool) scaled by exact (d - z) / d so hero rest registers pixel-for-pixel with the original artwork.
  3. 03Live 60 Hz Simulation & Tactile Physics: Deterministic fixed-step (1/60 s, seed 19890417) simulation driving a 128×72 Live2D-style character vertex rig (chin-palm pivot head tilt/nod, full-silhouette shoulder/hood breathing, flowing back hair & bangs breeze sway, subtle cursor eye-gaze drift, and 3-stage natural eye blink); a real-time 256×256 RGBA HalfFloatType ping-pong GPU shallow-water puddle PDE with reflective Neumann wall/curb boundaries fed by exact awning drip landings, rain, and cursor click/drag splashes; tactile cursor spring deflection across all 6 independent noren cloth panels and both coupled pendulum red lanterns; click-to-spark neon signs with transient electrical blackout surges; cursor-swirlable curl-noise bowl & pot steam; animated stove gas burner flame; mask-occluded spinning AC exhaust fan; depth-occluded 3D slanted alley rain + sparse organic awning drips; passing taxi headlight glare sweeping the wet asphalt; and sky-feathered sheet lightning with electrical neon brownout.
  4. 04Optics, Rendering & Mood Presets: Color-true SRGBColorSpace + NoToneMapping anime pipeline preserving original linework and palette fidelity (rgbCorr = 0.9959, lumDelta = 3.24%), neighborhood-clamped 5-tap CAS sharpening on displaced character pixels (sharpRatio = 0.879), selective multi-mask neon & lantern emissive bloom synced to Z-relief (-farFactor * 0.042), single-pass optical post-processing with subtle stove thermal heat-haze and an interactive draggable Before/After Original JPEG vs. Live 3D Split-Compare Curtain, plus four one-click mood presets (Drizzle, Typhoon, 3AM, Steam).
  5. 05Procedural Spatial Web Audio: Zero external audio files — 100% live Web Audio API synthesis with stereo panning tied to camera parallax: multi-band rainfall/downpour, pitched awning water drips, resonant kitchen broth pot simmer, 120 Hz neon transformer hum & click-spark crackle, distant thunder claps synced to sheet lightning, wet-tire road whoosh synced to passing taxi headlights, distant JR train rumble, and a toggleable low-pass Kitchen Lo-Fi Radio.
  6. 06User Controls: Direct canvas pointer-drag parallax steering from default Cinematic Drift mode (Mouse Parallax toggleable), safe clamped wheel/pinch zoom (1.0×–1.18×), direct canvas touch/click interactions (swipe noren curtains, brush lanterns, click neon signs, click/drag wet asphalt puddles, swirl steam), smoked-glass desktop HUD & unclipped 375×812 mobile bottom sheet with 5 atmosphere sliders (Rain Intensity, Wind, Neon Flicker, Steam, Parallax Depth), Lightning trigger, Reset Defaults, 6-mode Layer & Mask Inspector (Final, No-Post, Depth, Masks, Emissive, Original + 7 per-layer toggles), and keyboard shortcuts (C Compare, H Hide HUD, Space Pause, M Audio, D Inspector).

04 / Element-by-Element Build Breakdown

Single-image pipeline — Local AI depth, Python OpenCV slicing & inpainting, WebGL2 GLSL shaders & procedural audio

Scene ElementPipeline / ToolingHow It Was Built
Source Artwork & Guided Depth Map
Local Depth-Anything-V2-Large (Apple Silicon MPS) + OpenCV Guided FilterMonocular relative depth predicted offline on Apple Silicon GPU from one 1376×768 (705 KB) JPEG and edge-sharpened against architectural lines via guided filtering
Inpainted Neon Alley Backdrop (layer0)
Python OpenCV Inpainting + Zone-Split Wall/Brick SamplingErased all foreground cutouts and reconstructed clean warm kitchen wall, vertical wood slats, counter lip, and alley brick behind them (mean_abs_diff = 0.485) to eliminate parallax disocclusion holes
Seated Woman + Counter (layer4) & 128×72 Live2D Rig
Python GrabCut + 8× Supersampled Eyelid Patch + Custom GLSL + CASCutout plate (z = +0.34) deformed across a 128×72 vertex rig for rigid chin-palm pivot head tilt/nod, full-silhouette shoulder/hood breathing, flowing hair/bangs breeze sway, cursor eye-gaze drift, 3-stage eyelid blinking, and 5-tap neighborhood-clamped CAS ink sharpening
6-Panel 深夜ラーメン Noren Curtains (layer2)
Python GrabCut + Per-Panel Cloth GLSL + Tactile Cursor SpringsSix individually masked cloth panels (z = +0.15) pinned strictly at top rod tabs with travelling wind ripples, organic billow, and non-tearing per-panel spring deflection when brushed by cursor
Dual Red ラーメン Lanterns (layer1, layer3)
Python GrabCut + Coupled Pendulum Kinematics + Warm Emissive GlowIndependent rear (z = -0.05) and front (z = +0.20) cutout lanterns swinging around measured ceiling hook pivots with coupled wind sway, cursor brush impulses, and warm glow modulation
7 Semantic RGB Stencils & Anchor Regions
Python OpenCV / NumPy (HSV, Canny, Black-Hat, Morphological Guards)Seven packed A=255 1376×768 RGB masks isolating dry stall vs. rain alley, deep mist, wet street, 9 emissive sign/lantern groups, neon/lantern spill, gas flame, cloth panels, powerlines, breathing/hair zones, and AC grille bars plus normalized pixel coordinates
GPU Shallow-Water Puddles & Wet Asphalt
WebGL2 256×256 RGBA HalfFloatType Ping-Pong PDE + Reflective GLSLReal-time 2D shallow-water heightfield wave solver with Neumann reflective curb/wall boundaries, driven by exact awning drip landings, rain impacts, and cursor click/drag splashes, perturbing colored wet-asphalt neon reflections strictly inside the street mask (0.000 outside leak)
Depth-Occluded Alley Rain & Awning Drips
Three.js Instanced GLSL + Deterministic Ballistic KinematicsMulti-depth 7°–15° slanted rain streaks strictly masked outside the warm ramen stall (0.000 dry indoor leak) paired with sparse organic corrugated-awning valley swell droplets and gravity-accelerated translucent fall streaks locked to puddle splashes
Selective Neon Sign Bloom, Flicker & Click Sparks
Multi-Mask Emissive GLSL + Z-Relief Sync + Tactile Click ImpulseIndependent stochastic ballast flicker across 深夜ラーメン, OPEN, 居酒屋, ラーメン, and vending machine signs synchronized to background Z-relief (-farFactor * 0.042), with click-to-spark blackout drops and voltage surges
Bowl/Pot Curl Steam, Gas Flame, Alley Mist & AC Fan
Procedural GLSL Shaders + Mask-Occluded Fan RotationRising curl-noise vapor wisps above the ramen bowl and simmering pot (deflected by cursor swirl and gusts), fluttering blue stove gas burner flame, deep volumetric alley mist, overhead powerline sway, and rotating fan blades occluded behind AC grille bars
Narrative Alley Events (Taxi Headlights & Sheet Lightning)
Deterministic Event Kinematics + Sky-Feathered GLSL + Neon BrownoutPeriodic warm passing taxi headlights sweeping wet alley glare across the street and sky-weighted feathered sheet lightning flashes that trigger temporary neon ballast brownouts and synced distant thunder
Optical Post-Pass (Thermal Heat-Haze & Split-Compare Curtain)
Single-Pass Fullscreen GLSL Post-ProcessingSubtle rising refractive thermal heat-haze over the stove burner paired with an interactive draggable vertical curtain comparing the raw static original JPEG side-by-side against the live 2.5D Three.js scene
Spatial Procedural Web Audio Engine
Zero-Asset Web Audio API SynthesisSynthesizes stereo rain/downpour, pitched awning drips, simmering pot acoustics, 120 Hz neon buzz + spark crackle, lightning-locked thunder, headlight-locked wet-tire whoosh, distant JR train rumble, and toggleable low-pass kitchen lo-fi vinyl/rhodes radio with parallax panning
Cinema Glass HUD, Mood Presets & Inspector
Responsive TypeScript UI + CSS Smoked GlassDesktop HUD + unclipped 375×812 mobile bottom sheet offering 4 mood presets (Drizzle, Typhoon, 3AM, Steam), 5 sliders, camera/audio/compare/lightning controls, and 6-mode Layer & Mask Inspector

More Built With Gemini 4 Neon

View Full Archive →

3D Drops & AI Briefing

Don’t miss the next build

Reserve early access to Ashutosh’s 5-minute AI briefing and new WebGPU 3D drops.

Zero spam · Privacy

! Please enter a valid email address (for example, you@domain.com).

Morning Edition Alerts

Get a 1-click alert at 11:00 IST

One quiet browser alert when Ashutosh’s daily AI briefing or Sunday synthesis goes live. No email required. Privacy