Using channel reference to mimic driven keys in maya [solved]

   Views 806   Replies 6   Subscribers 2
User Avatar
Member
256 posts
Joined: 2月 2016
Offline
Hello,

Someone was asking me how to do the houdini equivalent of a driven key in maya. At first I thought it could easily be done with a channel reference. In my attached gif, you can see I have a cube that is animated to move on the x axis. I copied that parameter to sphere's y axis. And now the sphere moves up as the cube moves to the right. Here is where I got stumped. He showed me in maya that you can control the interpolation of the driven key in the graph editor. I tried doing the same in houdini, but you will notice when I select the sphere it actually just shows the box's translate x parameter in the graph editor (instead of the sphere translate y). But I only want to control the curve of the "driven" parameter without affecting the source. If you reference a channel as I have done, is there anyway to control that interpolation in the animation editor? I know I could setup some way using vex and a ramp to control the interpolation, but is there a easy way to mimic a maya driven key that will allow me to adjust the result in the animation editor?

edit: I have seen lots of really old posts about this in the forum. wondering if there anything new.

Thanks


Edited by evanrudefx - 2025年1月14日 01:35:03

Attachments:
ref.gif (3.2 MB)

Thanks,

Evan
User Avatar
Member
9114 posts
Joined: 7月 2007
Offline
you can use chf() or cht() expressions for this
use them to reference parameter holding the remapping curve
both of them have second argument where you can reference the value of a "driver", the only difference is that chf() will interpret the "driver" value as frames and cht() as seconds when sampling your remapping curve channel
Edited by tamte - 2025年1月13日 21:34:06
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
256 posts
Joined: 2月 2016
Offline
tamte
you can use chf() or cht() expressions for this
use them to reference parameter holding the remapping curve
both of them have second argument where you can reference the value of a "driver", the only difference is that chf() will interpret the "driver" value as frames and cht() as seconds when sampling your remapping curve channel

Right, that makes sense. But that wouldn't work with the animation editor, right? When I select the node there is nothing in the graph editor to adjust. I just want a curve to show in the animation editor that I can adjust like with regular key framed animation.

Attachments:
Capture.JPG (153.2 KB)

Thanks,

Evan
User Avatar
Member
9114 posts
Joined: 7月 2007
Offline
evanrudefx
But that wouldn't work with the animation editor, right?
it will, but maybe the descriptions was not clear enough, you want to drive te frame or time argument with your box tx value, not with $FF

here is an example set up as described

Attachments:
ts_set_driven_key.hipnc (119.6 KB)
ts_set_driven_key.gif (490.9 KB)

Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
256 posts
Joined: 2月 2016
Offline
tamte
evanrudefx
But that wouldn't work with the animation editor, right?
it will, but maybe the descriptions was not clear enough, you want to drive te frame or time argument with your box tx value, not with $FF

here is an example set up as described
Image Not Found

Oh thanks! I knew I was missing something! It's a bit odd trying to get the timing right, but I can work it out.

Thanks!
Edited by evanrudefx - 2025年1月14日 01:17:48

Attachments:
working.gif (3.4 MB)

Thanks,

Evan
User Avatar
Member
9114 posts
Joined: 7月 2007
Offline
evanrudefx
It's a bit odd trying to get the timing right, but I can work it out.
it's all about the values, if you look at the example, it's using chf() mostly because for me it's easier since the frame numbers are visible

the example remap curve goes from -2f to 2f
meaning that as the box1/tx value goes between -2 and 2 the sphere1/ty follows the remap curve value
so it's all about remapping values, nothing to do with the actual frames or time
Edited by tamte - 2025年1月14日 01:18:40
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
256 posts
Joined: 2月 2016
Offline
tamte
evanrudefx
It's a bit odd trying to get the timing right, but I can work it out.
it's all about the values, if you look at the example, it's using chf() mostly because for me it's easier since the frame numbers are visible

the example remap curve goes from -2f to 2f
meaning that as the box1/tx value goes between -2 and 2 the sphere1/ty follows the remap curve value
so it's all about remapping values, nothing to do with the actual frames or time

Thanks. In my test I just chose some arbitrary range for my keyframes. 1-7 (just to see if I could get it working at any value). I took the translate x of the box and fit it to the range of the keyframes. So when the box made it to a value of 4 in x, the sphere will also evaluate at frame 7 which is the final frame. It definitely makes sense. Definitely more control here but definitely easier in maya. When I said timing, I more so meant remapping the ranges to get the right animation timing.
Edited by evanrudefx - 2025年1月14日 01:36:47

Attachments:
Capture.JPG (178.1 KB)

Thanks,

Evan
  • Quick Links