Game Development Community

Mass Spring Model

by Fiona Counihan · in Technical Issues · 10/06/2006 (3:52 am) · 1 replies

Hi there,

I am a student and also new to Torque - I am doing a project at the moment that involves creating a surgical simulator using Torque. I have created and loaded the 3D models that I need - however I need to develop the properties of these models. They need to be in some way malleable, elastic or bendable - to represent soft tissue deformation.
I have been doing a bit of online research and have found that the Mass-Spring Model is what I need to achieve this simulation.
This isn't built into Torque - is it? Has anybody ever incorporated it into a Torque game before?
Can anyone tell me where to start on this?

Thanks,
Fi**

#1
10/06/2006 (8:41 pm)
Mass spring is a simple representation. But what you want to do is going to be very interesting and difficult. I think a good place to start would be looking into deformable objects (balls that squish). You need to represent your object in a way that can be drawn with a decent amount of speed and allow arbitrary movement at any point.

Are you using 3 space models that represent the model as a 3 dimensional array of points? Or are you using a model that is just the "skin" of the object?

Mass spring equations are simple and descriptions and code can be found here:
www.gaffer.org/game-physics/spring-physics/

If you have access to medical 3 dimensional models that represent the data as 3d arrays it may be easier to do what you want. Then you can do checks for visibility to determine if a point should be drawn. Also you can do collisions with the impliment (knife) so that the points can act as particles and be pushed out of the way, but will rebound according to some physics (perhaps your springs).

Another idea is cloth or squishy (I know it is called something else, but can't think of it) physics. That could be helpful for what you want. Maybe it is called "soft body"?

Good luck,
Frank

Like you said, Torque is not really built for this, but go for it. It sounds like a lot of fun and interesting.