mcpField
P
physics-rendering-expert

physics-rendering-expert

github.com/curiositechDevelopment257188 installsUpdated 2d ago
Repository

About physics-rendering-expert

physics-rendering-expert is a skill for developers building real-time physics simulations, focused on rope dynamics and constraint solving. It guides choices around PBD, integration, and rotation representations, along with common implementation pitfalls.

Key features

  1. 01Rope and cable dynamics
  2. 02PBD constraint solving
  3. 03Gauss-Seidel and Jacobi selection
  4. 04Verlet integration guidance
  5. 05Quaternion and dual-quaternion rotations

Use cases

  1. 01Implement real-time rope or chain simulation
  2. 02Choose integration for particle systems
  3. 03Handle multi-rope tangle detection
  4. 04Select a parallel solver for cloth simulation

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/curiositech/some_claude_skills --skill physics-rendering-expert

After installing, type/physics-rendering-expertin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

CHANGELOG.md
.claude-plugin/
plugin.json
references/
tangle-physics.md
implementations.md
knot-garden-physics.md
core-algorithms.md

Details

From the project README

Physics & Rendering Expert: Rope Dynamics & Constraint Solving

Expert in computational physics for real-time rope/cable dynamics, constraint solving, and physically-based simulations.

When to Use This Skill

Use for:

  • Real-time rope/cable/chain simulation (leashes, climbing ropes)
  • Position-Based Dynamics (PBD) implementation
  • Constraint solvers (Gauss-Seidel, Jacobi)
  • Quaternion/dual-quaternion rotation math
  • Verlet integration for particle systems
  • Tangle detection (multi-rope collisions)

Do NOT use for:

  • Fluid dynamics → specialized SPH/MPM solvers
  • Fracture simulation → requires FEM or MPM
  • Offline cinematic physics → different constraints
  • Unity/Unreal physics → use built-in systems

Expert vs Novice Shibboleths

TopicNoviceExpert
Constraint approachUses spring forces (F=ma)Uses PBD (directly manipulates positions)
Why PBD"Springs work fine"Springs require tiny timesteps; PBD is unconditionally stable
Solver choice"Just iterate until done"Gauss-Seidel for chains, Jacobi for GPU
Iterations20+ iterations5-10 is optimal; diminishing returns after
RotationUses Euler anglesUses quaternions (no gimbal lock)
IntegrationForward EulerVerlet (symplectic, energy-conserving)

Common Anti-Patterns

Force-Based Springs for Stiff Constraints
What it looks likeWhy it's wrong
force = k * (distance - rest_length) with high kHigh k requires tiny dt for stability; low k gives squishy ropes
Instead: Use PBD - directly move particles to satisfy constraints
Euler Angles for Rotation
What it looks likeWhy it's wrong
rotation = vec3(pitch, yaw, roll)Gimbal lock at 90° pitch; unstable composition
Instead: Use quaternions - 4 numbers, no gimbal lock, stable SLERP
Over-Iteration
What it looks likeWhy it's wrong
solver_iterations = 50Diminishing returns after 5-10; wastes cycles
Instead: Use 5-10 iterations; if more needed, use XPBD compliance
Single-Threaded Gauss-Seidel for Large Systems
What it looks likeWhy it's wrong
Gauss-Seidel on 1000+ constraintsGauss-Seidel is inherently sequential
Instead: Use Jacobi solver for GPU parallelization

Quick Reference

Why PBD Beats Force-Based Physics
  • Unconditionally stable (large timesteps OK)
  • Direct control over constraint satisfaction
  • No spring constants to tune
  • Predictable behavior
Solver Choice
SolverParallelizableConvergenceUse Case
Gauss-SeidelNoFastChains, ropes
JacobiYes (GPU)SlowerLarge meshes, cloth
Rotation Representation
  • 3D rotation → Quaternion (never Euler)
  • Rotation + translation → Dual quaternion
  • Skinning/blending → Dual quaternion (no candy-wrapper artifact)
Performance Targets
SystemBudgetNotes
Single rope (100 particles)<0.5ms5 iterations sufficient
Three-dog leash (60 particles)<0.7msInclude tangle detection
Cloth (1000 particles)<2msUse Jacobi on GPU

Evolution Timeline

EraKey Development
Pre-2006Mass-spring systems, stability issues
2006-2015PBD introduced (Müller et al.), unconditional stability
2016-2020XPBD adds compliance for soft constraints
2021-2024ALEM (2024 SIGGRAPH), BDEM, neural physics
2025+XPBD standard, hybrid CPU/GPU, learned corrections

Decision Trees

Choosing constraint solver:

  • Sequential structure (rope/chain)? → Gauss-Seidel
  • Large parallel system (cloth/hair)? → Jacobi (GPU)
  • Need soft constraints? → XPBD with compliance

Choosing integration:

  • Position-only needed? → Basic Verlet
  • Need velocity for forces? → Velocity Verlet
  • High accuracy required? → RK4 (but PBD usually sufficient)

Integrates With

  • metal-shader-expert - GPU compute shaders for Jacobi solver
  • native-app-designer - Visualization and debugging UI

Reference Files

FileContents
references/core-algorithms.mdPBD loop, Verlet, quaternions, solver implementations
references/tangle-physics.mdMulti-rope collision, Capstan friction, TangleConstraint

Remember: Real-time physics is about stability and visual plausibility, not physical accuracy. PBD with 5-10 iterations at 60fps looks great and runs fast.

Comments

Markdown supported