Single entry in a MaterialsPalette's catalog of procedural painters.

Holds the metadata UI code needs to label an entry alongside the painter callable + the SceneMaterial parameter overrides (transparency, colour multiplier) that go with the painter's PBR texture set.

interface PainterCatalogEntry {
    category: "Masonry" | "Interior" | "Metal" | "Glass";
    id: string;
    label: string;
    material?: {
        alphaMode?: "OPAQUE" | "MASK" | "BLEND";
        color?: [number, number, number];
        hatchPattern?: HatchStyle | HatchParams;
        opacity?: number;
    };
    paint: (size: number) => MaterialMaps;
}

Properties

category: "Masonry" | "Interior" | "Metal" | "Glass"

Coarse category — the same four buckets paintMaterials | procgen/paintMaterials groups its painters into: "Masonry", "Interior", "Metal", or "Glass". UI code may render painters grouped by this field.

id: string

Stable, machine-readable id used to look the painter up ("brick", "polSteel", "glass", …). Must be unique within a MaterialsPalette catalog.

label: string

Human-readable label. Used for the context-menu item and other UI surfaces.

material?: {
    alphaMode?: "OPAQUE" | "MASK" | "BLEND";
    color?: [number, number, number];
    hatchPattern?: HatchStyle | HatchParams;
    opacity?: number;
}

Optional non-texture material parameters merged into the generated SceneMaterial. Used for transparent dielectrics (windows, glass) where opacity and alphaMode matter, for the per-category colour multiplier compensating for the diffuse albedo / π term in the Cook-Torrance BRDF, and for tagging the material with an engineering hatch pattern (consumed by the section-plane cap pass and the Detailed-mode hatched body shading — view.effects.bodyHatch).

Type declaration

  • OptionalalphaMode?: "OPAQUE" | "MASK" | "BLEND"
  • Optionalcolor?: [number, number, number]
  • OptionalhatchPattern?: HatchStyle | HatchParams

    ANSI / ISO hatch convention for this painter. Applied to the section-plane cap and (in DetailedRender) overlaid on the body. Realistic mode ignores it and renders PBR.

  • Optionalopacity?: number
paint: (size: number) => MaterialMaps

Painter producing the MaterialMaps triple. Receives the requested texture size in pixels (square).