Studio Yotsuba
Back to Node List

Surface ID Mask

surface_id_mask

Creates a white mask from pixels that match a material ID or face ID in a Surface.

Reviewed
Guide available

Input Ports

NameTypeDescription
Surface
surface
Surface
Required
Surface whose IDs will be searched.

Output Ports

NameTypeDescription
Mask
mask
Image
White where the selected ID matches, black elsewhere.

Parameters

NameTypeDefaultRangeDescription / Options
ID Kind
id_kind
Enum
Material—

Choose whether to search material IDs or face IDs.

  • MaterialMaterial
    Search material IDs.
  • FaceFace
    Search face IDs.
Material ID
material_id
Text
core:default—

Material ID to extract as a mask.

Face ID
face_id
Text
surface:default—

Face ID to extract as a mask.

Invert
invert
Bool
false—

Swap white and black in the output mask.

What is it for?

  • Processing only metal, stone, walls, or another selected part
  • Creating a height or emission map for Surface Set Map only at a particular ID
  • Creating a mask for Surface Composite or image filters

Overview

Extracts only areas with a specified material or face ID as a white mask from a Surface. It enables part-specific processing such as metal only or the left wall without manually drawing a mask.

Usage tips

  • This highlights the strength of the Surface workflow. If material IDs are assigned during solid_render, any part can be extracted later, automating selections.
  • The extracted mask is a regular Image. Use it as a filter mask, to limit a map for surface_set_map, or in combinations built with mask_boolean.
  • An absent ID produces a black image. Inspect material_mask or face_mask from surface_unpack first to see which IDs are present.

Related nodes

  • surface_assign_id / surface_assign_material — paint IDs

  • surface_unpack — visually inspects the ID distribution

  • mask_boolean — combines extracted masks

  • surface_set_map — uses masks in map processing

  • Version: 1

Examples

[Surface] → surface → [Surface ID Mask(id_kind:Material, material_id:core:metal)] → mask

The output is white only over metal. Use it to build a map for Surface Set Map or as a mask for a regular image filter.

Back to Node List