How to import transform from obj into kinefx?

   1939   7   2
User Avatar
Member
622 posts
Joined: Nov. 2013
Offline
Hi,

I want to import the transform of an obj into kinefx transform attribute. How to do it?

Thanks for any tips!

Edit: And how to export joint transform to object?
Edited by jerry7 - Nov. 26, 2020 17:56:10
User Avatar
Member
7726 posts
Joined: July 2005
Online
Try Scene Character Import and give it a specific pattern for import. For export, try the Scene Character Export. They're geared towards entire characters so if you just want a single transform, I'm not sure if they'll be the most efficient.
User Avatar
Member
16 posts
Joined: June 2018
Online
jerry7
Hi,

I want to import the transform of an obj into kinefx transform attribute. How to do it?

Thanks for any tips!

Edit: And how to export joint transform to object?


Hi, did you solve it? I have a mesh with transforms at obj level, that I want to use do drive one specific joint, but can't get rotations to work
User Avatar
Member
7726 posts
Joined: July 2005
Online
I realize one issue with using Scene Character Import is that it acts sort of like an agent-style import where the animation is cached into the node. So if you're looking to drive it in a live way from objects, then you probably don't want to use it. Every time to change the object-level animation, you'll need to hit Reload on it.

To directly drive a joint from an object, you'd need to use the optransform() VEX function. I've attached a simple example.

Attachments:
objDrivenJoint.hip (122.7 KB)

User Avatar
Member
16 posts
Joined: June 2018
Online
edward
I realize one issue with using Scene Character Import is that it acts sort of like an agent-style import where the animation is cached into the node. So if you're looking to drive it in a live way from objects, then you probably don't want to use it. Every time to change the object-level animation, you'll need to hit Reload on it.

To directly drive a joint from an object, you'd need to use the optransform() VEX function. I've attached a simple example.
Thanks a lot! this works. I've arrived to the same results with Object merge and RigVop, but this is much more simple
Is there a way but to make all the hierarchy follow the modified joint? like if I make this function to the root joint, all the others stay on place
Edited by neshamota - Dec. 19, 2020 06:06:47
User Avatar
Member
7726 posts
Joined: July 2005
Online
For that you can set @localtransform instead and then recompute @transform from that. Please see attached.

Attachments:
objDrivenJointLocal.hip (129.5 KB)

User Avatar
Member
1 posts
Joined: Dec. 2020
Offline
How do you do the reverse? Drive object level transformation using a kinefx joint robustly?
User Avatar
Member
7726 posts
Joined: July 2005
Online
The easiest way is probably to use a CHOP constraint like the attached. I encountered some odd behaviour with the Geometry CHOP so I added a Trim CHOP to only keep the first sample. Look inside /obj/null1/constraints.
Edited by edward - Jan. 2, 2021 19:17:11

Attachments:
jointDrivenObj.hip (155.5 KB)

  • Quick Links