Skip to main content

Module material_painter

Module material_painter 

Source
Expand description

Material Painter — click-to-assign material tags on SDF surfaces.

§Overview

The material painter works in SDF space. The user moves a spherical brush over the rendered surface; at each frame the painter samples the SDF gradient to find the surface normal at the brush centre, then stamps a MaterialPatch into the patch list. Patches are stored in paint order; the last patch that covers a given surface point wins.

§Material tags

Tags mirror the eight MaterialTag variants used in apotheosis.rs. Each tag carries full PBR parameters: base colour, metallic, roughness, Fresnel strength (F0), SSS intensity, emission colour and emission strength.

§Real-time preview

MaterialPainter::classify returns the best-matching MaterialTag for any world-space point. The rendering pipeline calls this once per particle to tint its output colour.

Structs§

Brush
The active brush state while painting.
MaterialLibrary
A collection of named materials that can be referenced from node graphs.
MaterialPainter
Top-level material painter state.
MaterialParams
Full PBR parameter set for a material.
MaterialPatch
A single paint stroke on the SDF surface.
MaterialPreset
A named material preset stored in the asset library.
PaintLayer
A named layer of paint patches — like Photoshop layers.

Enums§

MaterialTag
Matches the eight material classifications used in the SDF renderer.
PatchFalloff
How patch influence fades toward the edge.