Log inGet started
Package

animeRimBackLight.styleBlock

README.md

Anime rim: wide back light (styleBlock, Light)

A wide anime back light: a broad, bright band of pale light on the side of things turned away from the sun, as if lit from behind, the dramatic contre-jour of film anime and sunset scenes.

The broad back light of a figure against the sky in an anime film.

Every anime rim block runs the one animeRim shader, which is the Style Cookbook's toonBlocks rim light (toonRim: the same edge search, settings and light handling) with one more setting, hardness, that cuts the rim to a flat painted band. Any anime rim swaps for another, or for toonRim, with StyleKit.swap("rim", "<block>") ({ keepSettings = true } carries your tuning). It is a chain block at rank 50, so it lands after the cel light and before the highlight shapes whatever order they were added in. Settings: width (reference pixels), strength, colour, side (-1 back light, +1 lit side, 0 all round), fresnel, followLight, tintByColour, fullLight, keepLightColour, hardness, fadeStart, fadeEnd (the rim fades out with distance, so far foliage does not glitter).

Per object: a rim entry with a variant (StyleKit.add("animeRimBackLight", { id = "heroRim", variant = "hero" })) draws only on objects given that variant (StyleKit.setChannel(hero, { variant = "hero" })), so the hero can carry a back light the crowd does not.

What it gives up in motion

The rim sits on silhouettes, found where depth drops away behind a surface, so it moves with them and keeps its width in the picture at any distance. Nothing changes on its own over time, and nothing flashes.

How it treats content

  • Opaque things: a band along outer edges only; flat floors and walls seen face-on get none.
  • Transparent things (glass, water): not in the depth, so they get no rim, and things behind them keep theirs.
  • Particles and smoke: no rim (not in the depth).
  • Sky: never touched; it is what makes the silhouette edge against it.
  • Fog: the rim is light added on the surface and fogs with it only as much as the frame already is.
  • Skinned characters: rimmed every frame along their outline.
  • Foliage: alpha-cut leaves get rims at their outer edges; keep width small on dense foliage.
  • World text: flat, so left alone unless it stands out as a silhouette.
  • Black stays black: returns through styleKit's sk_finish; followLight above 0 keeps rims off unlit surfaces.
  • Dim rooms: with followLight 0 a rim adds light in the dark (a back light); raise followLight to keep dim rooms dim.