Studio Yotsuba
Back to Node List

Surface Composite

surface_composite

Places one Surface over another and composites color, maps, material IDs, and face IDs together.

Reviewed
Guide available

Input Ports

NameTypeDescription
Base
base
Surface
Required
Surface used as the background.
Overlay
overlay
Surface
Required
Surface placed over the base.
Mask
mask
Image
Optional mask that limits where the overlay is applied.

Output Ports

NameTypeDescription
Surface
surface
Surface
Composited Surface.
Preview
preview
Image
Albedo preview image.

Parameters

NameTypeDefaultRangeDescription / Options
Blend Mode
mode
Enum
Normal—

How the visible color of the overlay is blended.

  • NormalNormal
    Place overlay color normally.
  • MultiplyMultiply
    Darken the base using the overlay.
  • ScreenScreen
    Brighten the base using the overlay.
  • OverlayOverlay
    Increase contrast using the overlay.
  • AddAdd
    Add overlay color to the base.
  • SubtractSubtract
    Subtracts the blend color — darkens toward black
  • DifferenceDifference
    Absolute difference of the two colors
  • DarkenDarken
    Keeps the darker color per channel
  • LightenLighten
    Keeps the lighter color per channel
  • SoftLightSoftLight
    Gentle contrast — soft shading and tinting
  • HardLightHardLight
    Strong contrast — like a harsh spotlight
  • ColorDodgeColorDodge
    Brightens the base toward the blend color
  • ColorBurnColorBurn
    Darkens the base toward the blend color
Opacity
opacity
Float
10–1 / step 0.01

Overall strength of the overlay.

Offset X
offset_x
Int
0-4096–4096

Horizontal placement of the overlay in pixels.

Offset Y
offset_y
Int
0-4096–4096

Vertical placement of the overlay in pixels.

Front/Back Rule
order_mode
Enum
LayerOrder—

Choose fixed layer order, verified renderer depth, or explicit manual remapping.

  • LayerOrderLayerOrder
    Always place the overlay over the base. This preserves existing projects.
  • ContractDepthContractDepth
    Compare world-view depth from compatible Solid or Model renders.
  • ManualDepthManualDepth
    Map each depth or height image into a shared comparison range.
Base Depth Source
base_depth_source
Enum
DepthMap—

Choose the base map used for manual front/back comparison.

  • DepthMapDepthMap
    Use the Surface depth map. White is in front.
  • HeightMapHeightMap
    Use relative height as an explicitly remapped depth source.
Overlay Depth Source
overlay_depth_source
Enum
DepthMap—

Choose the overlay map used for manual front/back comparison.

  • DepthMapDepthMap
    Use the Surface depth map. White is in front.
  • HeightMapHeightMap
    Use relative height as an explicitly remapped depth source.
Base Depth Scale
base_depth_scale
Float
1-4096–4096 / step 0.01

Distance represented from black to white in the shared manual range.

Base Depth Baseline
base_depth_offset
Float
0-4096–4096 / step 0.01

Shared comparison value assigned to black in the base map.

Overlay Depth Scale
overlay_depth_scale
Float
1-4096–4096 / step 0.01

Distance represented from black to white in the overlay map.

Overlay Depth Baseline
overlay_depth_offset
Float
0-4096–4096 / step 0.01

Shared comparison value assigned to black in the overlay map.

Overlay Depth Bias
depth_bias
Float
0-4096–4096 / step 0.001

Move the whole overlay forward or backward after depth conversion.

Equal Depth Tolerance
depth_tolerance
Float
00–4096 / step 0.001

Treat tiny depth differences as a tie; ties keep the overlay in front.

Depth Edge Feather
depth_feather
Float
00–4096 / step 0.001

Blend continuous maps only near a depth crossing. Zero keeps pixel-hard boundaries.

Map Policy
map_policy
Enum
AllMaps—

Choose whether maps other than visible color are also composited in Layer Order mode. Depth modes always keep the full G-buffer together.

  • AllMapsAllMaps
    Composite all Surface maps.
  • AlbedoOnlyAlbedoOnly
    Composite only visible color.
Height Mode
height_mode
Enum
OverlayMap—

Choose how the overlay changes the height map.

  • OverlayMapOverlayMap
    Blend the overlay height map like the other maps.
  • RaisedRaised
    Make the visible overlay area higher than the base.
  • AddAdd
    Add overlay height to the base height.
  • MaxMax
    Use whichever height is higher at each pixel.
Height Offset
height_offset
Float
0-1–1 / step 0.01

Extra height added to the overlay area before it is written into the result.

Overlay Height Scale
overlay_height_scale
Float
10–4 / step 0.01

Strength of the overlay height map when height compositing is used.

Rebuild Normal From Height
rebuild_normal_from_height
Bool
false—

Replace the normal map with one derived from the composited height map.

ID Policy
id_policy
Enum
OverlayVisible—

Choose how material IDs and face IDs are composited in Layer Order mode.

  • OverlayVisibleOverlayVisible
    Use overlay material and face IDs where the overlay is visible.
  • KeepBaseKeepBase
    Keep base material and face IDs.
Mask Source
mask_source
Enum
Alpha—

Choose which value of the mask controls the overlay.

  • AlphaAlpha
    Use opacity as the mask.
  • LuminanceLuminance
    Use brightness as the mask.
  • RedRed
    Use the red channel as the mask.
  • GreenGreen
    Use the green channel as the mask.
  • BlueBlue
    Use the blue channel as the mask.
Wrap X
wrap_x
Bool
false—

Read the overlay as wrapping left and right.

Wrap Y
wrap_y
Bool
false—

Read the overlay as wrapping top and bottom.

Overview

Combines two Surface values into one Surface.

It composites not only the image but also height, normals, emission, roughness, material IDs, and face IDs. Use it to place grime over a floor Surface, metal parts on a wall, or another face part onto part of an isometric face.

Output dimensions always match base. Position overlay with offset_x / offset_y.

Usage tips

  • This is the Surface equivalent of image blend. Composite parts before lighting; combining already-lit images breaks lighting consistency.
  • Height handling is key. Use height_mode to choose whether the part sits above the base and determine whether it protrudes or sinks in.
  • Turn rebuild_normal_from_height ON after compositing to rebuild normals across the step for more natural lighting.
  • Inspect the result by switching submap previews such as H for height and N for normals.

Common pitfalls

  • The overlay does not rise under lighting: its height was not raised through height_mode/offset, or normals were not rebuilt. It may overlap visually, but lighting reads height and normals.
  • overlay is clipped: output dimensions always follow base. offset positions the overlay, and overflow is cropped.

Examples

  • Use a floor Surface from Grid Pattern as base, then overlay a grime or puddle Surface.
  • Place a small metal-part Surface over a wall from Surface Plane, using id_policy=OverlayVisible to include its metal ID.
  • When attaching a window frame to a wall, use height_mode=下地より高くする, height_offset=0.05〜0.15, and rebuild_normal_from_height=ON. Strengthen cast shadows in Surface Light Preview to make the frame appear slightly raised.
  • For a flat sticker-like overlay, use map_policy=AlbedoOnly and id_policy=KeepBase.
  • Turn wrap_x or wrap_y ON to composite across an edge in a tileable asset.

How to check the result

  1. Create two Image to Surface nodes and connect one to base, the other to overlay.
  2. Change offset_x / offset_y and confirm that the overlap position moves.
  3. Switch the Surface preview among A, H, ID, and F, confirming that maps and IDs overlap in the same place as the visible image.
  4. Set height_mode=下地より高くする and height_offset=0.1, then check in the H preview that only the overlay becomes brighter.
  5. Set rebuild_normal_from_height=ON and check for color changes at the raised edge in the N preview.
  6. Connect Surface Light Preview and confirm that the composite behaves as a Surface containing emission, normals, and face IDs.

Related nodes

  • blend — composite ordinary images when a Surface is unnecessary
  • surface_light_preview — light the composite result
  • surface_rebuild_normal — rebuild normals as a separate operation
  • surface_set_map — replace individual submaps
Back to Node List