Overview

Introduction

Installation

Getting Started

Core Features

Influence Modes

Deformation

Refinement & Smoothing

Material Layer System

Modular Character Support

API Reference

Blueprint API

Editor Guide

Asset Editor Overview

Debug Visualization

Resources & Support

Troubleshooting & FAQ

Changelog

Deformation

FleshRing - Deformation Complete Guide

Purpose: This guide covers everything about FleshRing's Deformation system — the two core stages that create flesh compression effects. After reading this page, you'll understand how Tightness pulls vertices inward, how Bulge displaces flesh outward to preserve volume, and how to tune every parameter with confidence.


What is Deformation?

[IMAGE: Before/After comparison — original mesh vs. deformed mesh with Tightness + Bulge applied]

Deformation is FleshRing's core processing pipeline that transforms a static mesh into a realistic flesh compression effect. It consists of two sequential stages:

  1. Tightness — Compresses vertices radially inward toward the Ring axis, simulating the physical pressure of a tight band or ring.
  2. Bulge — Displaces surrounding vertices outward, redistributing the volume lost during compression to create the characteristic "flesh spilling over" effect.

Without Deformation, the mesh remains in its original bind pose. With only Tightness, the mesh compresses but loses volume unnaturally. With both Tightness and Bulge, the result is a physically plausible flesh compression.

No Deformation Tightness Only Tightness + Bulge
Appearance Original mesh Compressed band (volume lost) Compressed band + flesh overflow
Realism — Low High

[IMAGE: Three-way comparison — No Deformation / Tightness Only / Tightness + Bulge side by side]

Key Insight: Deformation defines what deforms. Refinement (covered separately) defines how well it looks.


Deformation Pipeline Overview

Deformation executes in a fixed order. Each stage feeds into the next:

Source Position (Bind Pose)
     |
     v
+-----------------------------+
| 1. Influence Calculation    | <-- Determine WHICH vertices are affected
|    (per Influence Mode)     |       and HOW MUCH (0.0 ~ 1.0)
+-------------+---------------+
              |
              v
+-----------------------------+
| 2. Tightness Pass (GPU)    | <-- Pull vertices radially INWARD
|    + Volume Accumulation    |       + record compression amount
+-------------+---------------+
              |
              v
+-----------------------------+
| 3. Bulge Pass (GPU)        | <-- Push vertices OUTWARD
|    (Volume Redistribution)  |       using accumulated volume
+-------------+---------------+
              |
              v
     Refinement Pipeline (next stage)

Stage Summary

Stage Purpose Default Key Parameter
Influence Define affected region + weight ON Effect Range Mode
Tightness Radial inward compression ON Tightness Strength
Bulge Volume-preserving outward displacement ON Bulge Intensity

Note: The master toggle Enable Deformation controls the entire Tightness + Bulge pipeline. Bulge can be independently disabled via Enable Bulge.


Master Toggle

Enable Deformation

Property Type Default
bEnableDeformation bool true

When to disable:


Stage 1: Tightness

What It Does

Tightness compresses vertices radially inward toward the Ring's center axis. This simulates the physical effect of a tight band pressing into flesh — the mesh surface moves closer to the bone/axis in the Ring's influence zone.

[IMAGE: Tightness visualization — arrows showing inward radial displacement on a cross-section diagram]

How It Works

  1. For each affected vertex, decompose its position into axial (along Ring axis) and radial (perpendicular to axis) components relative to Ring center.
  2. Calculate the inward direction — normalized radial vector pointing toward the Ring axis.
  3. Apply displacement: move the vertex inward by TightnessStrength * Influence.
  4. Accumulate the compression distance into a Volume Buffer for the Bulge pass.
RadialVec     = VertexPos - RingCenter - Axis * dot(VertexPos - RingCenter, Axis)
InwardDir     = -normalize(RadialVec)
Displacement  = InwardDir * TightnessStrength * Influence
NewPosition   = VertexPos + Displacement

[GIF: Tightness Strength slider from 0.0 to 3.0 — mesh progressively compressing inward]

Parameters

UI Label Property Type Default Range
Tightness Strength TightnessStrength float 1.5 0.0~3.0
Tightness Falloff FalloffType Enum Hermite Linear / Quadratic / Hermite

Tightness Strength

Controls how far vertices are displaced inward (in centimeters, scaled by Influence weight).

Value Effect Use Case
0.0 No compression Bulge-only effect (rare)
0.5~1.0 Subtle compression Light bands, loose garments
1.5 Standard compression (default) Most use cases
2.0~2.5 Strong compression Tight stockings, corsets
3.0 Maximum compression Extreme tightness, stylized effects

Warning: Values above 2.0 may cause mesh self-intersection or artifacts in the compression zone. If this occurs, enable Refinement's Radial Smoothing and Surface Smoothing to clean up the result.

[GIF: Tightness Strength comparison — 0.5 / 1.0 / 1.5 / 2.5 side by side]

Tightness Falloff

Controls how Influence weight decreases with distance from the Ring surface. This determines the transition quality between the compressed and uncompressed regions.

Falloff Type Curve Shape Transition Quality
Linear Straight line Sharp boundary, visible edge
Quadratic Gentle curve Moderate smoothness
Hermite (default) S-curve Smoothest transition, recommended

[IMAGE: Falloff curve comparison graph — Linear / Quadratic / Hermite]

Recommendation: Always use Hermite unless you specifically want a sharper compression boundary for stylistic reasons.

SDF-Based Tightness (Mesh Based Mode)

When using Mesh Based influence mode, Tightness uses a more sophisticated algorithm:

  1. Ray-AABB intersection finds the entry point into the Ring's SDF volume.
  2. Binary search refinement (4 iterations) locates the exact SDF=0 surface.
  3. Displacement direction is validated to ensure it pushes inward only.
  4. Movement is clamped to 90% of the radial distance to prevent overshooting.

This produces the most accurate compression that conforms exactly to the Ring mesh shape, but is slightly more expensive than Virtual Ring / Virtual Band modes.

Volume Accumulation

During Tightness, each vertex's compression distance is recorded:

CompressionAmount = length(NewPosition - OriginalPosition)
InterlockedAdd(VolumeAccumBuffer[RingIndex], uint(CompressionAmount * 1000.0))

Key Insight: More Tightness = more accumulated volume = more Bulge displacement. The two stages are intrinsically linked through volume preservation.


Stage 2: Bulge

What It Does

[IMAGE: Before/After Bulge — compressed mesh without Bulge (volume lost) vs. with Bulge (flesh overflow visible)]

Bulge displaces vertices outward from the compression zone, creating the characteristic "flesh spilling over" effect. The amount of displacement is derived from the volume lost during Tightness — ensuring physically plausible results.

Without Bulge, Tightness simply compresses the mesh and the volume disappears. With Bulge, the displaced volume reappears as flesh bulging above and/or below the compression band.

How It Works

  1. Read Volume Buffer — Retrieve total compression accumulated during Tightness.