Show HN: Soft Body Jiggle Physics

(github.com)

19 points | by vesperance 4 days ago

5 comments

  • deafpolygon 5 minutes ago
    Doing the lord’s work, advancing the human race forward.
  • embedding-shape 1 hour ago
    Nice donut in the demo, but would love to see a human model for a more fun demo :) Ideally with a proper weight map for the different body parts too, seems well done enough that you could get really close to something realistic.
    • hgoel 1 hour ago
      That's probably the intent given the link in their github bio
  • sameersri2004 27 minutes ago
    Could be used for soft sea fish models
  • WizardK 1 hour ago
    Nice to see someone else doing physics in the browser. And this looks well put together, keeping the engine dependency free and separate from the renderer is a good call, that is what makes it easy to reuse in Three or Babylon.

    One question: how does it hold up when the framerate changes? Spring jiggle like this usually either blows up or feels different when the timestep moves around. Are you using a fixed timestep, or just relying on the damping to keep it stable?

    • bruce343434 1 hour ago
      The accumulator pattern keeps simulations stable in the face of variable frame rate. Accumulate the frame dt into an accum variable. If accum>fixed_physics_dt then step_physics until false. I'm assuming the author did something like that because it's standard practise.

      https://www.gafferongames.com/post/fix_your_timestep/

    • embedding-shape 1 hour ago
      > when the timestep moves around

      Why would the physics timestep move around? Typically you keep that fixed and separate, especially not locked to the display framerate, physics get really wonky then regardless of what you do.

  • Razengan 37 minutes ago
    I had vastly different expectations, though I suppose this could lead to them..