Verlets and mass
Blitz3D Forums/Blitz3D Programming/Verlets and mass
| ||
Hi Guys, Im trying to implement mass into my verlet/ragdoll editor, im OK with the code to simulate mass but what I am confused with is, do I spread the mass over the whole verlet cage or just assign it to the verlet that is anchored to the entity. I've just read back through the above and I think I need to clarify :- If I have a torso mesh, and a torso cage, which is made up of 5 verlets and 8 constraints, I attach the mesh to one of the verlets, now do I spread the mass of the torso between all 5 verlets or do I just assign it to the verlet that is attached to the mesh. If you've dabbled with verlet physics you should hopefully understand what I mean. |
| ||
Strangely enough I've been working on my 2d verlet engine over the last few weeks. I've been dabbling in verlet integration for a year and a half though. I'm assuming you're working in 2d and the cage is a rect with a center point and 4 corners. Personally, as your torso would be treated as a single rigid body I would spread the mass equaly over all 5 verlets. You could make the center verlet slightly heavier but I it's not really essential. An example of an instance where I would use differing verlet masses is vehicle simulation. For stability and added realism you would make the center verlet heaviest, base heavier than roof. Stevie |
| ||
Thanks Stevie, I thought you might be able to answer this one. I've been following your progress with Verlet integration since you released that "Bender" ragdoll demo just over a year ago and the more advanced vehicle system. My editor is going to be a 3D ragdoll editor, I started it over a year ago but put it to one side after a family bereavement (just couldn't concentrate on it) but I've picked it back up again now, the code is real spaghetti (its my first program created in Blitz) and I only really attempted it because trying to create a verlet cage without some form of visualization was proving to difficult for me. Anyway thanks for the advice, it really is appreciated. |
| ||
No problem - feel free to e-mail me if there's anything you think I could help with. |