View Full Version : Magnet Deformation
03-01-2004, 10:24 PM
Does anyone have any information on Magnet type deformation used with Bones?
Thanks for any help,
03-02-2004, 10:38 AM
What exactly are you wanting to do? I bone-driven deformation? Or a "magnet" deformation in conjunction with a bone-driven deformation?
03-02-2004, 03:52 PM
A bone driven deformation based on Magnets.
03-02-2004, 04:14 PM
Oop, perhaps I should have specified better... what exactly do you mean by a magnet? I'm having a hard time picturing what it is you want to do?
03-03-2004, 04:17 AM
Hmm. I guess that's actually a really good question. Before It seemed clearer in my head but now that I think about it, I don't really know what the difference is. Anyway, What I'm thinking of is the difference between how bones work in LightWave and Messiah and how they work in Maya and Max. In LightWave/Messiah, bones are just added to a mesh and the closest points become influenced by it. You have properties to change the influence range and falloff and stuff like that. In Maya/Max, You start out like this but then have to edit the points associated with a bone by way of a weight map. You can do the same thing in LightWave but sometimes it's nice to just stick some bones in and have them work right off the bat.
So, the LightWave/Messiah way is done using a method that I've heard called Magnets. This is very similar to the magnet tools found in some modeling programs (also called soft selection).
So, other then that, That's all I know. Sorry, I was hoping someone else would know more so I could ask some questions of at least find some info on the net.
03-03-2004, 01:34 PM
I've not seen any reference on this either, though game dev sites are usually a good place to use for "simple" things like this.
A naive implementation might go something like:
for each vertex in mesh
for each bone in skeleton
l = lineBetween( bone, nextbone )
d = perpendicularDistance( fromVertex, toBone)
i = linstep( influence + falloff, influence, d )
addInfluence( vertex, pow(i, falloffpower) )
Try this plugin of mine. New version 0.5, just hot off the press:
Install it and read the README.txt. Particularly the sections about weightCube, etc. Those will add the functionality you seek to maya (and much more :).
As playmesumch00ns said, there's not much to it.
03-11-2004, 07:26 AM
Yeah that's really neat. But... Ahhh... Well, I don't mean to seem ungrateful but I'm actually looking for information on programming magnet deformation systems... I'm not really looking for a plug in to manipulate weights in Maya. I'm trying to make one for a program that I'm personally writing.
Originally posted by ngrava
I'm actually looking for information on programming magnet deformation systems...
You DO realize that playmesumch00ns's previous message already gave you the algorithm you need to get started, right? Well, I don't agree much with the linstep() portion of it, but other than that, it seems clear to me.
Did you understand his answer and pseudo code?
The algorithm for a basic capsule enveloping is just that simple. Coding it in C or what-have-you will require more code, but the algorithm does not change.
See www.magic-software.com or similar if you are not familiar how to calculate distances between a point and a line.
See Jeff Lander's web site for a basic barebones weighting tool, with source code. You can then add automatic weighting to it, easily.
03-31-2004, 01:22 PM
03-31-2004, 01:25 PM
sorry this is correct.
01-17-2006, 02:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.