This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

RcCookie
RcCookie presents ...

2022/5/8

Softbody Simulation

My second time implementing a softbody physics simulation.

A softbody collision model differs from "normal" rigidbody models in such a way, that there are no solid objects. The object consists of NODES (small mass points, yellow), and BEAMS (springs without collision and bending, white). The nodes are connected only through beams which can rotate freely around the beams.
If you have enough of these it looks like an object can deform.

The downside on this technique is, apart from the big computational cost, that objects are prone to exploding when:
- The springs are too stiff
- The dampening is too high
- The dampening is too low
- The mass of the nodes is too low
- The framerate is too low

Especially the framerate plays a big role in how stiff objects can be. For that reason, you can set a minimum framerate which if cannot be hit, the simulation will run in slow motion and think it is running at that framerate.

Explanation to the settings:
- Width - number of nodes besides each other
- Height - number of nodes above each other
- Spring - Stiffness of the beams
- Damp - Dampening of the beams (resistance to movement)
- Deform - How easily the beams deform permanently. The value describes the necessary length compared to the normal length at which the beam deforms permanently. 0 means never, 1 means always
- Strength - How much force each beam can withstand before breaking completely
- Mass - Total mass of all nodes
- Beam size - Vertical or horizontal distance between nodes
- Build - BUILD A NEW STRUCTURE WITH THE CONFIGURED VALUES

USE WASD OR THE ARROW KEYS TO MOVE!

11408 views / 11408 in the last 7 days

3 votes | 3 in the last 7 days

Tags: with-source

open in greenfoot
Your browser does not support the canvas tag.
A new version of this scenario was uploaded on 2022-05-08 16:03:59 UTC
A new version of this scenario was uploaded on 2022-05-08 16:05:06 UTC
A new version of this scenario was uploaded on 2022-05-08 16:05:54 UTC
A new version of this scenario was uploaded on 2022-05-08 16:06:36 UTC
A new version of this scenario was uploaded on 2022-05-08 16:08:33 UTC
A new version of this scenario was uploaded on 2022-05-08 16:09:10 UTC
A new version of this scenario was uploaded on 2022-05-08 16:11:52 UTC
A new version of this scenario was uploaded on 2022-05-08 16:16:13 UTC
A new version of this scenario was uploaded on 2022-05-08 16:17:55 UTC
A new version of this scenario was uploaded on 2022-05-08 17:11:10 UTC

See all comments

Want to leave a comment? You must first log in.

Who likes this?

Noobopanda Greenfoot_Admin Roshan123