landing/art/hero_bg.py
Hero backdrop: twice domain-warped silk that dissolves into the page ink on the left and bottom.
Render it yourself: atelier render hero_bg.py --preview (it imports _common.py for the palette and output folder).
# Hero backdrop: twice domain-warped silk that dissolves into the page ink on the left and bottom.
import numpy as np
from atelier import *
from _common import *
c = Canvas(2400, 1350, bg=INK)
f = domain_warp(domain_warp(fbm(1.3, 4, seed=SEED + 21), 0.45, 1.2, seed=SEED + 22), 0.1, 2.0, seed=SEED + 23)
hue = fbm(0.7, 3, seed=SEED + 25)
silk = (0.5 + 0.5 * np.sin(f * np.pi * 6)) ** 2
col = mix(hue.ramp(["#0b1e3f", "#0f5e6e", "#2fa39a", "#e8c170", "#f27059", "#fde9d0"]), "#fde9d0", silk * 0.18)
# composition: a diagonal river of silk from the top right towards the lower middle
def river(x, y):
d = (y - (0.02 + 0.95 * (1 - x) ** 1.6)) / 0.26
return np.exp(-d * d) * np.clip((x - 0.22) / 0.45, 0, 1) ** 1.2
band = Field(river)
c.layer().fill(shade(f, color=col, strength=0.6, light=(110, 45), ambient=0.35, spec=0.2, shininess=25), mask=band)
threads = (1 - np.abs(np.sin(f * np.pi * 18))) ** 26
c.layer(blend="screen", opacity=0.6).fill("#fff2d8", mask=threads * band ** 2)
c.layer(blend="screen", opacity=0.35).scatter("soft", 140, region=band, size=(1, 3.5), color="#fff2d8", seed=SEED + 3)
c.apply(bloom(0.72, 20, 0.5), curves([(0.1, 0.06), (0.6, 0.66)]), grain(0.016, seed=SEED))
c.save(out("hero-bg.jpg"), quality=90)