Studio Yotsuba
Back to Node List

Shape

shape_generate

Generates basic shapes as an image, reusable path, and optional surface

Reviewed
Guide available

Input Ports

NameTypeDescription
Fill Color
fill_color
Color
Fill color override
Stroke Color
stroke_color
Color
Stroke color override

Output Ports

NameTypeDescription
Image
output
Image
Generated shape image
Path
path
Path
Generated shape path
Surface
surface
Surface
Generated shape as a Surface with height, material ID, and face ID.

Parameters

NameTypeDefaultRangeDescription / Options
Shape
shape
Enum
Rectangle—

Shape type to generate

  • RectangleRectangle
  • CircleCircle
  • EllipseEllipse
  • TriangleTriangle
  • DiamondDiamond
Width
width
Int
641–1024

Canvas width in pixels

Height
height
Int
641–1024

Canvas height in pixels

Filled
filled
Bool
true—

Whether to fill the shape

Fill Color
fill_color
Color
[1,1,1,1]—

Fill color

Stroke Width
stroke_width
Int
00–64

Stroke width in pixels (0 = none)

Stroke Color
stroke_color
Color
[0,0,0,1]—

Stroke color

Material ID
material_id
Text
core:default—

Material assigned to visible pixels in the Surface output.

Face ID
face_id
Text
surface:shape—

Face label assigned to visible pixels in the Surface output.

Surface Height
surface_height
Float
0.550–1 / step 0.01

Height value written where the shape exists.

AO
surface_ao
Float
0.960–1 / step 0.01

Ambient shadow value for the shape. Lower values look darker.

Roughness
surface_roughness
Float
0.750–1 / step 0.01

How matte the shape is when lit. Higher values reduce sharp shine.

Overview

The shortest route to parameter-generated rectangles, circles, ellipses, triangles, and diamonds. Standard shapes are faster here than drawing paths by hand, and this node uniquely outputs the same shape simultaneously as an image, path, and Surface. One node can supply a mask, UI part, and lighting base.

Usage tips

  • The default white shape works directly as a mask. Connect it to mask inputs such as path_mask or blend_by_mask.
  • For only an edge, use filled = false + stroke_width ≥ 1, useful for UI frames and selectors.
  • To move or arrange shapes, pass the path output to path_transform / path_array instead of using the image output; the vector path does not degrade.
  • To try pixel-art gloss or depth, connect surface → surface_light_preview. Increasing surface_height creates an elevation difference at the edge.

Common pitfalls

  • The shape overflows or no longer matches the canvas: the node receives canvas dimensions in 幅 and 高さ when added, but they become independent afterward. Update them when the canvas changes.
  • The background looks black: output has a transparent background; black comes from preview settings. To add a background, composite it over solid_color with blend.
  • No border appears: stroke_width = 0 is still the default. Raise it to at least 1.
  • Even stroke_width values such as 2 and 4 render at the requested pixel width, using a half-pixel right/down center bias.

Notes

  • output is an image with a transparent background.
  • path can be reused by PathMask, Path Transform, Shape Sweep, and similar nodes.
  • surface treats transparent pixels as background and writes material ID, face ID, and height only where the shape exists.
  • Surface parameters are collapsed under "Surface" in the inspector.
  • Immediately after adding the node from the editor, 幅 and 高さ receive the current canvas dimensions.
  • Afterward, 幅 and 高さ are not locked to the canvas and can be changed independently.
  • With filled = false, the interior is not filled.
  • With stroke_width = 0, no edge is drawn.

Examples

  1. Create Rectangle and connect it directly to Blend.
    • Quickly create a simple band or panel image.
  2. Create Circle and send its path to Path Transform.
    • Reuse it as a mask with different positions or sizes.
  3. Create Diamond and connect it to PathMask.
    • Make a diamond cutout or UI decoration.
  4. Set stroke_width and disable fill.
    • Create an outline-only shape.
  5. Connect surface to Surface Light Preview.
    • Increase surface_height to create edge relief and adjust its lit appearance.

Related nodes

  • bezier_path — hand-draw a free shape in the editor
  • line_generate — create straight lines or polylines
  • path_transform / path_array — move, rotate, or repeat the path output
  • pixel_line — create a sharply stepped pixel line
Back to Node List