  | | | Subject: morph targets? | Subject: morph targets? 2004-03-24 - By Agust?n Mar?a Rodr?guez
Back Carl Welch wrote: > Are there any example of this that anyone knows of. All I really want to > do is allow a user to adjust the size of a character's (with bones) > head, arms, chest and feet. I was look at the mesh deform modifier, but > haven't found anything close yet.
www.onwine.com.ar > demos > mesh deform
Hi, Carl. There are a couple of threads from one year ago (mostly between me and NoiseCrime) that deeply these issues you?re asking for. Search for "morph" or something like that in the archives.
The bottom line is -as you can see in my demo- that you can perform mesh deform on models that have bones by swapping their modelResource. It?s like changing sprite?s member in 2D. And those resources are "frames" of the animation. This worked pretty fast even with huge geometries but the flaws are:
- you have to preload loads of geometry data from different W3D scenes (notice that I haven?t used textures.. dunno if they were causing a performance hit or not)
- You can?t interpolate between "frames" because you can?t apply #meshDeform to a model that has bones. So that morphing thechnique it?s not compatible with bones. the result in my example is that you can use morph A OR morph B, but not both of them... because we can?t interpolate.
Here?s how my example works:
* 6 w3d scenes for the morph A and 21 for B (they all have the cylinder model with its bones) with the blend shape exported as geometry: 1 w3d per "frame". * cloning the cylinder model of each scene to the main one. * removing from world those cloned models. --here comes the dirty workaround. * grabbing the currentTime of the cylinder?s bonesPlayer model. * changing the model.resource for the new frame?s one. * adding the #bonesPlayer modifier. * playing the motion from where the previous "frame" left.
HTH, -- Agust?n Mar?a Rodr?guez | agustin@(protected) | www.OnWine.com.ar
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ Dir3d-l mailing list Dir3d-l@(protected) http://nuttybar.drama.uga.edu/mailman/listinfo/dir3d-l
|
|
 |