# 1. Toon Look Design and Readability Part of [[Stylized Toon and Outline Shading]]. Next: [[2. Cel Lighting Custom Function in Shader Graph]]. > [!warning] Code not compiled > This part has no code. Later parts' shaders were not compiled; see the hub. ## 1. Decide the look on paper first A toon look is a set of **rules**. Write them down as a one-page style sheet before touching Shader Graph; every later parameter comes from it. | Decision | Options | Typical class choice | Shader parameter | |---|---|---|---| | Light bands | 2 (lit/shadow), 3 (lit/mid/shadow), ramp texture | 2 for characters, 3 for environments | `Bands`, ramp texture | | Band edge | Hard, slightly soft (anti-aliased) | Slightly soft (avoids shimmering) | edge softness | | Shadow color | Darker albedo, hue-shifted (cool shadows), fixed color | Hue-shifted toward blue/purple | `ShadowTint` or ramp | | Cast shadows | Same bands as self-shadow, separate color, off | Same as self-shadow | shadow attenuation into the band input | | Specular | None, hard blob, anisotropic stripe | Hard blob on characters and metal only | spec size/threshold | | Rim light | None, lit-side rim, full rim | Lit-side rim on characters | rim threshold | | Outlines | None, inverted hull, screen-space, both | Hull on characters/interactables, screen-space for world creases | outline width, thresholds | | Ambient | Flat color, light probes (SH), gradient | Light probes, reduced | ambient strength | Reference real games when you discuss these with students: the band count, shadow hue and outline weight are what make *The Legend of Zelda: The Wind Waker*, *Hi-Fi Rush* or *Genshin Impact* look different from each other, not the engine. ## 2. Value structure: squint test Toon shading throws away gradients, so **value** (light vs dark) carries the scene: 1. Take a screenshot, desaturate it, blur it slightly (or squint). 2. The player character, interactables and the current goal must still stand out. 3. If everything is mid-gray, change albedo values or band/shadow colors, not the outline width. *Level Up!* Level 5's emphasis on silhouette and "form follows function" applies directly: a toon character whose silhouette reads in pure black on white will read in any lighting. ## 3. Outline hierarchy Outlines are information. Use **weight** to rank objects: | Rank | Objects | Outline | |---|---|---| | 1 | Player, enemies | Thick hull outline (e.g. 3-4 px) | | 2 | Interactables, pickups, doors | Medium hull outline, or highlight only when in range (part 6) | | 3 | Props | Thin screen-space edges | | 4 | Background, distant terrain | None (distance fade, part 5) | This is *Level Up!* Level 8's clarity rule in rendering form: a uniform black line on everything is as noisy as no lines at all. It also echoes Level 9: give the **weenie** (the landmark that pulls players forward) the strongest contrast in the scene - see [[3. Weenies Landmarks and Lighting as Wayfinding]]. ## 4. Color and accessibility - Choose a limited **palette** (8-16 colors) and reserve one hue for "danger" and one for "interactable". Toon shading makes reserved colors very readable, so do not waste them on decoration. - Do not rely on hue alone: interactables also get an outline or a shape cue (see [[2. Colorblind-Safe Palettes]] and [[Accessibility]]). - Hue-shifted shadows (warm light, cool shadow) keep shadowed areas colorful; pure black shadows read as holes. ## 5. Two outline techniques, one comparison | | Inverted hull (part 4) | Screen-space edges (part 5) | |---|---|---| | How | Draw the mesh again, slightly inflated, front faces culled, in a solid color | Full-screen pass compares neighbouring depth/normal pixels | | Per object control | Yes (material/layer) | No (whole camera), except via stencil/layers in advanced setups | | Inner creases | No (only silhouette) | Yes (normal changes) | | Cost | One extra draw per outlined object | One full-screen pass + depth & normals textures | | Problems | Gaps on hard edges (needs smoothed normals), thick on close-ups | Noise on dense geometry, thresholds per scene | | Best for | Characters, interactables | Architecture, props, "comic" look | Many games combine both: hull for characters, edges for the world. ## 6. Performance budget (decide early) - Toon lighting is usually **cheaper** than URP Lit (no PBR BRDF, no reflections) - the manual's custom lighting intro makes the same point about stylized rendering. - Each hull outline is an extra draw call per object. - Screen-space edges need a **normals** pre-pass and a **depth** texture plus a full-screen pass; on Meta Quest this is expensive (see [[5.Quest 2 Performance and Rendering]]). ## Exercise Write a one-page toon style sheet for your project: bands, shadow hue, which objects get which outline rank, reserved colors. Do the squint test on a gray-box screenshot ([[ProBuilder Gray-Boxing and Landmarks]]) and mark the three things that must stand out. ## Sources - Introduction to custom lighting in URP (6000.5): https://docs.unity.com/en-us/engine/6000.5/manual/lighting-overview/lighting/custom-lighting/introduction - Custom Lighting templates, "Custom Lighting Toon" (Shader Graph 17.5): https://docs.unity3d.com/Packages/[email protected]/manual/Shader-Graph-Sample-Custom-Lighting-Templates.html - *Level Up!*, Levels 5, 8, 9 (see [[Level Up! (Review)]])