**Edited by TianWolf, 28 November 2012 - 08:09 PM.**

Started by Nov 28 2012 08:08 PM

,
5 replies to this topic

Posted 28 November 2012 - 08:08 PM

I want to get into Soft Body Physics, and want to know a good place to begin. I've read up on C++ and Lua but, only have experience on Unityscript and C# as well as a small amount of Java.

**Edited by TianWolf, 28 November 2012 - 08:09 PM.**

Posted 29 November 2012 - 02:37 AM

Hi there,

A good place to start is to make a loop of particles connected with springs. Then calculate the rest-area (or "2d volume") using the equation found here, and save it.

For each program loop, calculate the current area and calculate a pressure force, which could look like this:

Fpressure = stiffnes * (area - rest area)

Which is essentially just Hooke's law of elasticity in another form. Then, for each spring, apply a perpendicular pressure force to the particles in each end of the spring.

Integrate with time using your favourite algorithm and repeat. This will make the loop of springs into a neat little water balloon :-)

Cheers,

Mike

A good place to start is to make a loop of particles connected with springs. Then calculate the rest-area (or "2d volume") using the equation found here, and save it.

For each program loop, calculate the current area and calculate a pressure force, which could look like this:

Fpressure = stiffnes * (area - rest area)

Which is essentially just Hooke's law of elasticity in another form. Then, for each spring, apply a perpendicular pressure force to the particles in each end of the spring.

Integrate with time using your favourite algorithm and repeat. This will make the loop of springs into a neat little water balloon :-)

Cheers,

Mike

Posted 29 November 2012 - 10:13 PM

Thanks, but I don't really know how to do springs. Is there a good tutorial for this stuff?

**Edited by TianWolf, 29 November 2012 - 11:56 PM.**

Posted 30 November 2012 - 01:57 AM

Ah, okay. Let's go the other way around, then. To succeed with this you first need to know a few things about vector math, and I recommend you to write your own vector library containing all the stuff you need. In my opinion this is a brilliant way to learn math. You'll need to know how to find the length (or magnitude) of a vector, and you need to know what a normalized vector is. Also, you'll need to know how to find the perpendicular of a vector and how to find the dop product or scalar product of two vectors. Filally, you need to know how to project one vector onto another. There are loads of vector primers and beginner's tutorials out there, and I recommend you read through a few of them.

Cheers,

Mike

Cheers,

Mike

Posted 30 November 2012 - 02:02 PM

There is a realtime physics course from Siggraph, which I found to be introductory, practical and comprehensive, you can start from there.

Among soft bodies, spring systems and finite elements systems are covered.

link: http://www.matthiasmueller.info/realtimephysics/index.html

Among soft bodies, spring systems and finite elements systems are covered.

link: http://www.matthiasmueller.info/realtimephysics/index.html

Posted 03 December 2012 - 09:25 AM

So, are you having any progress on implementing soft body physics? It'd be really nice of you to drop a note on wether you've had all the help you needed.