Log inGet started
World

Style Cookbook: Mix Your Own Art Style from Stackable Look Blocks

README.md

toonWorld

Give an existing world, scene or installed kit a cel-shaded toon look with toonBlocks and styleKit, and leave it undoable.

What it does

  1. Survey. Reads the scene's stack exactly as it is (every entry with its id, block, strength, on, mask and settings, and the stack options with its exclude list and groups), the light (is there a sun, how low, how strong the ambient), the objects and the materials they wear, which objects carry toonMaterials' own ink (ToonInk, ToonProp), floors and ground planes, glass and water, effects, the screen UI, the world labels, the characters and the colours that carry gameplay meaning. The recorded stack is the undo.
  2. Choose. Picks one of the seven toon looks (comicInkCel, saturdayMorning, softAnime, pencilAnime, clearLine, thickSticker, ninetiesCG) or a stack built from the blocks, from the reference picture or the asker's words, with a ramp when the look shades through one, the reason, and what the scene's light needs (a directional sun for the clean toon light).
  3. Apply. StyleKit.applyLook(<look>, { keep = <slots to keep> }) (or StyleKit.load for a built stack), then ToonBlocks.setRamp(<ramp>) when the look has a toonRamp entry, and at most one round of StyleKit.set on fullLight, castBelow, shadowLift or the line's width.
  4. Outlines. ToonBlocks.setMaterialOutline(<material>, false) for floors, terrain and backdrops, a quieter line for busy walls, ToonBlocks.setObjectOutline(<entity>, { width = ... }) for the hero, false for pickups and glows; objects with their own toonMaterials ink are left to it (skipOwnInk 1) and full-frame lines are kept off them with a group mask.
  5. Hero. ToonMaterial.paint(<hero id>) when there is a hero (the stack's toon light inside its own materials), and a group mask that keeps the Light and Fill entries off it.
  6. Check. Screen UI and world labels readable (labels left out by name), characters and gameplay colours still read, effects and glass, black stays black with the lights off (outline ink included), the low tier, the multiplayer note.
  7. Report. The look and why, the stack before and after, every outline rule and setting made, every painted object, the checks, the numbers, and the undo.

Undo. The report carries the full StyleKit.load(...) call of the stack from before the run (or StyleKit.clear() when there was none) and the exclude list and groups from before, ToonMaterial.unpaint(<id>, { removeFiles = true }) for every object this run painted (its original materials back, the derived material files deleted), ToonBlocks.setMaterialOutline(<material>, nil) for every material rule and ToonBlocks.setObjectOutline(<entity>, nil) for every object setting this run made (which remove the ToonOutlineRules entries and ToonOutline components). With no outline entry live, every hull shell is released and the frame is exactly as rendered before.

What it needs

toonBlocks installed (it brings styleKit). inkBlocks and paperBlocks are optional: the run can swap the line for an ink line or add a paper when the asker wants a drawn look. The Lookbook check uses lookbookKit when the world has it.

Starting it

zero workflow start --name toonWorld --args '{"subject":"main","look":"bright cartoon with thick black outlines","hero":"Hero"}'

subject names the world, scene or kit (default: the loaded scene); look is the look in the asker's words or a look id (default: the run proposes one); hero names the entity to paint (default: the run proposes one or none); reference is an optional path to a reference picture.

Known limits

  • Installing a package with several dependencies can take a while (#21420).
  • ZeroMind's description of this can lag one release behind what is installed (#19258).
  • The web build was not checked from here (#20946).

The package README's Known limits lists the rest.