Back to Node List

Lens Warp

lens_warp

Parametric lens distortion: bulge or pinch around a center, or twirl. Animate the strength for squash-and-stretch effects

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
変形後の画像です

Parameters

NameTypeDefaultRangeDescription / Options
モード
mode
Enum
Bulge

変形の種類です

  • 膨張・収縮Bulge
    強さが正で中心が膨らみ、負でつまんだように縮みます
  • ねじりTwirl
    中心ほど強く渦を巻きます。強さの符号で回転方向が変わります
強さ
strength
Float
0-1–1 / step 0.01

変形の強さです。0で変化なし。ポート化して波形で駆動すると「ぷにぷに」した演出になります

中心X
center_x
Float
0.50–1 / step 0.01

変形中心のX位置です(画像幅に対する0〜1)

中心Y
center_y
Float
0.50–1 / step 0.01

変形中心のY位置です(画像高さに対する0〜1)

半径
radius
Float
0.50.05–4 / step 0.01

効果範囲の半径です(画像の短辺に対する倍率)。範囲外のピクセルは変化しません

方式
sampling
Enum
Nearest

変形の品質です

  • そのまま変形Nearest
    最近傍サンプリングです。ドット絵らしいゴロッとした変形になります
  • RotSprite(きれい)RotSprite
    Scale2xで8倍に拡大してから変形し、多数決で縮小します。輪郭が滑らかになります

Overview

A parametric lens deformation controlled only by center, radius, and strength. It creates bulging, pinching, or twisting without a displacement-map image, and its strength can be driven directly by animation.

Usage tips

  • For a soft wobble, promote Strength and drive it with expression_float, for example sin(time * pi * 2) * 0.3, then pass the result to animation_render.
  • Positive Strength bulges and negative Strength pinches. Radius is relative to the shorter image dimension; the default 0.5 affects an area fitting within half the image.
  • Pixels outside the radius are completely unchanged, making it easy to deform only a face or another local feature by moving Center X/Y.
  • Nearest is the default for chunky pixel-art deformation. Select RotSprite only when a smoother outline is more important.

Common mistakes

  • Strength 1.0 is weaker than expected: effective strength is limited to ±0.95 to avoid foldover. Chain two nodes only when a stronger result is truly required.
  • A custom-shaped warp is needed: use displace or directional_warp; this node is intentionally limited to a circular lens.

Related nodes

  • displace / directional_warp — image-map-driven freeform warping
  • expression_float / time_source — animate Strength with a sine wave or other signal
  • region_warp — deform Region boundaries
Back to Node List
Lens Warp — PixPipeline Node Reference