Hello everyone,
I just read the article "Meshless Deformations Based on Shape Matching" by Matthias Mueller et al.
http://www.beosil.co...tions_SIG05.pdf
It describes a unconditionally stable 3d soft body implementation that drags the particles defining the body surface towards their rest positions on a rigid shape. The angle and position of this virtual rigid body is defined by the position of the particles. Unfortunately the method used to find the angle is described very briefly, and I'm having trouble understanding how it works.
I'm hoping that someone here may find the time to provide an explanation in terms of classical mechanincs, ie. force vectors, torque, mass, moment of inertia ect. I'll be implementing this in 2d only, which should simplify things a bit.
Cheers,
Mike
Deformable body using shape matching algorithm
You should check out the excellent post here, with source code (including a very clever and simple trick to avoid all of the matrix-sqrt-and-inversion in the original paper: http://labs.byhook.com/2010/06/29/particle-based-rigid-bodies-using-shape-matching/comment-page-1/
I have made a stable positionbased 2D physics engine.
It is for Windows 2000 but it can run on Windows 7 after some pain with the registry.
http://2008.gameawards.se/competition_entries/73
http://www.rapidspread.com/file.jsp?id=9gfmsdvxdf
The explained method in the pdf document seems to be transforming the highly detailed model with a low detailed model to get more speed while colliding with the high detail model in a grid transformation.
The theory behind my engine:
You don't need to know anything about torque because rotation is only an illusion. When you rotate a chair, you don't rotate the core of each atom in the chair. You only change their positions using forces. The chair holds it's shape with connections between the atoms by softly enforcing a fixed length between the 2 atoms in each connection. Think of a rigid body as a number of hard balls connected by stiff dampers. In slow motion, it is equivalent to soft balls and soft dampers and all forces are weaker.
It is for Windows 2000 but it can run on Windows 7 after some pain with the registry.
http://2008.gameawards.se/competition_entries/73
http://www.rapidspread.com/file.jsp?id=9gfmsdvxdf
The explained method in the pdf document seems to be transforming the highly detailed model with a low detailed model to get more speed while colliding with the high detail model in a grid transformation.
The theory behind my engine:
You don't need to know anything about torque because rotation is only an illusion. When you rotate a chair, you don't rotate the core of each atom in the chair. You only change their positions using forces. The chair holds it's shape with connections between the atoms by softly enforcing a fixed length between the 2 atoms in each connection. Think of a rigid body as a number of hard balls connected by stiff dampers. In slow motion, it is equivalent to soft balls and soft dampers and all forces are weaker.
Quote:Original post by Dawoodoz
I have made a stable positionbased 2D physics engine.
The download links don't seem to be working :(
You might be interested in this paper, which espouses a similar approach to what you describe: http://home.iae.nl/users/starcat/dynamo/publications/aynif.pdf
@Raigan
Thanks for the link, looks interesting. I'm trying to get a discussion going with then author of the article. In the mean time, I have made a 2d vector based alternative to the matrix based method described in the Muller paper. It also uses shape matching to preserve the original soft body shape, and allows for very viscous area preserving bodys. It also conserves linear and angular momentum. As a bonus it doesn't use any sqrt() calls and only needs 2 trig calls per update. I won't mind posting the source once i've tested and polished it.
@Dawoodoz
Sounds very interesting, unfortunately the links seem dead. Does the download contain any source code for inspiration?
cheers,
Mike
Thanks for the link, looks interesting. I'm trying to get a discussion going with then author of the article. In the mean time, I have made a 2d vector based alternative to the matrix based method described in the Muller paper. It also uses shape matching to preserve the original soft body shape, and allows for very viscous area preserving bodys. It also conserves linear and angular momentum. As a bonus it doesn't use any sqrt() calls and only needs 2 trig calls per update. I won't mind posting the source once i've tested and polished it.
@Dawoodoz
Sounds very interesting, unfortunately the links seem dead. Does the download contain any source code for inspiration?
cheers,
Mike
I'd be really interested in hearing more about your method whenever you work it out; when we tried this in 2D we ended up using the same matrix-based approach as the original paper, which seemed very inefficient (and was a huge pain to get working).
It's starting to look good, although still there may be a few bugs. The code is still very ugly though, but I won't mind uploading a proof-of-concept sandbox exe. I'll have it ready by tonight (european time) :-)
Cheers,
Mike
Cheers,
Mike
Ok, here we go...
So far it's just a random shape sandbox proof-of-concept thing. It features particle-to-rest-point damped spring, particle-to-neighbor damped spring, and area preserving pressure, all of which are given a random clamped value. Each body only takes two trig calls per update, and zero sqrt calls!
Cheers,
Mike
So far it's just a random shape sandbox proof-of-concept thing. It features particle-to-rest-point damped spring, particle-to-neighbor damped spring, and area preserving pressure, all of which are given a random clamped value. Each body only takes two trig calls per update, and zero sqrt calls!
Cheers,
Mike
Cool! I don't see how you could calculate all those spring forces with that little work though.. can't wait for more details! :)
If the spring has length zero, the spring force is:
Fx = -k*(Px-Rx)
Fy = -k*(Py-Ry)
where F = force, P = current position, and R = rest position. That is, the spring has a fixed vertical and horizontal rest length of zero. The spring forces are perpendicular and hence does not influence each other. The horizontal spring force Fx depends only on the displacement along the x axis and is completely independent of vertical displacement, and vice versa. This is also true for springs between two moving particles, as long as they have a fixes horiz. and vert. rest length.
You only need sqrt() if the spring can rotate freely in all directions, in which case you need to find the spring length by solving the Pythagorean theorem r = sqrt(x^2 + y^2).
(EDIT: fleshed out the explanation a bit.)
Cheers,
Mike
[Edited by - h4tt3n on August 25, 2010 10:28:45 AM]
Fx = -k*(Px-Rx)
Fy = -k*(Py-Ry)
where F = force, P = current position, and R = rest position. That is, the spring has a fixed vertical and horizontal rest length of zero. The spring forces are perpendicular and hence does not influence each other. The horizontal spring force Fx depends only on the displacement along the x axis and is completely independent of vertical displacement, and vice versa. This is also true for springs between two moving particles, as long as they have a fixes horiz. and vert. rest length.
You only need sqrt() if the spring can rotate freely in all directions, in which case you need to find the spring length by solving the Pythagorean theorem r = sqrt(x^2 + y^2).
(EDIT: fleshed out the explanation a bit.)
Cheers,
Mike
[Edited by - h4tt3n on August 25, 2010 10:28:45 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement