Log inGet started
Package

toonBlocks.package

This package holds more than this page lists. See all of its files in its world.

README.md

Hue-shift cel fill (styleBlock, Fill)

Cel fill whose shadows turn cooler and more saturated round the colour wheel and whose lights turn a touch warmer, as painters shade, instead of just darker.

Settings: flatten (0.85), radius (24), keepEdges (3), saturation (1.1), posterLevels (0), threshold (0.42), softness (0.02), shadowColour (#d9d9f2), shadowLevel (0.62), litLevel (1), hueShift (0.07), shadowSaturation (1.3), lightWarmth (0.02), keepLight (0), shape (0.9), shadeLevel (0.3), castBelow (0.8), fullLight (1), keepLightColour (0.3). Low quality gathers colour from radius 10 with four taps per ring instead of eight.

It is the Cel fill (celFill) with other defaults: the same flat areas and the same two tones, but the shadow tone is the area's colour turned 0.07 of a turn round the colour wheel (toward cooler hues for most colours) and saturated by 1.3, laid in a pale lavender shadowColour at 0.62, and the lit tone is turned 0.02 the other way. A red roof shades toward purple rather than brown, green grass toward teal. The Soft anime and Pencil anime looks use it with keepLight 1 over a colour ramp, so the ramp's light shows inside the hue-shifted colours. It swaps with celFill and celPoster in one change: StyleKit.swap("fill", "celHueShift").

It needs the base colour copy: on the forward renderer, and on the sky and pure black surfaces, it leaves the frame as it is.

What it gives up in motion

As the Cel fill: flat areas hold still and stay on their surfaces under any camera move; the lit and shadow line follows the light and sweeps when the sun or a lamp moves, in small steps about once a second under a moving sun (the sun's direction reaches the block on that rhythm). The reach of the colour gathering is in reference pixels, so very close up a little more texture shows. Hue shifting changes no timing: nothing flickers or boils.

How it treats content

  • Opaque things: laid flat in their own colours; shadows cooler and richer, lights a touch warmer.
  • Transparent things (glass, water): painted as the flat surface behind, the pane's tint and reflections counted only as light, so glass and water mostly lose their own look. Leave them out by name where they matter.
  • Particles and smoke: painted as the surface behind, their brightness counted as light; smoke pushes the surface into its hue-shifted shadow, so grey smoke can read as a cool coloured patch. Leave effects out by name to keep their colour.
  • Sky: never touched.
  • Fog: distant surfaces are painted in their own flat colours and the haze is mostly painted out. A depth mask on the entry keeps far haze.
  • Skinned characters: flattened every frame; skin and cloth shadows turn cooler and more saturated, which suits stylized characters but can push pale skin toward violet in shade: lower hueShift or shadowSaturation.
  • Foliage: each leaf is laid flat; shaded foliage turns toward teal and blue-green.
  • World text: letters a clear colour away from their card stay as edges; words in shade take the shifted shadow colour. Leave labels out by name: StyleKit.options({ exclude = { "labelName" } }).
  • Black stays black: no light stays no light and it returns through sk_finish, so with every light off the frame is black.

Known limits

  • It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
  • Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
  • Its passes are queued again every frame, even when nothing changed (#24548).

The package README's Known limits lists the rest.