Style Cookbook: Mix Your Own Art Style from Stackable Look Blocks
- ..
- .metadata117 B
- README.md2.3 KB
- block.yaml712 B
README.md
Stepped light (styleBlock, Light)
Steps the light on every surface into a few flat bands, cel shading for the whole frame with no material edits, or inside a material for chosen objects.
Settings: bands (3), softness (0.08), shadowLift (0.35), highlight (1.0).
Two ways to use it, sharing one banding (sbl_bands in the bands shader module):
- Whole frame: add the block. It divides the rendered colour by each surface's base colour (copied from the deferred renderer) to find the light that arrived, steps it and puts the base colour back. No material is touched.
- Inside a material: give chosen objects the
bandedToonmaterial (or any material on thebandedToonshader, or your own shader that includesbands). They are banded by their own lighting, which is exact rather than estimated, and they look the same as the full-frame version. Use the block's group mask to keep the full-frame pass off them.
What it gives up in motion
A slow light change, or a light moving past an object, makes band edges sweep across surfaces in steps instead of fading. Noisy light (soft shadows, ambient occlusion) can flicker at band edges; raise softness.
How it treats content
- Opaque things: banded by the light that reached them.
- Transparent things (glass, water): the base colour behind them is used, so glass is banded as if it were the surface behind.
- Particles and smoke: additive particles count as light and push a surface up a band.
- Sky: untouched.
- Fog: fog adds light, so fogged surfaces step up toward the top band.
- Skinned characters: banded like any surface.
- Foliage: banded; leaf shading turns into flat patches.
- World text: emissive text counts as bright light and lands in the top band.
- Black stays black: no light arrives, the band is 0.
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.