Converting global transform to local, best way

   5661   7   0
User Avatar
Member
98 posts
Joined: Aug. 2014
Offline
Hello

I think we all know, how SI automatically converts the global transform, driven by IK or constraints, to local one, and ability to read this with expressions, and so. Now in Houdini, it seems we need to do the equivalent for particular case. So far so good, I've managed to get the IK driven rotations, following the factory examples, using object chain - transform chain CHOPs.
Anyway, is there an another, more direct way. By looking at node info of Fetch Object, noticed a nicely displayed fetched transform. Is there a way to read this, ‘under MMB’ info, using expression.
Also, are there scripting examples, comparable to synoptic, coming with SI install. I think I sow something similar to SI synoptic in H 14 promo videos. For now, my ambition is limited to getting the local rotation of bones, driven by IK, and setting the appropriate key on bone rotation - but I'm pretty sure I'll want more in future.
User Avatar
Member
678 posts
Joined: July 2005
Offline
Open Textport and try:
exhelp origin

EDIT:
Check also in Python Shell:
hou.ObjNode.worldTransform()
hou.ObjNode.localTransform()
User Avatar
Member
98 posts
Joined: Aug. 2014
Offline
By the way, this typing in textport, is it a wish to have a different way of communicating with software than rest of planet, for any price, or what.
Is there a difference to f1 for docs. In case of ‘origin’, return is the same.
User Avatar
Member
678 posts
Joined: July 2005
Offline
amm
By the way, this typing in textport, is it a wish to have a different way of communicating with software than rest of planet, for any price, or what.
Is there a difference to f1 for docs. In case of ‘origin’, return is the same.

I never used F1 for searching help for expressions or any hscript command.

If you write just exhelp, you will get all available expressions.
If you write just help, you will get all available hscript commands.
If you write exhelp or help + command name, you will get help for specific expression/hscript command.

Using shell is a pretty standard way to get help for command in scripting languages. Python has it. Powershell has it.

Textport can be used for scripting to, if you need it. It's just that now, with Python, no one uses it anymore for this. Legacy stuff.
Edited by - July 4, 2015 17:24:20
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
don't forget
exhelp/help -k term

so if you're looking for expressions or commands that have to do with looping, you could do:
help -k loop
and it will spit out any command that has the word loop in it's help…
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
98 posts
Joined: Aug. 2014
Offline
Thank you guys, but I looked for examples, mainly - advantages of shells simply doesn't fit into level of engagement.

Anyway found some examples of origin, but it seems this one does not consider rotation order. People who prefer more visual approach, will know how local rotation, for example in Softimage or Blender, once is driven by something global, completely changes its values when rotation order is changed - ok this is not performed automatically in Blender, but there's ‘apply visual transform’ command.
Since bone rotation order in H seems to be fixed (!?) to something starting with Z, which is understandable when bone axis is Z, usual XYZ won't work, I'm afraid.
Hopefully, mentioned object chain - transform chain CHOP is able to output the approprate rotation order, but what if I want to on-the-fly, immediate transfer of animated rotation order.
Perhaps there's time for me, to lower the Houdini ambition to deformation rig only, driven by imported kinematics from some another 3d app. Sounds as much faster method.
User Avatar
Member
534 posts
Joined: March 2014
Offline
two ways:
1st:
with your component selected (e.g. primitives) in the viewport press “m” key to toggle between world/local/view/component mode.

2nd (not that comfortable in my opinion): select (object or component), RMB on handle, choose “Handle Parameters…”.
does same as above.
hope this helps,
Fuat
Fuat Yüksel
FX Supervisor | RISE Visual Effects Studios
User Avatar
Member
98 posts
Joined: Aug. 2014
Offline
fuat
two ways:
1st:
with your component selected (e.g. primitives) in the viewport press “m” key to toggle between world/local/view/component mode.

2nd (not that comfortable in my opinion): select (object or component), RMB on handle, choose “Handle Parameters…”.
does same as above.
hope this helps,
Fuat

Thanks, but - I didn't talk about handles, manipulators or viewport interaction at all. To explain it simple: in Softimage, Blender (to some extent), I think in Maya too - if you set rotation key on IK driven bone, and you set IK weight to zero, later, bone will stay on same rotation.
  • Quick Links