skin paint

The skin's colour, per vertex, with no engine: the lips and stubble the character builder paints over a body, as numbers an exporter writes out. The skin's material carries one colour (skinAlbedo, from skin-tone's dials); these are RATIOS over it, one per skin vertex, so the drawn colour is material × vertex colour. glTF does exactly that with a vertex colour (COLOR_0 multiplies the base colour), so a character written by skinned-glb with them looks the same in any engine that reads glTF, with no texture to bake.

import { lipTint, stubbleMask, stubbleTint } from 'tosijs-3d/skin-paint'
import { skinAlbedo } from 'tosijs-3d/skin-tone'
const colours = lipTint(skin, lips, tone, redness)              // RGBA per skin vertex
const mask = stubbleMask({ skin: body, normals, vertices: skin.vertices, positions, lips, beard })
stubbleTint(colours, mask, 0.6, skinAlbedo(tone, redness), hairRgb)