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
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
画像
input
Image
Required
光と影をつけたい画像です。

Output Ports

NameTypeDescription
画像
output
Image
光と影がついた画像です。
高さ
height
Image
シルエットから推定した高さマップです。細かく調整したくなったら「画像からサーフェース」の高さ入力につなぐと、Surface 経路へ移行できます。

Parameters

NameTypeDefaultRangeDescription / Options
光の向き
angle
Angle
315— / step 1

光がどの方向から来るかです。315度は左上からの光です。

光の高さ
elevation
Angle
45— / step 1

光源の縦方向の軌道角です。0は光の向き側の水平、90は真上、180は反対側の水平、270は下/裏側から照らします。

光の強さ
intensity
Float
0.850–2 / step 0.01

光の強さです。

最低の明るさ
ambient
Float
0.350–1 / step 0.01

光が当たりにくい側にも残す最低限の明るさです。

立体の形
volume
Enum
Round

シルエットからどんな立体を推定するかです。

  • 丸いRound
    風船のように丸く膨らんだ立体として扱います。キャラクターや柔らかい物に向きます。
  • とがるSharp
    円錐のように直線的にとがった立体として扱います。結晶やトゲに向きます。
  • 平らな天面Flat
    縁は丸く、中心は平らな立体として扱います。レンガや箱に向きます。
立体感の強さ
height_strength
Float
20–8 / step 0.1

推定した立体がどれだけ強く光に影響するかです。

陰影の段階
shading_style
Enum
Steps2

陰影をドット絵らしい段階に区切るか、なめらかにするかです。

  • くっきり2段Steps2
    影とハイライトを2段階に区切ります。定番のドット絵らしい仕上がりです。
  • くっきり3段Steps3
    3段階に区切ります。大きめのスプライト向きです。
  • なめらかSmooth
    段階に区切らず、なめらかなグラデーションで陰影をつけます。
光の色
light_color
Color
[1,0.9599999785423279,0.8799999952316284,1]

光の色です。夕日なら暖色、月明かりなら青にします。

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
Quick Shade — PixPipeline Node Reference