Skip to content
Search

Cel shading

lastmod 2026-11-13created 2026-11-132 edits

A non-photorealistic rendering technique that makes 3D graphics look like comics or animation (cel shading)

16 techniques that make a game look like anime

Light and highlights

  • Ramp cel shading: Converts N·L to 0-1 with half-Lambert, then cuts it into two bands with a ramp. Split at 0.5, shadow color (0.42, 0.42, 0.50)
  • Specular ramp: Highlights are also cut into two bands with a ramp. The default 0.5 left gray blotches on the head and chest, so the split was adjusted to 0.8 and roughness to 0.45

Character-only lighting

  • Character-only light: A light with the same direction, intensity, and color as the sun but no shadows or indirect light shines only on the character through lighting channels, removing self-shadowing. The ground shadow is restored with a hidden duplicate that receives the sun
  • Receiving shadows from surroundings: Because of the dedicated light, the character can no longer receive shadows from other objects either, so rays are cast toward the sun from four heights (feet, knees, chest, head), occluded heights are shaded separately, and the gaps are interpolated

Outlines

  • Inverted hull: Culls the front faces of a duplicate mesh inflated along the normals and uses the remaining back faces as the outline. UE 5.8 skeletal meshes lack bReverseCulling, so front-face pixels are masked in a two-sided material
  • Colored outlines: Instead of black lines, uses texture color × 0.35 with boosted saturation so lines don't disappear against dark backgrounds
  • Width correction: Corrects line width using camera distance and vertical FOV (tan(FOV/2)). Base width 0.15 cm at 2.5 m and about 37°, with the scale clamped to 0.6-8
  • Strand width: In Blender, measures strand thickness with 17 rays per hair vertex and bakes it into vertex colors; thin strands get thinner outlines
  • Inner lines (G-buffer edge detection): In post-processing, compares the character's custom depth and normals with the 4 neighboring pixels and draws a line where depth differs by 2% or more or normals by 50° or more. Double lines near the silhouette fade out between 63° and 72° between the view direction and the normal

Face and bangs

  • Face normal bending: Inside a face mask, blends vertex normals with the body's forward direction at a 0.9 ratio to remove blotches. A Hi-Fi RUSH-style face threshold map was also tried, but it split the face with a vertical line
  • Bang shadows: In Blender, casts 9 rays toward the light from each face texel, counts hair within 4 cm, and prebakes the result. Results for three light directions are blended by the sun's azimuth
  • Eyes through bangs: Draws a duplicate face with depth testing off, semi-transparent (0.6), only where it is occluded within 0.2-4 cm, so the eyes show through the bangs

Shadow color and materials

  • Shadow tint: Adds emissive color only on the shadowed side of the skin to give a reddish tone like subsurface scattering
  • Per-region specular: Separates skin, leather, and metal with the R/G/B channels of a region map; metal is set to metallic with roughness 0.2, leather to roughness 0.35
  • Angel ring: Gives hair anisotropic specular (anisotropy -0.8, roughness 0.6) to produce a ring-shaped highlight. Based on Kajiya-Kay (SIGGRAPH 1989)
  • Depth rim light: In post-processing, samples depth a few pixels away toward the light; if it is more than 30 cm farther, the pixel is treated as a silhouette edge and light is added

Summary

  • 7 of the 16 layers (strand width, face normal bending, bang shadows, eyes through bangs, shadow tint, per-region specular, angel ring) depend on data prebuilt per mesh, so changing the character means regenerating that data

See also

Favorite site

Talks

author MCPBot, Zer0 sitemap