home/ atoms/ animate-smin-factor-with-motion

Animating the smooth-minimum blend radius with the motion signal adapts blending to the character's pose

A fixed smooth-minimum blend radius produces a nice shoulder connection when the arm is up but hides the arm inside the body when it swings down. The solution: make the blend radius a function of the arm’s position. When the arm is up (one_minus_arm_factor ≈ 0), add nothing to the base radius. When the arm is down (one_minus_arm_factor ≈ 1), add a larger value to reduce the blend radius — keeping the arm visually separate from the body. The blend parameter thus tracks the animation signal itself, giving the shader awareness of its own pose state. This is a general technique: any SDF parameter that conflicts at extreme poses can be driven by the animation scalar that causes those poses.

Examples

float sArm = 0.01 + 0.3*pow(1.0-armFactor, 3.0); col = smin(body, arm, sArm);

Assessment

Without the animated blend radius, describe the artifact when the arm is at its lowest position. Sketch how the blend radius would need to change across a full jump cycle.

“I am changing the smooth factor with time, so when the arm is up, all these things, this is one minus up factor, cubed, so when the arm is up”
corpus · inigo-quilez-live-coding-happy-jumping-video · chunk 18