The graft is modeled as four coupled state variables integrated over simulated weeks (V = vascularization, S = scaffold integrity, F = fibrotic response, T = tissue integration, all 0–1):
dV/dt = kAng·(VEGF/100)·(1-V) - 0.15·F·V
dS/dt = -degRate·S
dF/dt = kFib·(inflam/100)·(1-V) - kClear·V·F
dT/dt = kGrow·(density/100)·V·max(S,0.15)·(1-T) - kLoss·F·T
New blood vessels (V) grow toward the graft when VEGF signaling is strong, but stall if fibrosis walls off the site. The scaffold (S) resorbs at a rate you set — if it collapses before enough tissue has formed, the structural template disappears before cells can replace it. Fibrosis (F) builds up when inflammation is high and the site is still poorly vascularized (a classic foreign-body / scarring response), and once established it actively degrades new tissue. Integration (T) — real, load-bearing tissue — only accumulates where seeded cells (density), a blood supply (V) and an intact scaffold (S) are simultaneously present, and is eroded by fibrosis.
- Successful regeneration — integration climbs past ~80% while fibrosis stays low: the graft becomes functional tissue.
- Fibrosis risk — inflammation outpaces vascularization and the defect is walled off in fibrous scar rather than being replaced.
- Graft failure — the scaffold resorbs before enough new tissue has formed to take over its structural role.
The green cell cluster inside the cage is an InstancedMesh whose per-instance color tracks local integration; the branching tubes are a procedurally grown vessel tree revealed segment-by-segment as vascularization rises; the orbiting particles are immune cells that shift from green (pro-healing) to red (inflammatory) with the fibrosis level.