- Python 100%
| .gitignore | ||
| LICENSE | ||
| README.md | ||
| skin_lab.py | ||
Skin Lab
Procedural areola/nipple + satin lipstick + anus + cavity depth + goth skin-tone control for avatars in Blender.
Point Skin Lab at a body mesh and it detects each breast tip and paints a proper procedural areola — a darker nipple core → areola ring → feathered into the skin — overlaid on whatever skin material is already there (MPFB procedural skin, a plain Principled, anything). Colours, sizes and placement are sliders, and it plays nicely with an MPFB v2 skin for base-tone recolouring.
It also paints satin lipstick on the lip region — a clear-coated makeup shader masked to the lips and mixed onto the skin, goth black by default, with gloss / sheen / metallic sliders. It builds a procedural anus — a clean dusty-pink pucker (soft opening + radial sphincter folds + pigment that fades into the skin), auto-placed deform-aware in the cleft via a tangent-plane decal projection. And it fakes cavity depth — darkening concavities (nostrils, ear canals, eye corners, folds) via occlusion so shallow features read as recessed with no geometry change. The areola, lipstick, anus and cavity layers compose in any order and each can be built or removed on its own.
Why it exists
MPFB's built-in areola is a flat one-colour disc from a plain mask texture (no nipple/areola detail), and it's pinned to the undeformed base mesh — so on a morph-shaped avatar (Big Bust, etc.) it drifts off the actual breast tip. Skin Lab fixes both:
- Real two-tone detail — nipple core, areola, feathered edge, per-breast colour.
- Deform-aware placement — it detects the tip on the evaluated (shape-keyed)
mesh and places the areola in deformed space (
Geometry > Position), so it lands on the real breast tip no matter how the morphs reshape the body.
The lesson this plugin encodes: any procedural feature placed on a shape-key/morph-deformed avatar must use
Geometry > Position, neverTexCoord > Object/Generated(those are undeformed base coords and will drift).
What it does
- Detect nipples. Reads the deformed mesh, splits by side, finds each breast's forward-most tip. The breast search band is derived from the mesh bounding box, so it scales to any avatar. A default areola size is derived from the detected breast scale.
- Areola & Nipple. Procedural two-tone (nipple core → areola → feather) mixed over the existing skin with a Mix Shader at the surface output — works whether the skin is a single Principled or a complex MPFB shader network (no top-level Base Color needed). Controls: areola colour, nipple colour, areola size, nipple ratio, and out/up placement nudges.
- Lipstick. Satin makeup on the lip region — a Principled shader (base colour +
clear-coat sheen) masked to the lips and mixed over the skin with its own Mix Shader.
The mask is MPFB's own lip-region mask (
NodeWrapperMpfbSystemValueTextureLips) — the exact mask the MPFB body-sections router uses to route the lip shader — so it's region-perfect and rides the deformed mesh (no drift on morph-shaped avatars). Goth black by default; colour, gloss (roughness), sheen (coat), and metallic are sliders. When an MPFB v2 skin is present, the underlying lip tint is matched to the lipstick so the feathered mask edge blends to lipstick, not skin. Needs an MPFB v2 skin's lip mask — on a plain skin there's no lip region to mask to. - Anus. A procedural anus mixed onto the skin — a clean dusty-pink pucker: a soft
central opening, radial sphincter folds, and pigment that fades into the surrounding
skin (a darker centre + lighter edge are derived from the one colour; no white rim, no
black hole). It auto-detects the midline/perineum on the deformed mesh and uses a
tangent-plane (decal) projection from the surface normal so the pattern lands
undistorted across the cleft's saddle (a flat X-Z / 3D distance warps it). A front-face
reveal gate keeps it subtle in the closed pose and strengthens it as the area opens/
spreads (Reveal Lo/Hi), and Strength caps overall opacity so it blends. Size, opening,
folds, pucker, and Nudge Up/Depth are exposed.
Base-mesh caveat: a MakeHuman/MPFB cleft is a shallow crease with no real anus geometry, so at extreme close angles the disc can still read pinched. For a crisp round result, sculpt a small recess; a cheek-spread shapekey gives true "only shows when spread" behaviour. The shader gets it clean and subtle; geometry makes it perfect.
- Cavity depth. Fakes recess on shallow features — an Ambient-Occlusion-driven dark layer darkens concavities so they read as recessed with no geometry change. It's multi-scale: a tight AO pass catches small crevices (nostrils, ear canals, eye corners — nearly flat on a MakeHuman/MPFB mesh and otherwise painted-looking) and an optional broad AO pass (combined via MAX) catches wide valleys a single tight pass misses — the gluteal cleft, cleavage, underboob, the under-cheek fold. Strength / distance / sharpness / broad amount + distance / colour are sliders. Occlusion-based, so it targets the deepest concavities automatically, and it bakes into the albedo so the depth survives export.
- Skin Tone (optional, MPFB v2 skin). Recolours the base skin tone
(
MpfbSkinMasterColor) — goth-porcelain by default — and tints MPFB's flat aureolae disc to skin so the Skin Lab areola is the only one showing. - Compose safely. Areola and lipstick are independent Mix-Shader layers spliced onto the surface output. Either can be rebuilt or removed from the middle of the chain without breaking the other (generic splice-in / splice-out, order-independent).
- Bake to texture (Unity/VRChat). Bakes the composed skin (MPFB skin + areola + lipstick) to a flat albedo image so it survives FBX export. Order-agnostic: bake onto the existing UV (optimize-then-bake — e.g. after a CATS atlas) or generate a fresh UV (bake-then-optimize). Non-destructive — the procedural material is kept untouched (a temp image node is added then removed), so you can keep iterating and re-bake. Optionally builds a flat Principled "baked" material that's engine-ready.
- Remove. Cleanly strips either overlay and reconnects the shader below it.
Quick start
Open the Skin Lab tab in the 3D View sidebar (N):
- Setup — select the body mesh (or leave blank to auto-pick), click Detect Nipples.
- Areola & Nipple — set Areola / Nipple colours and Areola Size / Nipple Size, then Build / Update Areolae. Use the Nudge Out/Up sliders if a tip needs a small correction, and rebuild.
- Lipstick — pick a Lipstick colour and set Gloss / Sheen / Metallic, then Apply Lipstick (needs an MPFB v2 skin's lip mask). Remove Lipstick strips it.
- Anus Detail — set Anus colour / Size / Opening / Folds / Pucker, then Apply Anus. If placement needs a tweak, adjust Nudge Up / Depth and re-apply.
- Cavity Depth — set Strength / Distance / Sharpness (and Cavity colour), plus Broad (+ Broad Distance) to darken wide valleys like the gluteal cleft, then Apply Cavity Depth. It darkens nostrils, ear canals, the cleft and folds.
- (Optional) Skin Tone — pick a base tone and Apply Skin Tone (needs an MPFB v2 skin).
- (Export) Bake — pick a UV mode (Existing = optimize→bake, New = bake→optimize), a Resolution, and whether to Build baked material, then Bake Skin To Texture.
Controls
| Control | Default | Meaning |
|---|---|---|
| Areola / Nipple | dusty rose / deep rose | Areola and nipple-core colours |
| Areola Size | auto (~breast scale × 0.45) | Areola radius in metres |
| Nipple Size | 0.32 | Nipple core radius as a fraction of the areola |
| Nudge Out / Up | 0 | Move areolae out/in and up/down (fraction of breast scale) |
| Lipstick | goth black | Lipstick colour |
| Gloss | 0.30 | Lipstick roughness — lower = wetter/glossier, higher = matte |
| Sheen | 0.55 | Clear-coat sheen — the wet makeup highlight that reads as lipstick |
| Metallic | 0.0 | Metallic lipstick (vinyl/latex look); 0 = classic |
| Anus colour | dusty pink | Pigment; darker centre + lighter skin-blending edge derived from it |
| Anus Size | 0.013 | Anus radius (m) |
| Anus Opening | 0.27 | Soft central opening as a fraction of size |
| Anus Folds | 16 | Number of radial sphincter folds |
| Anus Pucker | 0.6 | Radial fold-wrinkle strength |
| Anus Strength | 0.85 | Overall opacity (lower = more skin shows through) |
| Anus Reveal Lo / Hi | 0.35 / 0.8 | Front-face gate — subtle when closed, full when spread/open |
| Anus Nudge Up / Depth | 0.011 / 0 | Move it along / in-out of the cleft (m); rebuild after |
| Cavity Strength | 1.4 | How dark the crevices get (depth illusion) |
| Cavity Distance | 0.05 | Tight-pass occlusion sample distance (m) — small crevices (nostrils, ears) |
| Cavity Sharpness | 2.0 | Bias toward the deepest cavities |
| Broad | 0.75 | Darken wide valleys too (gluteal cleft, cleavage, underboob); 0 = tight only |
| Broad Distance | 0.20 | Broad-pass occlusion sample distance (m) — reaches across wide valleys |
| Cavity colour | near-black | Colour of the deep-cavity shading |
| Skin Tone | natural warm-fair | Base skin colour for an MPFB v2 skin (porcelain read too white under light+AgX) |
| Bake UV | Existing UV | Bake onto the current UV (optimize→bake) or generate a fresh one (bake→optimize) |
| Bake Resolution | 2048 | Baked texture size (square) |
| Build baked material | on | Also make a flat Principled material from the baked image (engine-ready) |
Installation
Single-file, drop-in add-on.
- Blender 2.93+: Edit → Preferences → Add-ons (or Extensions on 4.2+) → Install…
- Select
skin_lab.pyand enable Skin Lab. - Open the Skin Lab panel in the 3D View sidebar (
N).
Blender version support
Requires Blender 2.93 or newer (bl_info minimum (2, 93, 0)). Register + detect +
build (areola + lipstick + anus + multi-scale cavity) + remove + bake runtime-verified
on Blender 2.93.0 and 5.1.2, and dogfooded on a real MPFB/MakeHuman avatar (including a
live Cycles bake of the composed skin onto the body UV). The Ambient Occlusion node used for the
tight + broad cavity passes is present across 2.93 → 5.x (renders in EEVEE and Cycles). Principled socket renames
(Specular / Subsurface / Coat) are resolved by name with legacy fallbacks; only nodes
present across 2.93 → 5.x are used.
Unity / VRChat export
The overlays are procedural — use the Bake panel before FBX export. It bakes the composed skin (skin + areola + lipstick) to a flat albedo image, either onto the existing UV (optimize-then-bake) or a freshly generated one (bake-then-optimize), and can build a flat engine-ready material from it. The bake is non-destructive, so the procedural setup stays live for further iterations.
Part of the Unity AI Lab Blender suite
Skin Lab is one of the Unity AI Lab Blender plugins. Each tool is standalone — no hard dependencies — but built to interoperate cleanly with its siblings:
- MPFB — recognises the MPFB Basemesh when auto-picking, and the Skin Tone panel recolours an MPFB v2 skin.
- Iris Lab — sibling procedural-eyes plugin; same deform-aware, avatar-first approach.
- Deform Doctor / Jiggle Lab / Cats Blender Expanded / Texturly — detected and surfaced; Skin Lab only touches the body's own skin material.
Conflict-proofing is by design: own skinlab.* operator namespace, SKINLAB_* classes,
scene.skin_lab property, "Skin Lab" sidebar tab, and an SL_ node-name prefix.
The suite is developed on the lab's self-hosted Forgejo host:
git@git.unityailab.com:UnityAILab/blender-skin-lab.git
License
GNU General Public License v3.0 or later (GPL-3.0-or-later). © Unity AI Lab.