Jump to content

Vellum sim on part of KineFX skeleton


Recommended Posts

Hey there

I'm trying to do a vellum sim on a small part of a skeleton that I'm importing from fbx. There are a couple of bones in a piece of cloth that I've managed to make look decent with vellum.

 

The problem is no matter what I try I can't make the simmed skeleton work with the skinned model I have in the bonedeform.

Right now I'm
1 ) Importing the FBX Character with a skeleton. 
2 ) Using FBX Anim import to import a skeleton walk cycle.

If I plug it up using the bonedeform now it all works.

3) So I separate out the piece of the skeleton I want to sim (the bones that control the cloth, and I sim them using vellum).
 

Now I want to export a new run cycle with the updated cloth animation, but I just get weird skinning issues or the cloth part not updating at all.
 

Is there a proper way to do this, or am I just attempting something stupid?

 

 

Link to comment
Share on other sites

It's hard to say exactly what's going wrong without seeing a file, but my guess is that you're not properly applying the orientations of your vellum sim back to the transforms of your skeleton. When you run the Vellum simulation, assuming you're using a constraint type like "String" that supports orientation, the p@orient value of your input points needs to match the KineFX joints. You can do this pretty quickly by converting your 3@transform attribute (this is in world space and common to all KineFX joints):

p@orient = qconvert(3@transform);

Then feed this into your Vellum String configuration and simulate. I'm using Pins to keep some of the original joints attached to their animation. The p@orient attribute will update during the simulation. To turn these results into something useful post-sim, we have to take this computed orientation and convert it back into the 3@transform attribute. You start with a default matrix, make sure its scale matches that of the original, then rotate it to match the orientation of your simulated points:

// convert world space orient quaternion (from vellum) back to transform matrix
vector scale = cracktransform(0, 0, 2, 0, 3@transform);
matrix3 xform = ident();
scale(xform, scale);
matrix3 rot = qconvert(p@orient);
3@transform = xform * rot;

Now that that's done, you can connect your skeleton into the Bone Deform SOP and it ought to work. I'm attaching an example HIP file... you'll have to load your own FBX, define a clip name and pick new pin numbers on the Vellum Constraint.

vellumcat.gif.a7105a50ead4ab1a0da5f4cd3bf87126.gif

vellumcat.hip

  • Like 3
Link to comment
Share on other sites

Thank. You. So. Much. 

I was close but you were right, I was converting the orient from vellum incorrectly.

 

It's sort of working now but when I plug it into the bonedeform I'm only getting the positional changes of the joints, so even though my bones are flopping all over the place like cloth, I'm not getting the 1:1 match that I would expect, because the joints aren't actually rotating I'm guessing?

 

Any ideas?

 

(Big fan of MOPs)

bone_cloth.png

Edited by prekabreki
Accidental early submit.
Link to comment
Share on other sites

  • 4 months later...

Same problem here, I am struggling with this as well. There is almost no info on the web about converting orient to kinefx transforms. Vellum also does not support kinefx transform matrix attributes, it breaks the vellum thickness attribute. Deleting the transform matrix works for vellum, but getting it back after vellum does not work

Edited by scorpes
Link to comment
Share on other sites

Here's a simple example. You need to use a Vellum constraint type that supports orientation, which generally means you want to use hair. Once the sim is done, convert the orient attribute to the KineFX-supported 3x3 transform matrix like this:

3@transform = qconvert(p@orient);

Then input to a Bone Deform and you're done.

vellum_kinefx_toadstorm.hip

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...