Extracting KineFX transform matrix to OBJ-Level

   1870   4   1
User Avatar
Member
45 posts
Joined: July 2015
Offline
hi,

i have an fbx animation coming from maya and using kinefx fbx-anim-import to load it to houdini.
the imported points have also a "transform" (translate, rotate, scale) 3x3 matrix attribute.
i have to constraint some heavy assets to this points, so my first intension was to use copy to points in conjunction with the name attribute from the points.
works well, all transforms are coming through, but its very very slow when scrubbing the timeline.
constraining the assets on obj-level would be more effective, but how to extract the tranform matrix from the fbx-import-node at sop-level to the TRS of a geometry-node?
is there an expression or something else to use the matrix directly?
any hints are welcome
User Avatar
Member
1737 posts
Joined: May 2006
Offline
Rivet?

Attachments:
kinefx_to_obj_rivet.hip (2.9 MB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
679 posts
Joined: Feb. 2017
Offline
Have you packed your geo before copy to points or while? That would improve performance significantly.
Also should you take a look at the Capture Packed Geo node : Capture Packed Geometry [www.sidefx.com]
Cheers
CYTE
Edited by CYTE - Oct. 10, 2022 04:53:59
User Avatar
Member
45 posts
Joined: July 2015
Offline
mestela
Rivet?
thx a lot.
yes rivet seems to be an option, but i also need scaling, which seems not possible with rivet. or is there another trick to extract also scaling?

CYTE
Have you packed your geo before copy to points or while? That would improve performance significantly.
i tried packed, but no really performance gain. the copy to points acts in my case more like a contrainer and not an instancer...
the objects being transformed to the points are all unique...
(also i need them unpacked at obj-level because using redshift and need its obj tags for shading...)
Edited by soulcage_dpt - Oct. 10, 2022 06:48:47
User Avatar
Member
1737 posts
Joined: May 2006
Offline
You can add scale via some mild trickery (typical houdini verbose nonsense, tsk)

-use vex 'cracktransform' to extract the joint transform to a @scale vector attribute
-read that onto the scale of the rivet via a hscript point expression.

I've added smugness here by channel referencing the rivet point name down into sops to split off the requested joint, and using a spare input on the hscript expression to make it read a little tidier.

(edit)

It occurred to me its probably worth an RFE to have the rivet node support all common instance attributes, so if you have @scale or @transform or @pscale or @xform or @orient etc, to support that for scale and rotation.
Edited by mestela - Oct. 10, 2022 16:08:41

Attachments:
kinefx_to_obj_rivet_and_scale.hip (3.0 MB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
  • Quick Links