Nodes/RyanOnTheInside/Spring Joint Setting βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
ComfyUI Node

Spring Joint Setting βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜

The physics numbers behind a springy particle connection

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Spring Joint Setting βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
    • SPRING_JOINT_SETTING
    β—„stiffness100β–Ί
    β—„damping10.0β–Ί
    β—„rest_length0.0β–Ί
    β—„max_distance50β–Ί

    Run this node by itself and nothing happens. That's normal, and it's the first thing to know about it: it's a settings bundle, not an effect. RyanOnTheInside's Particle Systems live behind pymunk (a real 2D physics engine - it's right there in the pack's requirements.txt), and this node packages up the four numbers pymunk needs to define a springy joint between two particles, or a particle and an anchor point. You wire its output into whichever emitter or joint node in the pack actually consumes it, and that's where you get the interconnected, springy particle chains the README's "Spring Joints" bullet is talking about.

    How it works

    If you've touched any physics engine before, these four fields will look familiar - they're straight out of the damped-spring model pymunk (and most 2D physics engines) use. stiffness is the spring constant: how hard it resists being stretched or compressed. damping bleeds energy out of the system so the spring settles instead of oscillating forever. rest_length is the length the spring "wants" to be at - the point where it applies zero force. max_distance caps how far the two connected ends can get from each other; the schema doesn't spell out exactly what happens past that cap (clamp vs. hard stop), so treat it as an upper bound on stretch rather than assuming a specific snap behavior, and just watch what your particular emitter node does with it.

    The inputs and outputs that matter

    stiffness (0–1000, default 100) and damping (0–100, default 10) are the pair you'll tune together - high stiffness with low damping gives you a bouncy, oscillating spring; raise damping to calm it down into something that settles quickly instead. rest_length defaults to 0, which means out of the box the spring wants to pull its two ends all the way together - if you want particles to hover at some distance from each other rather than collapsing inward, raise this first. max_distance (default 50) is your safety cap.

    The single output, SPRING_JOINT_SETTING, is a custom type specific to this pack. It only plugs into other RyanOnTheInside particle nodes - no other pack, and nothing native to ComfyUI, knows what to do with it.

    How to install it

    Via ComfyUI Manager, search "RyanOnTheInside." Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside.git
    cd ComfyUI_RyanOnTheInside
    pip install -r requirements.txt
    

    Restart ComfyUI. The particle system side of this pack leans on pymunk specifically - if that didn't install cleanly (check your ComfyUI console on startup for import errors), the particle nodes, this one included, won't show up or will fail on load even though the rest of the pack works fine.

    Common issues & troubleshooting

    The most common confusion for a first-timer is exactly what's described above: you drop this node, hit queue, and see nothing different. That's expected - it has to be wired into a particle emitter or joint node that actually reads a SPRING_JOINT_SETTING before it does anything visible.

    Second most common: forgetting rest_length defaults to 0 and being surprised your particles all snap together instead of maintaining a springy distance apart. Raise it to whatever gap you actually want.

    And since this only speaks its own custom type, a "cannot connect" error when you try to wire it somewhere is almost always you reaching for the wrong downstream node rather than anything wrong with this one - double-check which of the pack's particle nodes actually accepts a SPRING_JOINT_SETTING input.

    CategoryRyanOnTheInside/ParticleSystems/Modulators

    Inputs (4)

    NameTypeDefaultDescription
    stiffnessFLOAT1000–1000Stiffness of the spring (0.0 to 1000.0)
    dampingFLOAT10.00–100Damping factor of the spring (0.0 to 100.0)
    rest_lengthFLOAT0.00–100Rest length of the spring (0.0 to 100.0)
    max_distanceFLOAT500–500Maximum distance the spring can stretch (0.0 to 500.0)

    Outputs (1)

    NameTypeDescription
    SPRING_JOINT_SETTINGSPRING_JOINT_SETTINGβ€”