agentvfx 0.0.0-stage → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +8 -0
- package/GEMINI.md +1 -0
- package/LICENSE +172 -0
- package/README.md +236 -2
- package/package.json +35 -4
- package/skills/agentvfx/LICENSE +172 -0
- package/skills/agentvfx/NOTICE +44 -0
- package/skills/agentvfx/SKILL.md +90 -0
- package/skills/agentvfx/engine/core/constants.mjs +84 -0
- package/skills/agentvfx/engine/core/flash-constants.mjs +23 -0
- package/skills/agentvfx/engine/core/flash.mjs +240 -0
- package/skills/agentvfx/engine/core/mark.mjs +28 -0
- package/skills/agentvfx/engine/core/palettes.mjs +36 -0
- package/skills/agentvfx/engine/core/schedule.mjs +85 -0
- package/skills/agentvfx/engine/core/templates.mjs +43 -0
- package/skills/agentvfx/engine/core/util.mjs +167 -0
- package/skills/agentvfx/engine/core/validate.mjs +334 -0
- package/skills/agentvfx/engine/node/analysis.mjs +172 -0
- package/skills/agentvfx/engine/node/audio.mjs +621 -0
- package/skills/agentvfx/engine/node/board.mjs +24 -0
- package/skills/agentvfx/engine/node/chrome.mjs +349 -0
- package/skills/agentvfx/engine/node/encode.mjs +110 -0
- package/skills/agentvfx/engine/node/eye.mjs +77 -0
- package/skills/agentvfx/engine/node/footage.mjs +129 -0
- package/skills/agentvfx/engine/node/frame-worker.mjs +39 -0
- package/skills/agentvfx/engine/node/host.mjs +31 -0
- package/skills/agentvfx/engine/node/job.mjs +181 -0
- package/skills/agentvfx/engine/node/png.mjs +112 -0
- package/skills/agentvfx/engine/node/render.mjs +161 -0
- package/skills/agentvfx/engine/node/stage-capture.mjs +187 -0
- package/skills/agentvfx/engine/node/stage-serve.mjs +72 -0
- package/skills/agentvfx/engine/node/stills.mjs +100 -0
- package/skills/agentvfx/engine/node/ws-server.mjs +132 -0
- package/skills/agentvfx/engine/web/gl.mjs +319 -0
- package/skills/agentvfx/engine/web/glsl-common.mjs +78 -0
- package/skills/agentvfx/engine/web/init.js +23 -0
- package/skills/agentvfx/engine/web/prelude.mjs +150 -0
- package/skills/agentvfx/engine/web/render.html +11 -0
- package/skills/agentvfx/engine/web/render.mjs +388 -0
- package/skills/agentvfx/engine/web/scale.mjs +15 -0
- package/skills/agentvfx/engine/web/text.mjs +158 -0
- package/skills/agentvfx/plates/terminalcore/README.md +61 -0
- package/skills/agentvfx/plates/terminalcore/__pycache__/crt.cpython-313.pyc +0 -0
- package/skills/agentvfx/plates/terminalcore/__pycache__/font.cpython-313.pyc +0 -0
- package/skills/agentvfx/plates/terminalcore/__pycache__/gallery.cpython-313.pyc +0 -0
- package/skills/agentvfx/plates/terminalcore/__pycache__/gallery_mats.cpython-313.pyc +0 -0
- package/skills/agentvfx/plates/terminalcore/__pycache__/gallery_room.cpython-313.pyc +0 -0
- package/skills/agentvfx/plates/terminalcore/__pycache__/materials.cpython-313.pyc +0 -0
- package/skills/agentvfx/plates/terminalcore/__pycache__/nodekit.cpython-313.pyc +0 -0
- package/skills/agentvfx/plates/terminalcore/__pycache__/room.cpython-313.pyc +0 -0
- package/skills/agentvfx/plates/terminalcore/__pycache__/shots.cpython-313.pyc +0 -0
- package/skills/agentvfx/plates/terminalcore/__pycache__/textures.cpython-313.pyc +0 -0
- package/skills/agentvfx/plates/terminalcore/__pycache__/wall.cpython-313.pyc +0 -0
- package/skills/agentvfx/plates/terminalcore/crt.py +143 -0
- package/skills/agentvfx/plates/terminalcore/font.py +80 -0
- package/skills/agentvfx/plates/terminalcore/gallery.py +61 -0
- package/skills/agentvfx/plates/terminalcore/gallery_mats.py +144 -0
- package/skills/agentvfx/plates/terminalcore/gallery_room.py +126 -0
- package/skills/agentvfx/plates/terminalcore/materials.py +170 -0
- package/skills/agentvfx/plates/terminalcore/nodekit.py +87 -0
- package/skills/agentvfx/plates/terminalcore/room.py +82 -0
- package/skills/agentvfx/plates/terminalcore/scene.py +219 -0
- package/skills/agentvfx/plates/terminalcore/shots.py +48 -0
- package/skills/agentvfx/plates/terminalcore/textures.py +79 -0
- package/skills/agentvfx/plates/terminalcore/wall.py +103 -0
- package/skills/agentvfx/references/plates.md +22 -0
- package/skills/agentvfx/references/template-format.md +149 -0
- package/skills/agentvfx/references/web.md +63 -0
- package/skills/agentvfx/runtime/agentvfx.js +708 -0
- package/skills/agentvfx/schemas/fx-score.schema.json +98 -0
- package/skills/agentvfx/scripts/export-web.mjs +155 -0
- package/skills/agentvfx/scripts/loop.mjs +129 -0
- package/skills/agentvfx/scripts/make-beat.mjs +133 -0
- package/skills/agentvfx/scripts/plate.mjs +82 -0
- package/skills/agentvfx/scripts/vfx.mjs +173 -0
- package/skills/agentvfx/templates/_test/feedback-counter/fx.json +11 -0
- package/skills/agentvfx/templates/_test/feedback-counter/main.frag +4 -0
- package/skills/agentvfx/templates/_test/feedback-counter/pass0.frag +4 -0
- package/skills/agentvfx/templates/_test/gradient/fx.json +23 -0
- package/skills/agentvfx/templates/_test/gradient/main.frag +5 -0
- package/skills/agentvfx/templates/_test/identity/fx.json +10 -0
- package/skills/agentvfx/templates/_test/identity/main.frag +4 -0
- package/skills/agentvfx/templates/_test/strobe/fx.json +14 -0
- package/skills/agentvfx/templates/_test/strobe/main.frag +6 -0
- package/skills/agentvfx/templates/_test/text-probe/fx.json +15 -0
- package/skills/agentvfx/templates/_test/text-probe/main.frag +6 -0
- package/skills/agentvfx/templates/brutal/NOTES.md +14 -0
- package/skills/agentvfx/templates/brutal/_src/boot-log/def.mjs +57 -0
- package/skills/agentvfx/templates/brutal/_src/boot-log/main.src.frag +129 -0
- package/skills/agentvfx/templates/brutal/_src/build.mjs +33 -0
- package/skills/agentvfx/templates/brutal/_src/halftone-field/def.mjs +72 -0
- package/skills/agentvfx/templates/brutal/_src/halftone-field/main.src.frag +94 -0
- package/skills/agentvfx/templates/brutal/_src/hud-deck/deck-left.src.glsl +100 -0
- package/skills/agentvfx/templates/brutal/_src/hud-deck/deck-right.src.glsl +61 -0
- package/skills/agentvfx/templates/brutal/_src/hud-deck/deck-tiles.src.glsl +153 -0
- package/skills/agentvfx/templates/brutal/_src/hud-deck/def.mjs +82 -0
- package/skills/agentvfx/templates/brutal/_src/hud-deck/main.src.frag +110 -0
- package/skills/agentvfx/templates/brutal/_src/hud-deck/pass0.src.frag +38 -0
- package/skills/agentvfx/templates/brutal/_src/shared/defs.mjs +28 -0
- package/skills/agentvfx/templates/brutal/_src/shared/icons.glsl +72 -0
- package/skills/agentvfx/templates/brutal/_src/shared/lib.glsl +115 -0
- package/skills/agentvfx/templates/brutal/_src/shared/screen.glsl +43 -0
- package/skills/agentvfx/templates/brutal/boot-log/demo-acid.json +1 -0
- package/skills/agentvfx/templates/brutal/boot-log/demo-phosphor.json +1 -0
- package/skills/agentvfx/templates/brutal/boot-log/demo-ultramarine.json +1 -0
- package/skills/agentvfx/templates/brutal/boot-log/fx.json +257 -0
- package/skills/agentvfx/templates/brutal/boot-log/main.frag +242 -0
- package/skills/agentvfx/templates/brutal/collage/_src/00-lib.glsl +73 -0
- package/skills/agentvfx/templates/brutal/collage/_src/10-spectrum-scope.glsl +73 -0
- package/skills/agentvfx/templates/brutal/collage/_src/20-meter-readout-cross.glsl +87 -0
- package/skills/agentvfx/templates/brutal/collage/_src/30-footage-fillers.glsl +92 -0
- package/skills/agentvfx/templates/brutal/collage/_src/40-editorial.glsl +232 -0
- package/skills/agentvfx/templates/brutal/collage/_src/50-typefx.glsl +163 -0
- package/skills/agentvfx/templates/brutal/collage/_src/60-scene-lib.glsl +104 -0
- package/skills/agentvfx/templates/brutal/collage/_src/61-scene-specimen.glsl +71 -0
- package/skills/agentvfx/templates/brutal/collage/_src/62-scene-wiring.glsl +96 -0
- package/skills/agentvfx/templates/brutal/collage/_src/63-scene-fieldcut.glsl +119 -0
- package/skills/agentvfx/templates/brutal/collage/_src/64-scene-pattern.glsl +64 -0
- package/skills/agentvfx/templates/brutal/collage/_src/641-scene-anatomy.glsl +49 -0
- package/skills/agentvfx/templates/brutal/collage/_src/642-scene-deck.glsl +78 -0
- package/skills/agentvfx/templates/brutal/collage/_src/643-scene-bootlog.glsl +60 -0
- package/skills/agentvfx/templates/brutal/collage/_src/644-scene-tunnel.glsl +48 -0
- package/skills/agentvfx/templates/brutal/collage/_src/645-scene-runner.glsl +42 -0
- package/skills/agentvfx/templates/brutal/collage/_src/646-scene-ascii.glsl +66 -0
- package/skills/agentvfx/templates/brutal/collage/_src/647-scene-cubewall.glsl +80 -0
- package/skills/agentvfx/templates/brutal/collage/_src/648-scene-vortex.glsl +46 -0
- package/skills/agentvfx/templates/brutal/collage/_src/649-scene-sticker.glsl +72 -0
- package/skills/agentvfx/templates/brutal/collage/_src/65-scene-main.glsl +1 -0
- package/skills/agentvfx/templates/brutal/collage/_src/650-scene-ribbon.glsl +55 -0
- package/skills/agentvfx/templates/brutal/collage/_src/651-scene-slab.glsl +38 -0
- package/skills/agentvfx/templates/brutal/collage/_src/652-scene-framedial.glsl +79 -0
- package/skills/agentvfx/templates/brutal/collage/_src/653-scene-tilt.glsl +40 -0
- package/skills/agentvfx/templates/brutal/collage/_src/654-scene-marquee.glsl +45 -0
- package/skills/agentvfx/templates/brutal/collage/_src/655-scene-lens.glsl +57 -0
- package/skills/agentvfx/templates/brutal/collage/_src/656-scene-liquid.glsl +35 -0
- package/skills/agentvfx/templates/brutal/collage/_src/657-scene-panelgrid.glsl +75 -0
- package/skills/agentvfx/templates/brutal/collage/_src/658-scene-mirror.glsl +49 -0
- package/skills/agentvfx/templates/brutal/collage/_src/66-scene-main.glsl +27 -0
- package/skills/agentvfx/templates/brutal/collage/_src/90-main.glsl +120 -0
- package/skills/agentvfx/templates/brutal/collage/_src/build.mjs +24 -0
- package/skills/agentvfx/templates/brutal/collage/_src/sync-presets.mjs +16 -0
- package/skills/agentvfx/templates/brutal/collage/demo-bone-lime.json +1 -0
- package/skills/agentvfx/templates/brutal/collage/demo-lime-sparse.json +1 -0
- package/skills/agentvfx/templates/brutal/collage/demo-orange-dense.json +1 -0
- package/skills/agentvfx/templates/brutal/collage/demo-ultra-slow.json +1 -0
- package/skills/agentvfx/templates/brutal/collage/fx.json +4882 -0
- package/skills/agentvfx/templates/brutal/collage/layout.mjs +97 -0
- package/skills/agentvfx/templates/brutal/collage/layouts.json +366 -0
- package/skills/agentvfx/templates/brutal/collage/main.frag +2367 -0
- package/skills/agentvfx/templates/brutal/collage/pass0.frag +265 -0
- package/skills/agentvfx/templates/brutal/halftone-field/demo-acid.json +1 -0
- package/skills/agentvfx/templates/brutal/halftone-field/demo-ascii.json +1 -0
- package/skills/agentvfx/templates/brutal/halftone-field/demo-dither.json +1 -0
- package/skills/agentvfx/templates/brutal/halftone-field/demo-orange.json +1 -0
- package/skills/agentvfx/templates/brutal/halftone-field/demo-phosphor.json +1 -0
- package/skills/agentvfx/templates/brutal/halftone-field/demo-ultramarine.json +1 -0
- package/skills/agentvfx/templates/brutal/halftone-field/fx.json +474 -0
- package/skills/agentvfx/templates/brutal/halftone-field/main.frag +248 -0
- package/skills/agentvfx/templates/brutal/hud-deck/demo-acid.json +1 -0
- package/skills/agentvfx/templates/brutal/hud-deck/demo-night.json +1 -0
- package/skills/agentvfx/templates/brutal/hud-deck/demo-octagon.json +1 -0
- package/skills/agentvfx/templates/brutal/hud-deck/demo-ultramarine.json +1 -0
- package/skills/agentvfx/templates/brutal/hud-deck/fx.json +601 -0
- package/skills/agentvfx/templates/brutal/hud-deck/main.frag +645 -0
- package/skills/agentvfx/templates/brutal/hud-deck/pass0.frag +38 -0
- package/skills/agentvfx/templates/brutal/lattice/demo-cobalt-fine.json +1 -0
- package/skills/agentvfx/templates/brutal/lattice/demo-ink-yellow.json +1 -0
- package/skills/agentvfx/templates/brutal/lattice/demo-vermilion.json +1 -0
- package/skills/agentvfx/templates/brutal/lattice/demo-violet-slow.json +1 -0
- package/skills/agentvfx/templates/brutal/lattice/fx.json +130 -0
- package/skills/agentvfx/templates/brutal/lattice/main.frag +175 -0
- package/skills/agentvfx/templates/brutal/lattice/pass0.frag +29 -0
- package/skills/agentvfx/templates/glitch/block-glitch/demo-mosaic.json +1 -0
- package/skills/agentvfx/templates/glitch/block-glitch/demo-onset.json +1 -0
- package/skills/agentvfx/templates/glitch/block-glitch/demo-static.json +1 -0
- package/skills/agentvfx/templates/glitch/block-glitch/demo-tear.json +1 -0
- package/skills/agentvfx/templates/glitch/block-glitch/fx.json +54 -0
- package/skills/agentvfx/templates/glitch/block-glitch/main.frag +132 -0
- package/skills/agentvfx/templates/glitch/block-glitch/pass0.frag +12 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/NOTES.md +13 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/build-passes.mjs +162 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/demo-chunk.json +1 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/demo-hue.json +1 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/demo-kick.json +1 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/demo-streak.json +1 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/demo-vertical.json +1 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/fx.json +60 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/main.frag +83 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/pass0.frag +64 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/pass1.frag +66 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/pass2.frag +66 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/pass3.frag +66 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/pass4.frag +66 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/pass5.frag +66 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/pass6.frag +66 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/pass7.frag +66 -0
- package/skills/agentvfx/templates/glitch/pixel-sort/pass8.frag +66 -0
- package/skills/agentvfx/templates/glitch/rgb-split/demo-diagonal-stutter.json +1 -0
- package/skills/agentvfx/templates/glitch/rgb-split/demo-hard.json +1 -0
- package/skills/agentvfx/templates/glitch/rgb-split/demo-kick.json +1 -0
- package/skills/agentvfx/templates/glitch/rgb-split/demo-radial.json +1 -0
- package/skills/agentvfx/templates/glitch/rgb-split/fx.json +46 -0
- package/skills/agentvfx/templates/glitch/rgb-split/main.frag +76 -0
- package/skills/agentvfx/templates/glitch/vhs/demo-clean.json +1 -0
- package/skills/agentvfx/templates/glitch/vhs/demo-crash.json +1 -0
- package/skills/agentvfx/templates/glitch/vhs/demo-tape.json +1 -0
- package/skills/agentvfx/templates/glitch/vhs/demo-worn.json +1 -0
- package/skills/agentvfx/templates/glitch/vhs/fx.json +46 -0
- package/skills/agentvfx/templates/glitch/vhs/main.frag +96 -0
- package/skills/agentvfx/templates/impact/impact-1bit/demo-onebit-bayer.json +1 -0
- package/skills/agentvfx/templates/impact/impact-1bit/fx.json +45 -0
- package/skills/agentvfx/templates/impact/impact-1bit/main.frag +64 -0
- package/skills/agentvfx/templates/impact/impact-invert/demo-invert-snap.json +1 -0
- package/skills/agentvfx/templates/impact/impact-invert/fx.json +37 -0
- package/skills/agentvfx/templates/impact/impact-invert/main.frag +44 -0
- package/skills/agentvfx/templates/impact/punch-shake/demo-punch-hard.json +1 -0
- package/skills/agentvfx/templates/impact/punch-shake/fx.json +36 -0
- package/skills/agentvfx/templates/impact/punch-shake/main.frag +62 -0
- package/skills/agentvfx/templates/impact/rgb-hit/demo-rgb-slam.json +1 -0
- package/skills/agentvfx/templates/impact/rgb-hit/fx.json +39 -0
- package/skills/agentvfx/templates/impact/rgb-hit/main.frag +62 -0
- package/skills/agentvfx/templates/impact/signal-cut/demo-lime-hold.json +1 -0
- package/skills/agentvfx/templates/impact/signal-cut/demo-lime.json +1 -0
- package/skills/agentvfx/templates/impact/signal-cut/demo-orange.json +1 -0
- package/skills/agentvfx/templates/impact/signal-cut/demo-ultramarine.json +1 -0
- package/skills/agentvfx/templates/impact/signal-cut/fx.json +83 -0
- package/skills/agentvfx/templates/impact/signal-cut/main.frag +101 -0
- package/skills/agentvfx/templates/impact/signal-cut/pass0.frag +68 -0
- package/skills/agentvfx/templates/impact/speedline-burst/demo-speed-white.json +1 -0
- package/skills/agentvfx/templates/impact/speedline-burst/fx.json +44 -0
- package/skills/agentvfx/templates/impact/speedline-burst/main.frag +68 -0
- package/skills/agentvfx/templates/impact/strobe-burst/demo-strobe-white-16.json +1 -0
- package/skills/agentvfx/templates/impact/strobe-burst/fx.json +42 -0
- package/skills/agentvfx/templates/impact/strobe-burst/main.frag +43 -0
- package/skills/agentvfx/templates/light/anamorphic-streak/demo-anamorphic-cinema.json +10 -0
- package/skills/agentvfx/templates/light/anamorphic-streak/demo-data.json +10 -0
- package/skills/agentvfx/templates/light/anamorphic-streak/fx.json +47 -0
- package/skills/agentvfx/templates/light/anamorphic-streak/main.frag +45 -0
- package/skills/agentvfx/templates/light/anamorphic-streak/pass0.frag +22 -0
- package/skills/agentvfx/templates/light/anamorphic-streak/pass1.frag +16 -0
- package/skills/agentvfx/templates/light/anamorphic-streak/pass2.frag +16 -0
- package/skills/agentvfx/templates/light/anamorphic-streak/pass3.frag +16 -0
- package/skills/agentvfx/templates/light/bloom-glow/demo-clip01-low.json +11 -0
- package/skills/agentvfx/templates/light/bloom-glow/demo-neon-night.json +10 -0
- package/skills/agentvfx/templates/light/bloom-glow/demo-phosphor.json +11 -0
- package/skills/agentvfx/templates/light/bloom-glow/fx.json +53 -0
- package/skills/agentvfx/templates/light/bloom-glow/main.frag +85 -0
- package/skills/agentvfx/templates/light/bloom-glow/pass0.frag +21 -0
- package/skills/agentvfx/templates/light/bloom-glow/pass1.frag +50 -0
- package/skills/agentvfx/templates/light/bloom-glow/pass2.frag +44 -0
- package/skills/agentvfx/templates/light/bloom-glow/pass3.frag +32 -0
- package/skills/agentvfx/templates/light/bloom-glow/pass4.frag +48 -0
- package/skills/agentvfx/templates/light/bloom-glow/pass5.frag +46 -0
- package/skills/agentvfx/templates/light/god-rays/demo-golden-hour.json +10 -0
- package/skills/agentvfx/templates/light/god-rays/demo-point-lamp.json +10 -0
- package/skills/agentvfx/templates/light/god-rays/fx.json +39 -0
- package/skills/agentvfx/templates/light/god-rays/main.frag +54 -0
- package/skills/agentvfx/templates/light/lens-flare/demo-clip01-bar.json +11 -0
- package/skills/agentvfx/templates/light/lens-flare/demo-eye-bar.json +10 -0
- package/skills/agentvfx/templates/light/lens-flare/demo-sun-ghosts.json +10 -0
- package/skills/agentvfx/templates/light/lens-flare/fx.json +49 -0
- package/skills/agentvfx/templates/light/lens-flare/main.frag +86 -0
- package/skills/agentvfx/templates/light/lens-flare/pass0.frag +24 -0
- package/skills/agentvfx/templates/light/light-leak/demo-slit.json +10 -0
- package/skills/agentvfx/templates/light/light-leak/demo-vintage-burn.json +10 -0
- package/skills/agentvfx/templates/light/light-leak/fx.json +40 -0
- package/skills/agentvfx/templates/light/light-leak/main.frag +46 -0
- package/skills/agentvfx/templates/light/light-stage/fx.json +29 -0
- package/skills/agentvfx/templates/light/light-stage/main.frag +56 -0
- package/skills/agentvfx/templates/light/light-sweep/demo-hard-bar.json +12 -0
- package/skills/agentvfx/templates/light/light-sweep/demo-logo-sweep.json +10 -0
- package/skills/agentvfx/templates/light/light-sweep/demo-onset.json +11 -0
- package/skills/agentvfx/templates/light/light-sweep/fx.json +45 -0
- package/skills/agentvfx/templates/light/light-sweep/main.frag +29 -0
- package/skills/agentvfx/templates/light/light-sweep/pass0.frag +17 -0
- package/skills/agentvfx/templates/light/light-sweep/pass1.frag +15 -0
- package/skills/agentvfx/templates/light/neon-saber/demo-hairline.json +10 -0
- package/skills/agentvfx/templates/light/neon-saber/demo-saber-laser.json +10 -0
- package/skills/agentvfx/templates/light/neon-saber/fx.json +48 -0
- package/skills/agentvfx/templates/light/neon-saber/main.frag +27 -0
- package/skills/agentvfx/templates/light/neon-saber/pass0.frag +46 -0
- package/skills/agentvfx/templates/light/neon-saber/pass1.frag +15 -0
- package/skills/agentvfx/templates/psychedelic/echo-flow/demo-trail.json +1 -0
- package/skills/agentvfx/templates/psychedelic/echo-flow/fx.json +38 -0
- package/skills/agentvfx/templates/psychedelic/echo-flow/main.frag +19 -0
- package/skills/agentvfx/templates/psychedelic/echo-flow/pass0.frag +16 -0
- package/skills/agentvfx/templates/psychedelic/echo-flow/pass1.frag +20 -0
- package/skills/agentvfx/templates/psychedelic/echo-flow/pass2.frag +11 -0
- package/skills/agentvfx/templates/psychedelic/echo-flow/pass3.frag +4 -0
- package/skills/agentvfx/templates/psychedelic/hologram-scan/demo-cyan.json +1 -0
- package/skills/agentvfx/templates/psychedelic/hologram-scan/fx.json +36 -0
- package/skills/agentvfx/templates/psychedelic/hologram-scan/main.frag +30 -0
- package/skills/agentvfx/templates/psychedelic/kaleido-fold/demo-six.json +1 -0
- package/skills/agentvfx/templates/psychedelic/kaleido-fold/fx.json +37 -0
- package/skills/agentvfx/templates/psychedelic/kaleido-fold/main.frag +10 -0
- package/skills/agentvfx/templates/psychedelic/kaleido-fold/pass0.frag +34 -0
- package/skills/agentvfx/templates/psychedelic/mosh-melt/demo-classic.json +1 -0
- package/skills/agentvfx/templates/psychedelic/mosh-melt/fx.json +38 -0
- package/skills/agentvfx/templates/psychedelic/mosh-melt/main.frag +20 -0
- package/skills/agentvfx/templates/psychedelic/mosh-melt/pass0.frag +22 -0
- package/skills/agentvfx/templates/psychedelic/sacred/NOTES.md +13 -0
- package/skills/agentvfx/templates/psychedelic/sacred/demo-classic.json +1 -0
- package/skills/agentvfx/templates/psychedelic/sacred/demo-halo.json +1 -0
- package/skills/agentvfx/templates/psychedelic/sacred/demo-slow-tide.json +1 -0
- package/skills/agentvfx/templates/psychedelic/sacred/demo-thermal.json +1 -0
- package/skills/agentvfx/templates/psychedelic/sacred/fx.json +263 -0
- package/skills/agentvfx/templates/psychedelic/sacred/main.frag +109 -0
- package/skills/agentvfx/templates/psychedelic/sacred/pass0.frag +25 -0
- package/skills/agentvfx/templates/psychedelic/sacred/pass1.frag +23 -0
- package/skills/agentvfx/templates/psychedelic/tidal-bands/demo-classic.json +1 -0
- package/skills/agentvfx/templates/psychedelic/tidal-bands/fx.json +37 -0
- package/skills/agentvfx/templates/psychedelic/tidal-bands/main.frag +54 -0
- package/skills/agentvfx/templates/scope/_chrome.glsl +242 -0
- package/skills/agentvfx/templates/scope/goniometer/demo-boot-green.json +1 -0
- package/skills/agentvfx/templates/scope/goniometer/demo-field-lime.json +1 -0
- package/skills/agentvfx/templates/scope/goniometer/demo-field-ultramarine.json +1 -0
- package/skills/agentvfx/templates/scope/goniometer/demo-glow-phosphor.json +1 -0
- package/skills/agentvfx/templates/scope/goniometer/demo-hud-black.json +1 -0
- package/skills/agentvfx/templates/scope/goniometer/fx.json +635 -0
- package/skills/agentvfx/templates/scope/goniometer/main.frag +33 -0
- package/skills/agentvfx/templates/scope/goniometer/pass0.frag +58 -0
- package/skills/agentvfx/templates/scope/goniometer/pass1.frag +43 -0
- package/skills/agentvfx/templates/scope/goniometer/pass2.frag +12 -0
- package/skills/agentvfx/templates/scope/goniometer/pass3.frag +12 -0
- package/skills/agentvfx/templates/scope/goniometer/pass4.frag +12 -0
- package/skills/agentvfx/templates/scope/goniometer/pass5.frag +12 -0
- package/skills/agentvfx/templates/scope/goniometer/pass6.frag +251 -0
- package/skills/agentvfx/templates/scope/scope-polar/demo-boot-green.json +1 -0
- package/skills/agentvfx/templates/scope/scope-polar/demo-field-lime.json +1 -0
- package/skills/agentvfx/templates/scope/scope-polar/demo-field-ultramarine.json +1 -0
- package/skills/agentvfx/templates/scope/scope-polar/demo-glow-phosphor.json +1 -0
- package/skills/agentvfx/templates/scope/scope-polar/demo-hud-black.json +1 -0
- package/skills/agentvfx/templates/scope/scope-polar/fx.json +686 -0
- package/skills/agentvfx/templates/scope/scope-polar/main.frag +39 -0
- package/skills/agentvfx/templates/scope/scope-polar/pass0.frag +84 -0
- package/skills/agentvfx/templates/scope/scope-polar/pass1.frag +49 -0
- package/skills/agentvfx/templates/scope/scope-polar/pass2.frag +12 -0
- package/skills/agentvfx/templates/scope/scope-polar/pass3.frag +12 -0
- package/skills/agentvfx/templates/scope/scope-polar/pass4.frag +12 -0
- package/skills/agentvfx/templates/scope/scope-polar/pass5.frag +12 -0
- package/skills/agentvfx/templates/scope/scope-polar/pass6.frag +251 -0
- package/skills/agentvfx/templates/scope/scope-triggered/demo-boot-green.json +1 -0
- package/skills/agentvfx/templates/scope/scope-triggered/demo-field-lime.json +1 -0
- package/skills/agentvfx/templates/scope/scope-triggered/demo-field-ultramarine.json +1 -0
- package/skills/agentvfx/templates/scope/scope-triggered/demo-glow-phosphor.json +1 -0
- package/skills/agentvfx/templates/scope/scope-triggered/demo-hud-black.json +1 -0
- package/skills/agentvfx/templates/scope/scope-triggered/fx.json +712 -0
- package/skills/agentvfx/templates/scope/scope-triggered/main.frag +36 -0
- package/skills/agentvfx/templates/scope/scope-triggered/pass0.frag +78 -0
- package/skills/agentvfx/templates/scope/scope-triggered/pass1.frag +50 -0
- package/skills/agentvfx/templates/scope/scope-triggered/pass2.frag +12 -0
- package/skills/agentvfx/templates/scope/scope-triggered/pass3.frag +12 -0
- package/skills/agentvfx/templates/scope/scope-triggered/pass4.frag +12 -0
- package/skills/agentvfx/templates/scope/scope-triggered/pass5.frag +12 -0
- package/skills/agentvfx/templates/scope/scope-triggered/pass6.frag +251 -0
- package/skills/agentvfx/templates/scope/spectrogram-scroll/demo-boot-green.json +1 -0
- package/skills/agentvfx/templates/scope/spectrogram-scroll/demo-field-lime.json +1 -0
- package/skills/agentvfx/templates/scope/spectrogram-scroll/demo-field-ultramarine.json +1 -0
- package/skills/agentvfx/templates/scope/spectrogram-scroll/demo-glow-phosphor.json +1 -0
- package/skills/agentvfx/templates/scope/spectrogram-scroll/demo-hud-black.json +1 -0
- package/skills/agentvfx/templates/scope/spectrogram-scroll/fx.json +595 -0
- package/skills/agentvfx/templates/scope/spectrogram-scroll/main.frag +83 -0
- package/skills/agentvfx/templates/scope/spectrogram-scroll/pass0.frag +52 -0
- package/skills/agentvfx/templates/scope/spectrogram-scroll/pass1.frag +251 -0
- package/skills/agentvfx/templates/scope/xy-phosphor/demo-boot-green.json +1 -0
- package/skills/agentvfx/templates/scope/xy-phosphor/demo-field-lime.json +1 -0
- package/skills/agentvfx/templates/scope/xy-phosphor/demo-field-ultramarine.json +1 -0
- package/skills/agentvfx/templates/scope/xy-phosphor/demo-glow-phosphor.json +1 -0
- package/skills/agentvfx/templates/scope/xy-phosphor/demo-hud-black.json +1 -0
- package/skills/agentvfx/templates/scope/xy-phosphor/fx.json +642 -0
- package/skills/agentvfx/templates/scope/xy-phosphor/main.frag +33 -0
- package/skills/agentvfx/templates/scope/xy-phosphor/pass0.frag +56 -0
- package/skills/agentvfx/templates/scope/xy-phosphor/pass1.frag +44 -0
- package/skills/agentvfx/templates/scope/xy-phosphor/pass2.frag +12 -0
- package/skills/agentvfx/templates/scope/xy-phosphor/pass3.frag +12 -0
- package/skills/agentvfx/templates/scope/xy-phosphor/pass4.frag +12 -0
- package/skills/agentvfx/templates/scope/xy-phosphor/pass5.frag +12 -0
- package/skills/agentvfx/templates/scope/xy-phosphor/pass6.frag +251 -0
- package/skills/agentvfx/templates/spectrum/_src/bars-linear/fx.src.json +61 -0
- package/skills/agentvfx/templates/spectrum/_src/bars-linear/main.src.frag +112 -0
- package/skills/agentvfx/templates/spectrum/_src/bars-linear/pass0.src.frag +2 -0
- package/skills/agentvfx/templates/spectrum/_src/bars-mirror/fx.src.json +51 -0
- package/skills/agentvfx/templates/spectrum/_src/bars-mirror/main.src.frag +72 -0
- package/skills/agentvfx/templates/spectrum/_src/bars-mirror/pass0.src.frag +2 -0
- package/skills/agentvfx/templates/spectrum/_src/bass-circle/fx.src.json +56 -0
- package/skills/agentvfx/templates/spectrum/_src/bass-circle/main.src.frag +136 -0
- package/skills/agentvfx/templates/spectrum/_src/bass-circle/pass0.src.frag +2 -0
- package/skills/agentvfx/templates/spectrum/_src/build.mjs +68 -0
- package/skills/agentvfx/templates/spectrum/_src/label-bars/fx.src.json +54 -0
- package/skills/agentvfx/templates/spectrum/_src/label-bars/main.src.frag +102 -0
- package/skills/agentvfx/templates/spectrum/_src/label-bars/pass0.src.frag +2 -0
- package/skills/agentvfx/templates/spectrum/_src/shared/bars-fn.glsl +64 -0
- package/skills/agentvfx/templates/spectrum/_src/shared/bars-pass.glsl +22 -0
- package/skills/agentvfx/templates/spectrum/_src/shared/clock.glsl +7 -0
- package/skills/agentvfx/templates/spectrum/_src/shared/hud.glsl +50 -0
- package/skills/agentvfx/templates/spectrum/_src/shared/stage.glsl +74 -0
- package/skills/agentvfx/templates/spectrum/_src/spectrum-particles/fx.src.json +58 -0
- package/skills/agentvfx/templates/spectrum/_src/spectrum-particles/main.src.frag +119 -0
- package/skills/agentvfx/templates/spectrum/_src/spectrum-particles/pass0.src.frag +33 -0
- package/skills/agentvfx/templates/spectrum/_src/spectrum-radial/fx.src.json +56 -0
- package/skills/agentvfx/templates/spectrum/_src/spectrum-radial/main.src.frag +95 -0
- package/skills/agentvfx/templates/spectrum/_src/spectrum-radial/pass0.src.frag +2 -0
- package/skills/agentvfx/templates/spectrum/_src/waveform-line/fx.src.json +60 -0
- package/skills/agentvfx/templates/spectrum/_src/waveform-line/main.src.frag +98 -0
- package/skills/agentvfx/templates/spectrum/_src/waveform-line/pass0.src.frag +43 -0
- package/skills/agentvfx/templates/spectrum/bars-linear/demo-graph-acid.json +1 -0
- package/skills/agentvfx/templates/spectrum/bars-linear/demo-graph-black.json +1 -0
- package/skills/agentvfx/templates/spectrum/bars-linear/fx.json +632 -0
- package/skills/agentvfx/templates/spectrum/bars-linear/main.frag +233 -0
- package/skills/agentvfx/templates/spectrum/bars-linear/pass0.frag +91 -0
- package/skills/agentvfx/templates/spectrum/bars-mirror/demo-field-acid.json +1 -0
- package/skills/agentvfx/templates/spectrum/bars-mirror/demo-field-ultramarine.json +1 -0
- package/skills/agentvfx/templates/spectrum/bars-mirror/fx.json +539 -0
- package/skills/agentvfx/templates/spectrum/bars-mirror/main.frag +193 -0
- package/skills/agentvfx/templates/spectrum/bars-mirror/pass0.frag +91 -0
- package/skills/agentvfx/templates/spectrum/bass-circle/demo-bracket-black.json +1 -0
- package/skills/agentvfx/templates/spectrum/bass-circle/demo-bracket-ultramarine.json +1 -0
- package/skills/agentvfx/templates/spectrum/bass-circle/fx.json +552 -0
- package/skills/agentvfx/templates/spectrum/bass-circle/main.frag +258 -0
- package/skills/agentvfx/templates/spectrum/bass-circle/pass0.frag +91 -0
- package/skills/agentvfx/templates/spectrum/label-bars/demo-deck-black.json +1 -0
- package/skills/agentvfx/templates/spectrum/label-bars/demo-deck-ultramarine.json +1 -0
- package/skills/agentvfx/templates/spectrum/label-bars/fx.json +552 -0
- package/skills/agentvfx/templates/spectrum/label-bars/main.frag +223 -0
- package/skills/agentvfx/templates/spectrum/label-bars/pass0.frag +91 -0
- package/skills/agentvfx/templates/spectrum/spectrum-particles/demo-cloud-black.json +1 -0
- package/skills/agentvfx/templates/spectrum/spectrum-particles/demo-cloud-ultramarine.json +1 -0
- package/skills/agentvfx/templates/spectrum/spectrum-particles/fx.json +584 -0
- package/skills/agentvfx/templates/spectrum/spectrum-particles/main.frag +240 -0
- package/skills/agentvfx/templates/spectrum/spectrum-particles/pass0.frag +101 -0
- package/skills/agentvfx/templates/spectrum/spectrum-radial/demo-starburst-black.json +1 -0
- package/skills/agentvfx/templates/spectrum/spectrum-radial/demo-starburst-ultramarine.json +1 -0
- package/skills/agentvfx/templates/spectrum/spectrum-radial/fx.json +566 -0
- package/skills/agentvfx/templates/spectrum/spectrum-radial/main.frag +217 -0
- package/skills/agentvfx/templates/spectrum/spectrum-radial/pass0.frag +91 -0
- package/skills/agentvfx/templates/spectrum/waveform-line/demo-strip-acid.json +1 -0
- package/skills/agentvfx/templates/spectrum/waveform-line/demo-strip-black.json +1 -0
- package/skills/agentvfx/templates/spectrum/waveform-line/fx.json +481 -0
- package/skills/agentvfx/templates/spectrum/waveform-line/main.frag +219 -0
- package/skills/agentvfx/templates/spectrum/waveform-line/pass0.frag +48 -0
- package/skills/agentvfx/templates/spectrum/waveform-line/pass1.frag +86 -0
- package/skills/agentvfx/test/_render_light.mjs +38 -0
- package/skills/agentvfx/test/audio-stereo.test.mjs +45 -0
- package/skills/agentvfx/test/audio.test.mjs +257 -0
- package/skills/agentvfx/test/brutal.test.mjs +190 -0
- package/skills/agentvfx/test/concept-collage-layout.test.mjs +236 -0
- package/skills/agentvfx/test/concept-collage-scenes.test.mjs +305 -0
- package/skills/agentvfx/test/concept-collage-typefx.test.mjs +153 -0
- package/skills/agentvfx/test/concept-collage.test.mjs +84 -0
- package/skills/agentvfx/test/concept-lattice.test.mjs +133 -0
- package/skills/agentvfx/test/concept-signal-cut.test.mjs +172 -0
- package/skills/agentvfx/test/credit-overlay.test.mjs +58 -0
- package/skills/agentvfx/test/credit.test.mjs +42 -0
- package/skills/agentvfx/test/doctor.test.mjs +31 -0
- package/skills/agentvfx/test/encode.test.mjs +22 -0
- package/skills/agentvfx/test/fixtures/r7-collage-LAYOUTS.json +5780 -0
- package/skills/agentvfx/test/fixtures/score-bad-duration.json +7 -0
- package/skills/agentvfx/test/fixtures/score-bad-safety.json +8 -0
- package/skills/agentvfx/test/fixtures/score-identity-footage.json +8 -0
- package/skills/agentvfx/test/fixtures/score-missing-template.json +7 -0
- package/skills/agentvfx/test/fixtures/score-ok.json +8 -0
- package/skills/agentvfx/test/fixtures/score-strobe-12hz.json +8 -0
- package/skills/agentvfx/test/fixtures/score-text-probe.json +1 -0
- package/skills/agentvfx/test/flash-audit.test.mjs +150 -0
- package/skills/agentvfx/test/flash.test.mjs +83 -0
- package/skills/agentvfx/test/footage.test.mjs +88 -0
- package/skills/agentvfx/test/glitch.test.mjs +272 -0
- package/skills/agentvfx/test/impact.test.mjs +231 -0
- package/skills/agentvfx/test/imports.test.mjs +39 -0
- package/skills/agentvfx/test/light.test.mjs +200 -0
- package/skills/agentvfx/test/loop.test.mjs +80 -0
- package/skills/agentvfx/test/psychedelic.test.mjs +99 -0
- package/skills/agentvfx/test/render.test.mjs +73 -0
- package/skills/agentvfx/test/sacred.test.mjs +175 -0
- package/skills/agentvfx/test/schema.test.mjs +103 -0
- package/skills/agentvfx/test/scope.test.mjs +306 -0
- package/skills/agentvfx/test/spectrum.test.mjs +165 -0
- package/skills/agentvfx/test/text.test.mjs +142 -0
- package/skills/agentvfx/test/web.test.mjs +397 -0
- package/skills/agentvfx/test-media/SOURCES.md +39 -0
- package/skills/agentvfx/test-media/beat-132.mp3 +0 -0
- package/skills/agentvfx/test-media/clip-01.mp4 +0 -0
- package/skills/agentvfx/test-media/clip-02.mp4 +0 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"""CRT monitor mesh: bevelled bezel, loft housing, curved glass, vents, knobs, LED. Front faces -Y, origin = front centre."""
|
|
2
|
+
import math
|
|
3
|
+
import random
|
|
4
|
+
|
|
5
|
+
import bmesh
|
|
6
|
+
import bpy
|
|
7
|
+
from mathutils import Matrix, Vector
|
|
8
|
+
|
|
9
|
+
SLOT_PLASTIC, SLOT_GLASS, SLOT_VENT, SLOT_STEEL, SLOT_LED = range(5)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _new(bm, before):
|
|
13
|
+
"""Faces created since the snapshot, by identity (BMesh reuses freed slots, so index slicing is unsafe)."""
|
|
14
|
+
return [f for f in bm.faces if f not in before]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def _tag(bm, before, slot):
|
|
18
|
+
for f in _new(bm, before):
|
|
19
|
+
f.material_index = slot
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _bevel(bm, before, width, segs=2):
|
|
23
|
+
edges = {e for f in _new(bm, before) for e in f.edges}
|
|
24
|
+
bmesh.ops.bevel(bm, geom=list(edges), offset=width, segments=segs, affect="EDGES")
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def box(bm, center, size, slot, bevel=0.004):
|
|
28
|
+
start = set(bm.faces)
|
|
29
|
+
bmesh.ops.create_cube(bm, size=1.0, matrix=Matrix.Translation(center) @ Matrix.Diagonal((*size, 1.0)))
|
|
30
|
+
if bevel:
|
|
31
|
+
_bevel(bm, start, bevel)
|
|
32
|
+
_tag(bm, start, slot)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def loft(bm, rings, slot, bevel=0.005):
|
|
36
|
+
"""rings: [(y, half_w, half_h, z_off)] -> closed rectangular tube with end caps."""
|
|
37
|
+
start = set(bm.faces)
|
|
38
|
+
loops = []
|
|
39
|
+
for y, hw, hh, zo in rings:
|
|
40
|
+
loops.append([bm.verts.new(p) for p in ((-hw, y, zo - hh), (hw, y, zo - hh), (hw, y, zo + hh), (-hw, y, zo + hh))])
|
|
41
|
+
for a, b in zip(loops, loops[1:]):
|
|
42
|
+
for i in range(4):
|
|
43
|
+
j = (i + 1) % 4
|
|
44
|
+
bm.faces.new((a[i], a[j], b[j], b[i]))
|
|
45
|
+
bm.faces.new(loops[0][::-1])
|
|
46
|
+
bm.faces.new(loops[-1])
|
|
47
|
+
bmesh.ops.recalc_face_normals(bm, faces=_new(bm, start))
|
|
48
|
+
if bevel:
|
|
49
|
+
_bevel(bm, start, bevel)
|
|
50
|
+
_tag(bm, start, slot)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def cylinder(bm, center, radius, depth, slot, axis_y=True, seg=14):
|
|
54
|
+
start = set(bm.faces)
|
|
55
|
+
rot = Matrix.Rotation(math.pi / 2, 4, "X") if axis_y else Matrix.Identity(4)
|
|
56
|
+
bmesh.ops.create_cone(bm, cap_ends=True, segments=seg, radius1=radius, radius2=radius, depth=depth, matrix=Matrix.Translation(center) @ rot)
|
|
57
|
+
_tag(bm, start, slot)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def glass(bm, half_w, half_h, z_off, bulge, nx=22, ny=16):
|
|
61
|
+
"""Curved CRT faceplate (spherical-ish bulge toward -Y) with 0..1 UVs; flat-ish corners."""
|
|
62
|
+
start = set(bm.faces)
|
|
63
|
+
grid = [[None] * (nx + 1) for _ in range(ny + 1)]
|
|
64
|
+
for j in range(ny + 1):
|
|
65
|
+
for i in range(nx + 1):
|
|
66
|
+
u, v = i / nx, j / ny
|
|
67
|
+
x, z = (u - 0.5) * 2.0, (v - 0.5) * 2.0
|
|
68
|
+
y = -bulge * (1.0 - 0.5 * (x * x + z * z)) + bulge * 0.0
|
|
69
|
+
grid[j][i] = bm.verts.new((x * half_w, y, z_off + z * half_h))
|
|
70
|
+
for j in range(ny):
|
|
71
|
+
for i in range(nx):
|
|
72
|
+
bm.faces.new((grid[j][i], grid[j][i + 1], grid[j + 1][i + 1], grid[j + 1][i]))
|
|
73
|
+
uvl = bm.loops.layers.uv.verify()
|
|
74
|
+
faces = _new(bm, start)
|
|
75
|
+
for f in faces:
|
|
76
|
+
for lp in f.loops:
|
|
77
|
+
c = lp.vert.co
|
|
78
|
+
lp[uvl].uv = ((c.x / half_w) * 0.5 + 0.5, ((c.z - z_off) / half_h) * 0.5 + 0.5)
|
|
79
|
+
bmesh.ops.reverse_faces(bm, faces=faces)
|
|
80
|
+
_tag(bm, start, SLOT_GLASS)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def build_crt_mesh(name="crt"):
|
|
84
|
+
bm = bmesh.new()
|
|
85
|
+
sw, sh, zc = 0.36, 0.26, 0.02
|
|
86
|
+
ow, oh = 0.50, 0.42
|
|
87
|
+
# bezel: four bars around the screen opening, bottom bar deeper for controls
|
|
88
|
+
box(bm, (-(sw / 2 + 0.035), 0.035, 0.02), (0.07, 0.07, oh - 0.16), SLOT_PLASTIC, 0.006)
|
|
89
|
+
box(bm, ((sw / 2 + 0.035), 0.035, 0.02), (0.07, 0.07, oh - 0.16), SLOT_PLASTIC, 0.006)
|
|
90
|
+
# black gasket ring hugging the glass
|
|
91
|
+
for sx in (-1, 1):
|
|
92
|
+
box(bm, (sx * (sw / 2 + 0.006), 0.012, zc), (0.012, 0.03, sh + 0.024), SLOT_VENT, 0.003)
|
|
93
|
+
for sz in (-1, 1):
|
|
94
|
+
box(bm, (0.0, 0.012, zc + sz * (sh / 2 + 0.006)), (sw, 0.03, 0.012), SLOT_VENT, 0.003)
|
|
95
|
+
box(bm, (0.0, 0.035, oh / 2 - 0.03), (sw + 0.14, 0.07, 0.06), SLOT_PLASTIC, 0.006)
|
|
96
|
+
box(bm, (0.0, 0.035, -oh / 2 + 0.05), (sw + 0.14, 0.07, 0.10), SLOT_PLASTIC, 0.006)
|
|
97
|
+
# dark inner skirt behind the glass edge so no light leaks around it
|
|
98
|
+
box(bm, (0.0, 0.07, zc), (sw + 0.005, 0.08, sh + 0.005), SLOT_VENT, 0.0)
|
|
99
|
+
loft(bm, [(0.07, 0.235, 0.205, 0.0), (0.2, 0.225, 0.195, 0.0), (0.3, 0.17, 0.15, 0.0)], SLOT_PLASTIC, 0.008)
|
|
100
|
+
loft(bm, [(0.3, 0.1, 0.09, 0.0), (0.5, 0.075, 0.07, 0.0)], SLOT_PLASTIC, 0.004)
|
|
101
|
+
# glass sits just behind the bezel plane; bulge pokes forward past it
|
|
102
|
+
glass(bm, sw / 2 - 0.002, sh / 2 - 0.002, zc, 0.022)
|
|
103
|
+
# vent slots on the top shell
|
|
104
|
+
for i in range(9):
|
|
105
|
+
box(bm, (-0.12 + i * 0.03, 0.2, 0.2), (0.012, 0.09, 0.006), SLOT_VENT, 0.0)
|
|
106
|
+
for i in range(6):
|
|
107
|
+
box(bm, (0.17, 0.12 + i * 0.03, 0.0), (0.006, 0.014, 0.18), SLOT_VENT, 0.0)
|
|
108
|
+
# controls on the lower bar
|
|
109
|
+
cylinder(bm, (0.12, -0.012, -oh / 2 + 0.05), 0.014, 0.03, SLOT_PLASTIC)
|
|
110
|
+
cylinder(bm, (0.17, -0.012, -oh / 2 + 0.05), 0.014, 0.03, SLOT_PLASTIC)
|
|
111
|
+
box(bm, (-0.15, -0.002, -oh / 2 + 0.05), (0.05, 0.012, 0.018), SLOT_STEEL, 0.002)
|
|
112
|
+
box(bm, (0.065, -0.003, -oh / 2 + 0.05), (0.03, 0.01, 0.014), SLOT_PLASTIC, 0.002)
|
|
113
|
+
for i in range(5):
|
|
114
|
+
box(bm, (-0.075 - i * 0.012, 0.0, -oh / 2 + 0.075), (0.006, 0.008, 0.02), SLOT_VENT, 0.0)
|
|
115
|
+
cylinder(bm, (0.205, -0.004, -oh / 2 + 0.05), 0.0045, 0.008, SLOT_LED, seg=8)
|
|
116
|
+
me = bpy.data.meshes.new(name)
|
|
117
|
+
bm.to_mesh(me)
|
|
118
|
+
bm.free()
|
|
119
|
+
for p in me.polygons:
|
|
120
|
+
p.use_smooth = True
|
|
121
|
+
return me, (sw, sh)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def add_cable(name, pts, radius, material, collection, seed=0, sag=0.0):
|
|
125
|
+
"""NURBS tube through pts (list of xyz) with optional parabolic sag between ends."""
|
|
126
|
+
rng = random.Random(seed)
|
|
127
|
+
cu = bpy.data.curves.new(name, "CURVE")
|
|
128
|
+
cu.dimensions = "3D"
|
|
129
|
+
cu.bevel_depth = radius
|
|
130
|
+
cu.bevel_resolution = 3
|
|
131
|
+
cu.resolution_u = 10
|
|
132
|
+
sp = cu.splines.new("NURBS")
|
|
133
|
+
sp.points.add(len(pts) - 1)
|
|
134
|
+
n = len(pts) - 1
|
|
135
|
+
for i, p in enumerate(pts):
|
|
136
|
+
t = i / max(n, 1)
|
|
137
|
+
sp.points[i].co = (p[0] + rng.uniform(-0.01, 0.01), p[1] + rng.uniform(-0.01, 0.01), p[2] - sag * 4 * t * (1 - t), 1.0)
|
|
138
|
+
sp.order_u = 4
|
|
139
|
+
sp.use_endpoint_u = True
|
|
140
|
+
ob = bpy.data.objects.new(name, cu)
|
|
141
|
+
ob.data.materials.append(material)
|
|
142
|
+
collection.objects.link(ob)
|
|
143
|
+
return ob
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"""Hand-drawn 5x7 bitmap font (original glyph shapes, no font files) used for the CRT terminal text."""
|
|
2
|
+
|
|
3
|
+
_G = {
|
|
4
|
+
"A": ".###.|#...#|#...#|#####|#...#|#...#|#...#",
|
|
5
|
+
"B": "####.|#...#|#...#|####.|#...#|#...#|####.",
|
|
6
|
+
"C": ".####|#....|#....|#....|#....|#....|.####",
|
|
7
|
+
"D": "####.|#...#|#...#|#...#|#...#|#...#|####.",
|
|
8
|
+
"E": "#####|#....|#....|####.|#....|#....|#####",
|
|
9
|
+
"F": "#####|#....|#....|####.|#....|#....|#....",
|
|
10
|
+
"G": ".####|#....|#....|#..##|#...#|#...#|.####",
|
|
11
|
+
"H": "#...#|#...#|#...#|#####|#...#|#...#|#...#",
|
|
12
|
+
"I": "#####|..#..|..#..|..#..|..#..|..#..|#####",
|
|
13
|
+
"J": "..###|...#.|...#.|...#.|...#.|#..#.|.##..",
|
|
14
|
+
"K": "#...#|#..#.|#.#..|##...|#.#..|#..#.|#...#",
|
|
15
|
+
"L": "#....|#....|#....|#....|#....|#....|#####",
|
|
16
|
+
"M": "#...#|##.##|#.#.#|#.#.#|#...#|#...#|#...#",
|
|
17
|
+
"N": "#...#|##..#|#.#.#|#..##|#...#|#...#|#...#",
|
|
18
|
+
"O": ".###.|#...#|#...#|#...#|#...#|#...#|.###.",
|
|
19
|
+
"P": "####.|#...#|#...#|####.|#....|#....|#....",
|
|
20
|
+
"Q": ".###.|#...#|#...#|#...#|#.#.#|#..#.|.##.#",
|
|
21
|
+
"R": "####.|#...#|#...#|####.|#.#..|#..#.|#...#",
|
|
22
|
+
"S": ".####|#....|#....|.###.|....#|....#|####.",
|
|
23
|
+
"T": "#####|..#..|..#..|..#..|..#..|..#..|..#..",
|
|
24
|
+
"U": "#...#|#...#|#...#|#...#|#...#|#...#|.###.",
|
|
25
|
+
"V": "#...#|#...#|#...#|#...#|#...#|.#.#.|..#..",
|
|
26
|
+
"W": "#...#|#...#|#...#|#.#.#|#.#.#|##.##|#...#",
|
|
27
|
+
"X": "#...#|#...#|.#.#.|..#..|.#.#.|#...#|#...#",
|
|
28
|
+
"Y": "#...#|#...#|.#.#.|..#..|..#..|..#..|..#..",
|
|
29
|
+
"Z": "#####|....#|...#.|..#..|.#...|#....|#####",
|
|
30
|
+
"0": ".###.|#..##|#.#.#|#.#.#|#.#.#|##..#|.###.",
|
|
31
|
+
"1": "..#..|.##..|..#..|..#..|..#..|..#..|.###.",
|
|
32
|
+
"2": ".###.|#...#|....#|...#.|..#..|.#...|#####",
|
|
33
|
+
"3": "####.|....#|....#|.###.|....#|....#|####.",
|
|
34
|
+
"4": "...#.|..##.|.#.#.|#..#.|#####|...#.|...#.",
|
|
35
|
+
"5": "#####|#....|####.|....#|....#|#...#|.###.",
|
|
36
|
+
"6": ".###.|#....|#....|####.|#...#|#...#|.###.",
|
|
37
|
+
"7": "#####|....#|...#.|..#..|.#...|.#...|.#...",
|
|
38
|
+
"8": ".###.|#...#|#...#|.###.|#...#|#...#|.###.",
|
|
39
|
+
"9": ".###.|#...#|#...#|.####|....#|....#|.###.",
|
|
40
|
+
".": ".....|.....|.....|.....|.....|.##..|.##..",
|
|
41
|
+
",": ".....|.....|.....|.....|.##..|..#..|.#...",
|
|
42
|
+
":": ".....|.##..|.##..|.....|.##..|.##..|.....",
|
|
43
|
+
";": ".....|.##..|.##..|.....|.##..|..#..|.#...",
|
|
44
|
+
"-": ".....|.....|.....|#####|.....|.....|.....",
|
|
45
|
+
"_": ".....|.....|.....|.....|.....|.....|#####",
|
|
46
|
+
"=": ".....|.....|#####|.....|#####|.....|.....",
|
|
47
|
+
"+": ".....|..#..|..#..|#####|..#..|..#..|.....",
|
|
48
|
+
"*": ".....|#.#.#|.###.|#####|.###.|#.#.#|.....",
|
|
49
|
+
"/": "....#|....#|...#.|..#..|.#...|#....|#....",
|
|
50
|
+
"\\": "#....|#....|.#...|..#..|...#.|....#|....#",
|
|
51
|
+
">": "#....|.#...|..#..|...#.|..#..|.#...|#....",
|
|
52
|
+
"<": "....#|...#.|..#..|.#...|..#..|...#.|....#",
|
|
53
|
+
"[": ".###.|.#...|.#...|.#...|.#...|.#...|.###.",
|
|
54
|
+
"]": ".###.|...#.|...#.|...#.|...#.|...#.|.###.",
|
|
55
|
+
"(": "..#..|.#...|#....|#....|#....|.#...|..#..",
|
|
56
|
+
")": "..#..|...#.|....#|....#|....#|...#.|..#..",
|
|
57
|
+
"#": ".#.#.|.#.#.|#####|.#.#.|#####|.#.#.|.#.#.",
|
|
58
|
+
"%": "##..#|##.#.|...#.|..#..|.#...|#.##.|#..##",
|
|
59
|
+
"!": "..#..|..#..|..#..|..#..|..#..|.....|..#..",
|
|
60
|
+
"?": ".###.|#...#|....#|...#.|..#..|.....|..#..",
|
|
61
|
+
"'": ".##..|..#..|.#...|.....|.....|.....|.....",
|
|
62
|
+
'"': ".#.#.|.#.#.|.....|.....|.....|.....|.....",
|
|
63
|
+
"@": ".###.|#...#|#.###|#.#.#|#.###|#....|.####",
|
|
64
|
+
"$": "..#..|.####|#.#..|.###.|..#.#|####.|..#..",
|
|
65
|
+
"&": ".##..|#..#.|#.#..|.#...|#.#.#|#..#.|.##.#",
|
|
66
|
+
"|": "..#..|..#..|..#..|..#..|..#..|..#..|..#..",
|
|
67
|
+
"~": ".....|.....|.#...|#.#.#|...#.|.....|.....",
|
|
68
|
+
"^": "..#..|.#.#.|#...#|.....|.....|.....|.....",
|
|
69
|
+
"{": "..##.|.#...|.#...|#....|.#...|.#...|..##.",
|
|
70
|
+
"}": ".##..|...#.|...#.|....#|...#.|...#.|.##..",
|
|
71
|
+
" ": ".....|.....|.....|.....|.....|.....|.....",
|
|
72
|
+
"BLOCK": "#####|#####|#####|#####|#####|#####|#####",
|
|
73
|
+
"CURSOR": "#####|#####|#####|#####|#####|#####|#####",
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def glyph(ch):
|
|
78
|
+
"""Return a 7x5 tuple-of-tuples (1 = lit) for ch; unknown characters render as blank."""
|
|
79
|
+
rows = _G.get(ch.upper(), _G[" "]).split("|")
|
|
80
|
+
return tuple(tuple(1 if c == "#" else 0 for c in r) for r in rows)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""Gallery variant: the CRT wall shown as a gallery installation (precise grid, powder-coat frame, concrete plinth, one bench)."""
|
|
2
|
+
import bpy
|
|
3
|
+
|
|
4
|
+
import crt
|
|
5
|
+
import gallery_mats as G
|
|
6
|
+
import gallery_room as GR
|
|
7
|
+
import materials as M
|
|
8
|
+
import textures
|
|
9
|
+
import wall
|
|
10
|
+
from crt import SLOT_GLASS
|
|
11
|
+
|
|
12
|
+
# Screen content per tube, bottom row first, columns 0..4 mirrored to 9. a amber, g green, h green-b, c cold, . dark
|
|
13
|
+
LAYOUT = ("g.aaa", "hgaaa", "gaaca", "hgaa.", "g.aaa")
|
|
14
|
+
KEYS = {"a": "amber", "g": "green_a", "h": "green_b", "c": "cold"}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def _screen_key(r, c):
|
|
18
|
+
ch = LAYOUT[r][min(c, wall.COLS - 1 - c)]
|
|
19
|
+
return KEYS.get(ch)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def build_installation(coll, mats, screens):
|
|
23
|
+
mesh, _ = crt.build_crt_mesh()
|
|
24
|
+
for m in (mats["plastic"], mats["glass_base"], mats["vent"], mats["steel"], mats["pilot"]):
|
|
25
|
+
mesh.materials.append(m)
|
|
26
|
+
for r in range(wall.ROWS):
|
|
27
|
+
for c in range(wall.COLS):
|
|
28
|
+
ob = bpy.data.objects.new(f"crt_{r}_{c}", mesh)
|
|
29
|
+
x, y, _ = wall.monitor_position(r, c)
|
|
30
|
+
ob.location = (x, y, wall.BASE_Z + r * wall.PITCH + 0.22)
|
|
31
|
+
coll.objects.link(ob)
|
|
32
|
+
key = _screen_key(r, c)
|
|
33
|
+
slot = ob.material_slots[SLOT_GLASS]
|
|
34
|
+
slot.link = "OBJECT"
|
|
35
|
+
slot.material = screens[key] if key else mats["glass_off"]
|
|
36
|
+
GR.block(coll, "plinth", (5.7, 1.8, 0.24), (0, -0.3, 0.12), mats["plinth"], bevel=0.004)
|
|
37
|
+
GR.block(coll, "bench", (2.2, 0.44, 0.42), (0, -3.3, 0.21), mats["stone"], bevel=0.013)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def build(scene, coll, a):
|
|
41
|
+
"""Build the whole gallery and return the per-variant animation value nodes (scroll / time)."""
|
|
42
|
+
mats = {
|
|
43
|
+
"concrete": G.concrete_panel("g_wall"), "ceiling": G.concrete_panel("g_ceiling", holes=False, tone=0.36),
|
|
44
|
+
"floor": G.polished_floor(), "plinth": G.polished_floor("g_plinth", tone=0.07, joints=False),
|
|
45
|
+
"powder": G.powdercoat(), "reveal": G.reveal(), "stone": G.honed_stone(tone=0.42),
|
|
46
|
+
"slot": G.emitter("g_slot", (1.0, 0.96, 0.9), 14.0 * a.key),
|
|
47
|
+
"plastic": M.plastic(palette=((0.10, 0.104, 0.11),) * 3), "steel": M.steel(), "vent": M.vent_black(),
|
|
48
|
+
"pilot": M.led("pilot", (1.0, 0.55, 0.18), 5.0),
|
|
49
|
+
"glass_off": G.glass_off(),
|
|
50
|
+
}
|
|
51
|
+
mats["glass_base"] = mats["glass_off"]
|
|
52
|
+
screens, anims = {}, {}
|
|
53
|
+
for key, (seed, tint, strength, _rate) in wall.VARIANTS.items():
|
|
54
|
+
anims[key] = {}
|
|
55
|
+
screens[key] = M.screen(f"screen_{key}", textures.make_image(f"term_{key}", seed), tint, anims[key], lines=90.0, strength=strength, zoom=0.5)
|
|
56
|
+
GR.build_world(scene, a.haze)
|
|
57
|
+
GR.build_shell(coll, mats)
|
|
58
|
+
GR.build_lights(coll, mats, a.key)
|
|
59
|
+
wall.build_rack(coll, {**mats, "steel": mats["powder"]})
|
|
60
|
+
build_installation(coll, mats, screens)
|
|
61
|
+
return anims
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"""Gallery-variant materials: architectural cast concrete panels, polished concrete floor, powder-coat, honed stone, emitters.
|
|
2
|
+
|
|
3
|
+
Concrete panels read the panel's own object-space coordinates (X across, Z up) so tie holes land on every panel the same way;
|
|
4
|
+
noise detail reads world position so the surface never repeats between neighbours.
|
|
5
|
+
"""
|
|
6
|
+
from nodekit import fresh, finish, math, remap, mix, vmath, rgb, principled, node
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def _noise(nt, vec, scale, detail=4.0, rough=0.55):
|
|
10
|
+
return node(nt, "ShaderNodeTexNoise", {"Vector": vec, "Scale": scale, "Detail": detail, "Roughness": rough}).outputs["Fac"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _pores(nt, vec, scale, keep, r_lo, r_hi):
|
|
14
|
+
"""Sparse little air-bubble dimples: a Voronoi cell hosts a pore only when its random value passes `keep`."""
|
|
15
|
+
v = node(nt, "ShaderNodeTexVoronoi", {"Vector": vec, "Scale": scale, "Randomness": 1.0}, feature="F1")
|
|
16
|
+
rgb_ = node(nt, "ShaderNodeSeparateColor", {"Color": v.outputs["Color"]})
|
|
17
|
+
sel = remap(nt, rgb_.outputs["Red"], keep, keep + 0.02, 0.0, 1.0, smooth=False)
|
|
18
|
+
radius = math(nt, "ADD", r_lo, math(nt, "MULTIPLY", rgb_.outputs["Green"], r_hi - r_lo))
|
|
19
|
+
shape = remap(nt, v.outputs["Distance"], math(nt, "MULTIPLY", radius, 0.25), radius, 1.0, 0.0)
|
|
20
|
+
return math(nt, "MULTIPLY", sel, shape)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _tie_holes(nt, local):
|
|
24
|
+
"""Round form-tie recesses: 2 columns x 3 rows per 1.2 x 2.35 panel (Ando-style), in panel-local coordinates."""
|
|
25
|
+
sep = node(nt, "ShaderNodeSeparateXYZ", {"Vector": local})
|
|
26
|
+
u, v = sep.outputs["X"], sep.outputs["Z"]
|
|
27
|
+
dx = math(nt, "ABSOLUTE", math(nt, "SUBTRACT", math(nt, "ABSOLUTE", u), 0.3))
|
|
28
|
+
dz = math(nt, "MINIMUM", math(nt, "ABSOLUTE", v), math(nt, "ABSOLUTE", math(nt, "SUBTRACT", math(nt, "ABSOLUTE", v), 0.783)))
|
|
29
|
+
d = vmath(nt, "LENGTH", node(nt, "ShaderNodeCombineXYZ", {"X": dx, "Y": dz, "Z": 0.0}).outputs[0])
|
|
30
|
+
return remap(nt, d, 0.019, 0.029, 1.0, 0.0)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def concrete_panel(name="g_concrete", holes=True, tone=0.30):
|
|
34
|
+
m, nt = fresh(name)
|
|
35
|
+
pos = node(nt, "ShaderNodeNewGeometry").outputs["Position"]
|
|
36
|
+
local = node(nt, "ShaderNodeTexCoord").outputs["Object"]
|
|
37
|
+
rnd = node(nt, "ShaderNodeObjectInfo").outputs["Random"]
|
|
38
|
+
cloud = _noise(nt, pos, 0.45, 6.0, 0.6)
|
|
39
|
+
mottle = _noise(nt, pos, 4.0, 5.0, 0.6)
|
|
40
|
+
streaks = _noise(nt, vmath(nt, "MULTIPLY", pos, (9.0, 9.0, 0.8)), 1.0, 4.0, 0.5)
|
|
41
|
+
fine = _noise(nt, pos, 55.0, 5.0, 0.65)
|
|
42
|
+
grain = _noise(nt, pos, 240.0, 3.0, 0.7)
|
|
43
|
+
p1 = _pores(nt, pos, 70.0, 0.80, 0.10, 0.34)
|
|
44
|
+
p2 = _pores(nt, pos, 210.0, 0.86, 0.12, 0.40)
|
|
45
|
+
tie = _tie_holes(nt, local) if holes else 0.0
|
|
46
|
+
|
|
47
|
+
h = math(nt, "ADD", math(nt, "MULTIPLY", fine, 0.55), math(nt, "ADD", math(nt, "MULTIPLY", grain, 0.18), math(nt, "MULTIPLY", mottle, 0.3)))
|
|
48
|
+
h = math(nt, "SUBTRACT", h, math(nt, "ADD", math(nt, "MULTIPLY", p1, 1.1), math(nt, "MULTIPLY", p2, 0.6)))
|
|
49
|
+
if holes:
|
|
50
|
+
h = math(nt, "SUBTRACT", h, math(nt, "MULTIPLY", tie, 3.0))
|
|
51
|
+
bump = node(nt, "ShaderNodeBump", {"Height": h, "Strength": 0.38, "Distance": 0.004}).outputs["Normal"]
|
|
52
|
+
|
|
53
|
+
t = remap(nt, cloud, 0.3, 0.7, 0.80, 1.16)
|
|
54
|
+
t = math(nt, "MULTIPLY", t, remap(nt, mottle, 0.35, 0.65, 0.93, 1.07))
|
|
55
|
+
t = math(nt, "MULTIPLY", t, remap(nt, streaks, 0.35, 0.65, 0.93, 1.07))
|
|
56
|
+
t = math(nt, "MULTIPLY", t, math(nt, "ADD", 0.9, math(nt, "MULTIPLY", rnd, 0.2)))
|
|
57
|
+
t = math(nt, "MULTIPLY", t, math(nt, "SUBTRACT", 1.0, math(nt, "ADD", math(nt, "MULTIPLY", p1, 0.5), math(nt, "MULTIPLY", p2, 0.3))))
|
|
58
|
+
if holes:
|
|
59
|
+
t = math(nt, "MULTIPLY", t, math(nt, "SUBTRACT", 1.0, math(nt, "MULTIPLY", tie, 0.55)))
|
|
60
|
+
base = vmath(nt, "MULTIPLY", rgb(nt, tone, tone * 0.992, tone * 0.975), vmath(nt, "SCALE", rgb(nt, 1, 1, 1), t))
|
|
61
|
+
rough = math(nt, "ADD", 0.5, math(nt, "ADD", math(nt, "MULTIPLY", math(nt, "SUBTRACT", mottle, 0.5), 0.3), math(nt, "MULTIPLY", math(nt, "SUBTRACT", rnd, 0.5), 0.1)))
|
|
62
|
+
finish(nt, principled(nt, Base_Color=base, Roughness=rough, Normal=bump, Specular_IOR_Level=0.45))
|
|
63
|
+
return m
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def polished_floor(name="g_floor", tone=0.13, joints=True):
|
|
67
|
+
"""Ground-and-sealed concrete: soft cloudy gloss, fine aggregate flecks, hairline saw-cut joints on a 2.4 m grid."""
|
|
68
|
+
m, nt = fresh(name)
|
|
69
|
+
pos = node(nt, "ShaderNodeNewGeometry").outputs["Position"]
|
|
70
|
+
sep = node(nt, "ShaderNodeSeparateXYZ", {"Vector": pos})
|
|
71
|
+
cloud = _noise(nt, pos, 0.32, 6.0, 0.6)
|
|
72
|
+
swirl = _noise(nt, vmath(nt, "MULTIPLY", pos, (1.0, 1.0, 0.05)), 1.8, 3.0, 0.5)
|
|
73
|
+
fleck_l = _pores(nt, pos, 150.0, 0.90, 0.14, 0.30)
|
|
74
|
+
fleck_d = _pores(nt, pos, 110.0, 0.92, 0.16, 0.34)
|
|
75
|
+
gx = math(nt, "FRACT", math(nt, "DIVIDE", math(nt, "ADD", sep.outputs["X"], 1.2), 2.4))
|
|
76
|
+
gy = math(nt, "FRACT", math(nt, "DIVIDE", sep.outputs["Y"], 2.4))
|
|
77
|
+
jx = math(nt, "ADD", remap(nt, gx, 0.0, 0.0014, 1.0, 0.0), remap(nt, gx, 0.9986, 1.0, 0.0, 1.0))
|
|
78
|
+
jy = math(nt, "ADD", remap(nt, gy, 0.0, 0.0014, 1.0, 0.0), remap(nt, gy, 0.9986, 1.0, 0.0, 1.0))
|
|
79
|
+
joint = math(nt, "MULTIPLY", math(nt, "MAXIMUM", jx, jy), 1.0 if joints else 0.0)
|
|
80
|
+
|
|
81
|
+
t = math(nt, "MULTIPLY", remap(nt, cloud, 0.3, 0.7, 0.8, 1.15), remap(nt, swirl, 0.3, 0.7, 0.92, 1.08))
|
|
82
|
+
t = math(nt, "MULTIPLY", t, math(nt, "SUBTRACT", math(nt, "ADD", 1.0, math(nt, "MULTIPLY", fleck_l, 0.7)), math(nt, "MULTIPLY", fleck_d, 0.5)))
|
|
83
|
+
t = math(nt, "MULTIPLY", t, math(nt, "SUBTRACT", 1.0, math(nt, "MULTIPLY", joint, 0.75)))
|
|
84
|
+
base = vmath(nt, "MULTIPLY", rgb(nt, tone, tone * 0.99, tone * 0.97), vmath(nt, "SCALE", rgb(nt, 1, 1, 1), t))
|
|
85
|
+
rough = math(nt, "ADD", 0.05, math(nt, "ADD", math(nt, "MULTIPLY", remap(nt, cloud, 0.4, 0.7), 0.12), math(nt, "MULTIPLY", remap(nt, swirl, 0.4, 0.65), 0.08)))
|
|
86
|
+
rough = math(nt, "MAXIMUM", rough, math(nt, "MULTIPLY", joint, 0.6))
|
|
87
|
+
h = math(nt, "SUBTRACT", math(nt, "MULTIPLY", _noise(nt, pos, 70.0, 3.0, 0.6), 0.2), math(nt, "MULTIPLY", joint, 1.0))
|
|
88
|
+
bump = node(nt, "ShaderNodeBump", {"Height": h, "Strength": 0.12, "Distance": 0.003}).outputs["Normal"]
|
|
89
|
+
finish(nt, principled(nt, Base_Color=base, Roughness=rough, Normal=bump, Specular_IOR_Level=0.7, Coat_Weight=0.25, Coat_Roughness=0.06))
|
|
90
|
+
return m
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def powdercoat(name="g_powder", tone=0.028, rough=0.42):
|
|
94
|
+
m, nt = fresh(name)
|
|
95
|
+
pos = node(nt, "ShaderNodeNewGeometry").outputs["Position"]
|
|
96
|
+
peel = _noise(nt, pos, 700.0, 2.0, 0.5)
|
|
97
|
+
bump = node(nt, "ShaderNodeBump", {"Height": peel, "Strength": 0.05, "Distance": 0.0003}).outputs["Normal"]
|
|
98
|
+
finish(nt, principled(nt, Base_Color=(tone, tone, tone * 1.04), Roughness=rough, Normal=bump, Specular_IOR_Level=0.55))
|
|
99
|
+
return m
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def reveal(name="g_reveal"):
|
|
103
|
+
"""Near-black backing seen only through joints and shadow gaps."""
|
|
104
|
+
m, nt = fresh(name)
|
|
105
|
+
finish(nt, principled(nt, Base_Color=(0.012, 0.012, 0.013), Roughness=0.85))
|
|
106
|
+
return m
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def honed_stone(name="g_stone", tone=0.035):
|
|
110
|
+
"""Honed limestone: soft cloudy tone, thin sedimentary veins along the length, fine hone grain, per-region gloss."""
|
|
111
|
+
m, nt = fresh(name)
|
|
112
|
+
pos = node(nt, "ShaderNodeNewGeometry").outputs["Position"]
|
|
113
|
+
cloud = _noise(nt, pos, 1.4, 4.0, 0.5)
|
|
114
|
+
big = _noise(nt, pos, 0.55, 3.0, 0.5)
|
|
115
|
+
fleck = _pores(nt, pos, 260.0, 0.80, 0.12, 0.3)
|
|
116
|
+
strata = _noise(nt, vmath(nt, "MULTIPLY", pos, (0.35, 5.0, 2.5)), 1.0, 5.0, 0.55)
|
|
117
|
+
vein = remap(nt, math(nt, "ABSOLUTE", math(nt, "SUBTRACT", strata, 0.5)), 0.0, 0.035, 1.0, 0.0)
|
|
118
|
+
hone = _noise(nt, pos, 420.0, 3.0, 0.6)
|
|
119
|
+
t = math(nt, "MULTIPLY", remap(nt, cloud, 0.3, 0.7, 0.88, 1.12), remap(nt, big, 0.3, 0.7, 0.84, 1.14))
|
|
120
|
+
t = math(nt, "MULTIPLY", t, math(nt, "SUBTRACT", 1.0, math(nt, "ADD", math(nt, "MULTIPLY", fleck, 0.22), math(nt, "MULTIPLY", vein, 0.16))))
|
|
121
|
+
warm = remap(nt, big, 0.35, 0.65, 0.0, 1.0)
|
|
122
|
+
base = vmath(nt, "SCALE", mix(nt, warm, rgb(nt, tone * 0.97, tone, tone * 1.06), rgb(nt, tone * 1.05, tone * 1.0, tone * 0.93)), t)
|
|
123
|
+
rough = math(nt, "ADD", 0.22, math(nt, "ADD", math(nt, "MULTIPLY", math(nt, "SUBTRACT", cloud, 0.5), 0.3), math(nt, "MULTIPLY", vein, 0.08)))
|
|
124
|
+
bump = node(nt, "ShaderNodeBump", {"Height": math(nt, "SUBTRACT", hone, math(nt, "MULTIPLY", fleck, 1.2)), "Strength": 0.10, "Distance": 0.0006}).outputs["Normal"]
|
|
125
|
+
finish(nt, principled(nt, Base_Color=base, Roughness=rough, Normal=bump, Specular_IOR_Level=0.6, Coat_Weight=0.2, Coat_Roughness=0.1))
|
|
126
|
+
return m
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def glass_off(name="g_glass_off"):
|
|
130
|
+
"""Powered-down CRT faceplate: dark tinted glass, a soft low-gloss reflection (dust and smudge keep it from mirroring the ceiling slots)."""
|
|
131
|
+
m, nt = fresh(name)
|
|
132
|
+
pos = node(nt, "ShaderNodeNewGeometry").outputs["Position"]
|
|
133
|
+
dust = _noise(nt, pos, 22.0, 5.0, 0.6)
|
|
134
|
+
smudge = _noise(nt, pos, 6.0, 3.0, 0.5)
|
|
135
|
+
rough = math(nt, "ADD", 0.2, math(nt, "MULTIPLY", math(nt, "MULTIPLY", remap(nt, smudge, 0.4, 0.75), remap(nt, dust, 0.4, 0.8)), 0.14))
|
|
136
|
+
finish(nt, principled(nt, Base_Color=(0.003, 0.0035, 0.0035), Roughness=rough, IOR=1.52, Specular_IOR_Level=0.3, Emission_Color=(0.02, 0.03, 0.025, 1.0), Emission_Strength=0.02))
|
|
137
|
+
return m
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def emitter(name, color, strength):
|
|
141
|
+
m, nt = fresh(name)
|
|
142
|
+
e = node(nt, "ShaderNodeEmission", {"Color": color, "Strength": strength})
|
|
143
|
+
finish(nt, e)
|
|
144
|
+
return m
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"""Gallery shell: board-panel concrete walls with reveal gaps, recessed-slot ceiling, polished floor, lights, haze."""
|
|
2
|
+
import math
|
|
3
|
+
|
|
4
|
+
import bmesh
|
|
5
|
+
import bpy
|
|
6
|
+
from mathutils import Matrix, Vector
|
|
7
|
+
|
|
8
|
+
from nodekit import node
|
|
9
|
+
|
|
10
|
+
HALF_W, Y_BACK, DEPTH, HEIGHT = 4.2, 0.62, 14.4, 4.8
|
|
11
|
+
Y_FRONT = Y_BACK - DEPTH
|
|
12
|
+
PW, PH, GAP, PT, Z0 = 1.2, 2.35, 0.005, 0.03, 0.05
|
|
13
|
+
SLOTS_X = (-2.1, 0.0, 2.1)
|
|
14
|
+
SLOT_W = 0.12
|
|
15
|
+
_MESHES = {}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def block(coll, name, size, loc, mat, rot=(0.0, 0.0, 0.0), bevel=0.002):
|
|
19
|
+
"""Box mesh centred on its own origin (front face = local -Y), placed by the object transform."""
|
|
20
|
+
key = (tuple(round(s, 4) for s in size), bevel, mat.name)
|
|
21
|
+
me = _MESHES.get(key)
|
|
22
|
+
if me is None:
|
|
23
|
+
bm = bmesh.new()
|
|
24
|
+
bmesh.ops.create_cube(bm, size=1.0, matrix=Matrix.Diagonal((*size, 1.0)))
|
|
25
|
+
if bevel:
|
|
26
|
+
bmesh.ops.bevel(bm, geom=list(bm.edges), offset=bevel, segments=2, affect="EDGES")
|
|
27
|
+
me = bpy.data.meshes.new(name)
|
|
28
|
+
bm.to_mesh(me)
|
|
29
|
+
bm.free()
|
|
30
|
+
me.materials.append(mat)
|
|
31
|
+
_MESHES[key] = me
|
|
32
|
+
ob = bpy.data.objects.new(name, me)
|
|
33
|
+
ob.location, ob.rotation_euler = loc, rot
|
|
34
|
+
coll.objects.link(ob)
|
|
35
|
+
return ob
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _wall(coll, mats, name, centre_of, rot, count):
|
|
39
|
+
"""Two rows of 1.2 m panels; centre_of(i) -> (x, y) of panel i's centre line, panel faces -> room."""
|
|
40
|
+
for i in range(count):
|
|
41
|
+
x, y = centre_of(i)
|
|
42
|
+
for r in range(2):
|
|
43
|
+
z = Z0 + PH / 2 + r * PH
|
|
44
|
+
block(coll, f"{name}_{i}_{r}", (PW - GAP, PT, PH - GAP), (x, y, z), mats["concrete"], rot)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def build_shell(coll, mats):
|
|
48
|
+
conc, rev = mats["concrete"], mats["reveal"]
|
|
49
|
+
L = DEPTH + 1.0
|
|
50
|
+
block(coll, "floor", (2 * HALF_W + 1.6, L, 0.5), (0, Y_BACK - DEPTH / 2, -0.25), mats["floor"], bevel=0.0)
|
|
51
|
+
block(coll, "back_rev", (2 * HALF_W + 1.0, 0.3, HEIGHT + 0.4), (0, Y_BACK + PT + 0.15, HEIGHT / 2), rev, bevel=0.0)
|
|
52
|
+
block(coll, "front_wall", (2 * HALF_W + 1.0, 0.3, HEIGHT + 0.4), (0, Y_FRONT - 0.15, HEIGHT / 2), conc, bevel=0.0)
|
|
53
|
+
for sx in (-1, 1):
|
|
54
|
+
block(coll, f"side_rev_{sx}", (0.3, L, HEIGHT + 0.4), (sx * (HALF_W + PT + 0.15), Y_BACK - DEPTH / 2, HEIGHT / 2), rev, bevel=0.0)
|
|
55
|
+
block(coll, "roof_rev", (2 * HALF_W + 1.0, L, 0.3), (0, Y_BACK - DEPTH / 2, HEIGHT + PT + 0.15), rev, bevel=0.0)
|
|
56
|
+
nb, ns = int(2 * HALF_W / PW + 0.5), int(DEPTH / PW + 0.5)
|
|
57
|
+
_wall(coll, mats, "back", lambda i: (-HALF_W + PW / 2 + i * PW, Y_BACK + PT / 2), (0, 0, 0), nb)
|
|
58
|
+
_wall(coll, mats, "right", lambda i: (HALF_W + PT / 2, Y_BACK - PW / 2 - i * PW), (0, 0, math.radians(-90)), ns)
|
|
59
|
+
_wall(coll, mats, "left", lambda i: (-HALF_W - PT / 2, Y_BACK - PW / 2 - i * PW), (0, 0, math.radians(90)), ns)
|
|
60
|
+
build_ceiling(coll, mats)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def build_ceiling(coll, mats):
|
|
64
|
+
"""Concrete soffit panels with three flush linear light slots running toward the installation."""
|
|
65
|
+
edges = [-HALF_W - 0.05]
|
|
66
|
+
for sx in SLOTS_X:
|
|
67
|
+
edges += [sx - SLOT_W / 2, sx + SLOT_W / 2]
|
|
68
|
+
edges.append(HALF_W + 0.05)
|
|
69
|
+
nchunk = int(DEPTH / 2.4 + 0.5)
|
|
70
|
+
for k in range(0, len(edges), 2):
|
|
71
|
+
x0, x1 = edges[k], edges[k + 1]
|
|
72
|
+
for j in range(nchunk):
|
|
73
|
+
y = Y_BACK - 1.2 - j * 2.4
|
|
74
|
+
block(coll, f"ceil_{k}_{j}", (x1 - x0 - GAP, PT, 2.4 - GAP), ((x0 + x1) / 2, y, HEIGHT + PT / 2), mats["ceiling"], (math.radians(90), 0, 0))
|
|
75
|
+
for i, sx in enumerate(SLOTS_X):
|
|
76
|
+
block(coll, f"slot_{i}", (SLOT_W - 0.01, DEPTH, 0.02), (sx, Y_BACK - DEPTH / 2, HEIGHT + 0.015), mats["slot"], bevel=0.0)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def _aim(ob, target):
|
|
80
|
+
ob.rotation_euler = (Vector(target) - Vector(ob.location)).to_track_quat("-Z", "Y").to_euler()
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def _spot(coll, mats, name, loc, target, energy, cone=26.0):
|
|
84
|
+
"""Track spot with a visible black barrel; the beam is aimed at `target` (grazing the concrete)."""
|
|
85
|
+
sp = bpy.data.lights.new(name, "SPOT")
|
|
86
|
+
sp.color, sp.energy = (1.0, 0.95, 0.88), energy
|
|
87
|
+
sp.spot_size, sp.spot_blend, sp.shadow_soft_size = math.radians(cone), 0.85, 0.045
|
|
88
|
+
so = bpy.data.objects.new(name, sp)
|
|
89
|
+
so.location = loc
|
|
90
|
+
_aim(so, target)
|
|
91
|
+
so.visible_camera = False
|
|
92
|
+
coll.objects.link(so)
|
|
93
|
+
back = so.rotation_euler.to_matrix() @ Vector((0.0, 0.0, 0.095))
|
|
94
|
+
block(coll, f"head_{name}", (0.085, 0.085, 0.17), Vector(loc) + back, mats["powder"], tuple(so.rotation_euler), bevel=0.01)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def build_lights(coll, mats, key=1.0):
|
|
98
|
+
wash = bpy.data.lights.new("wash", "AREA")
|
|
99
|
+
wash.shape, wash.size, wash.size_y, wash.spread = "RECTANGLE", 2 * HALF_W - 0.4, 0.12, math.radians(75)
|
|
100
|
+
wash.color, wash.energy = (1.0, 0.97, 0.92), 300.0 * key
|
|
101
|
+
wo = bpy.data.objects.new("wash", wash)
|
|
102
|
+
wo.location = (0, Y_BACK - 0.34, HEIGHT - 0.08)
|
|
103
|
+
wo.visible_camera = False
|
|
104
|
+
coll.objects.link(wo)
|
|
105
|
+
z = HEIGHT - 0.12
|
|
106
|
+
for sx in (-1, 1):
|
|
107
|
+
block(coll, f"rail_{sx}", (0.035, DEPTH - 0.4, 0.03), (sx * (HALF_W - 0.5), Y_BACK - DEPTH / 2, HEIGHT - 0.015), mats["powder"], bevel=0.003)
|
|
108
|
+
for k in range(6):
|
|
109
|
+
y = Y_BACK - 1.0 - k * 1.8
|
|
110
|
+
_spot(coll, mats, f"side_{sx}_{k}", (sx * (HALF_W - 0.5), y, z), (sx * HALF_W, y - 0.05, 1.1), 520.0 * key)
|
|
111
|
+
block(coll, "rail_back", (2 * HALF_W - 0.6, 0.035, 0.03), (0, Y_BACK - 0.5, HEIGHT - 0.015), mats["powder"], bevel=0.003)
|
|
112
|
+
for sx, tx, tz in ((-1, 3.4, 0.9), (1, 3.4, 0.9), (-1, 1.15, 3.1), (1, 1.15, 3.1)):
|
|
113
|
+
_spot(coll, mats, f"back_{sx}_{tx}", (sx * tx, Y_BACK - 0.5, z), (sx * tx, Y_BACK, tz), 420.0 * key, cone=24.0)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def build_world(scene, haze=1.0):
|
|
117
|
+
world = bpy.data.worlds.new("gallery")
|
|
118
|
+
scene.world = world
|
|
119
|
+
world.use_nodes = True
|
|
120
|
+
nt = world.node_tree
|
|
121
|
+
nt.nodes.clear()
|
|
122
|
+
bg = node(nt, "ShaderNodeBackground", {"Color": (0.0, 0.0, 0.0, 1.0), "Strength": 0.0})
|
|
123
|
+
out = node(nt, "ShaderNodeOutputWorld")
|
|
124
|
+
nt.links.new(bg.outputs[0], out.inputs["Surface"])
|
|
125
|
+
vol = node(nt, "ShaderNodeVolumeScatter", {"Density": 0.0011 * haze, "Anisotropy": 0.35, "Color": (1.0, 1.0, 1.0, 1.0)})
|
|
126
|
+
nt.links.new(vol.outputs[0], out.inputs["Volume"])
|