Studio Yotsuba
Back to Node List

Quick Shade

quick_shade

Adds light and shadow to a sprite in one node. Estimates volume from the silhouette, so no height or normal maps are needed.

Reviewed
Guide available

Input Ports

NameTypeDescription
Image
input
Image
Required
Sprite to shade.

Output Ports

NameTypeDescription
Image
output
Image
Shaded image.
Height
height
Image
Height map estimated from the silhouette. Connect to Image to Surface for finer control.

Parameters

NameTypeDefaultRangeDescription / Options
Light Angle
angle
Angle
315— / step 1

Direction the light comes from. 315 is upper-left.

Light Height
elevation
Angle
45— / step 1

Vertical orbit angle of the light. 0 is horizontal from the light angle side, 90 is overhead, 180 is horizontal from the opposite side, and 270 is below/back.

Light Strength
intensity
Float
0.850–2 / step 0.01

Strength of the directional light.

Base Brightness
ambient
Float
0.350–1 / step 0.01

Brightness kept on the side facing away from the light.

Volume Shape
volume
Enum
Round—

How the sprite swells from its outline.

  • RoundRound
    Rounded like a balloon. Good for characters and soft objects.
  • SharpSharp
    Rises straight like a cone. Good for crystals and spikes.
  • FlatFlat
    Flat top with rounded edges. Good for bricks and boxes.
Volume Strength
height_strength
Float
20–8 / step 0.1

How strongly the estimated volume bends the light.

Shading Style
shading_style
Enum
Steps2—

Whether the shading is banded like pixel art or smooth.

  • Steps2Steps2
    Two-step banded shading. A classic pixel-art look.
  • Steps3Steps3
    Three-step banded shading for larger sprites.
  • SmoothSmooth
    Smooth gradient shading without banding.
Light Color
light_color
Color
[1,0.9599999785423279,0.8799999952316284,1]—

Tint of the light. Warm for sunlight, blue for moonlight.

Lighting Settings
lighting_definition_mode
Enum
Custom—

Choose whether the shading colors come from this node's style or a saved lighting definition. Definitions keep quick shade consistent with Surface Light Preview nodes using the same definition.

  • CustomCustom
    Use the shading style set on this node.
  • DefinitionDefinition
    Use a saved Surface Lighting definition for shading colors. Editing the definition updates every node that references it.
Lighting Definition ID
lighting_definition_id
Text
core:pixel_basic—

Saved Surface Lighting definition used by this node. Palette-based modes work only when the definition carries an embedded palette (this node has no palette input).

Overview

A beginner shading node that adds light and shadow to flat-color pixel art with one node. It needs no height map or normals, inferring a volume automatically from the silhouette. This is the shortest route when you want to try depth or quickly shade batch-produced assets.

Usage tips

  • Start with only 画像 → かんたん陰影. The defaults—upper-left light and crisp two-step shading—produce a pixel-art-friendly result.
  • Choose volume by subject: character or slime → Round; crystal or spike → Sharp; brick or tile → Flat.
  • Choose shading steps by asset size: 16–32px → Steps2; 48px or larger → Steps3. Smooth looks less like pixel art and is best reserved for effects.
  • Bind 光の向き to a variable to change the light direction for every asset in a scene together.
  • There is an upgrade path when you need more: connect the height output to image_to_surface to move into the full Surface path with lighting definitions and palette snapping.

Common pitfalls

  • Internal details receive no shadow: because depth is inferred from the silhouette, steps inside the artwork are not treated as geometry (see "Limitations"). Use the Surface path when internal relief matters.
  • The image is too bright or blown out: lower intensity or balance it against ambient, the minimum brightness retained on the shadow side.
  • Light comes from an unexpected direction: angle 315 is upper left, the pixel-art standard. At elevation 90, light is directly overhead and direction has no visible effect.

Technical details

Internally this thin wrapper uses existing shared infrastructure in three steps:

  1. pxn_core::height_field::height_from_silhouette() — estimate a height map from an alpha-silhouette distance transform
  2. Wrap the estimated height in a SurfaceDocument
  3. surface::render_surface_light() — light it with the same renderer as サーフェース光プレビュー
  • Steps2/Steps3 in shading_style quantize diffuse light through SurfaceLightSettings::diffuse_steps and also apply OKLCH stepped tones.
  • Cast shadows are disabled because silhouette-derived height tends to make them noisy.
  • angle has the same meaning as in サーフェース光プレビュー: 315 = light from upper left.

Examples

  • 画像読み込み → かんたん陰影 alone adds depth to a sprite.
  • Bind 光の向き to a variable to change the light direction of several sprites together.
  • For finer control, connect the height output to 画像からサーフェース, then use lighting definitions and palette snapping in サーフェース光プレビュー.

Limitations

Because volume is inferred from the silhouette alone, internal steps such as a recessed window are not reflected. In that case, use the Surface path with luminance mode in 画像から高さマップ or a hand-drawn height map.

Related nodes

  • height_from_image — estimate height separately for finer control
  • image_to_surface + surface_light_preview — upgrade to full lighting
  • drop_shadow — when you need a cast shadow rather than volume
  • gradient_map — the traditional approach of painting shading yourself
Back to Node List