Skip to content
wexloopsPublic

About

Steer and render the world of cdak (unc, 2010): browser viewer, headless 4K ProRes renderer, screensaver. By HYPRGRPH.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

CARVE: a raymarched corridor of fractal architecture

CARVE

cdak, made interactive. CARVE turns the world of cdak, the 2010 4k intro by unc of Quite and Orange, into something you can steer and render. You can fly through its fractal architecture, set up a camera rig, and render seamless 4K loops straight to ProRes.

Open CARVE in your browser: no install. It needs a browser with WebGPU (recent desktop Chrome or Edge).

Made by HYPRGRPH.

The CARVE viewer: the cdak corridor on the left, world, rig, look and post controls on the right

What it does

  • Three worlds: the cdak corridor, kaleidoscopic lattices, and a carved moon.
  • Camera rigs: flythrough, orbit and ring, each with focal length, fisheye, roll, look-ahead and aim.
  • Seamless loops: every frame is a pure function of the preset and the loop position, so the last frame flows straight back into the first.
  • Audio reactive: bass, mids, highs, onsets and kick can drive any slider, live from a mic, a browser tab or a file. Offline renders accept a WAV and give the same output for the same input.
  • Headless renderer: 4K ProRes 422 HQ, H.264 or PNG sequences from the command line, with supersampling.
  • One preset file drives the viewer, the renderer and the screensaver.

CARVE still CARVE still

Run it locally

You need Node.js 22 or newer and Chrome or Edge with WebGPU.

git clone https://github.com/wexloops/carve.git
cd carve
npm install
npm run dev          # viewer at http://127.0.0.1:3070

Running locally lets you do more than the browser demo: you can save presets back to disk and start render jobs from the viewer.

Render

The renderer runs on your GPU from Node, through vgpu. It has been tested on Windows with an NVIDIA GPU. H.264 and ProRes output need ffmpeg on your PATH, or set CARVE_FFMPEG. PNG output doesn't need ffmpeg.

node render/render.mjs presets/cdak_clear_01.json                       # preset's own output settings
node render/render.mjs presets/lattice_fly_01.json w=1920 h=1080 codec=h264
node render/render.mjs presets/cdak_clear_01.json world.carve=1.2       # override any parameter
node render/render.mjs presets/lattice_fly_01.json wav=song.wav bind=kick:post.bloom:0.35:0.03

On Windows, render4k.bat <preset> does the same.

To check that a loop closes: node tools/seam.mjs presets/<name>.json. Every parameter is documented in docs/REFERENCE.md.

Presets

A preset is one JSON file:

{ "name": "cdak_clear_01", "version": 1,
  "world": { "id": "cdak", "params": { "period": 18 } },
  "rig":   { "id": "flythrough", "params": { } },
  "look":  { "id": "cdak-mono", "params": { } },
  "post":  { "bloom": 0.45, "grain": 0.12 }, "loop": { "seconds": 15, "fps": 30 },
  "output": { "w": 3840, "h": 2160, "supersample": 2, "codec": "prores_hq" } }

You can tune a look in the viewer, use Download JSON (or Save, when running locally), then render it.

Other commands

Command What it does
npm run build:web Static viewer in dist-web/ that works from any static host. This is the build behind the browser link.
npm run test:unit Pure JavaScript tests
npm run test:gpu GPU tests (needs a WebGPU adapter in Node)
saver/ A Windows screensaver built on the same core (Electron). See saver/package.json.

Credit

CARVE is built on cdak by unc (Quite and Orange, 2010). cdak took first place in the 4k intro competition at Chaos Constructions 2010 and was named Scene.org's best 4k intro of the year. Its authors released the shader source: cdak shader source (2010). The cdak world in core/worlds/cdak.mjs is a port of that code. The world is theirs, and CARVE makes it playable and renderable. More of unc's work is on Demozoo. See NOTICE.md.

License

CARVE's own code is MIT licensed (see LICENSE). The cdak-derived world is covered in NOTICE.md.


From HYPRGRPH: instruments, engines and worlds.

About

Steer and render the world of cdak (unc, 2010): browser viewer, headless 4K ProRes renderer, screensaver. By HYPRGRPH.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages