Maya : sample values from an animation Curve


Hi All,

I need to rig/script something that takes a single animation curve as input and other nodes need to sample the value from it at an random time. For example you animate a x rotation and other nodes need to follow with a delay.
I’ve got a proof of concept setup with expression, but people are telling me expressions are slow and I’d better use nodes. I don’t see time sample from curve type nodes in default maya 2016 that I have to work with.

  1. Are expression really that bad? I think my scene will end up with ~600 of nearly the same expression (but unique for that node) if I’d roll this out.
  2. Are there nodes that can sample animation from a curve at a different time?

Any suggestions are welcome!



Found my answer here: Maya - Driving spine volume preservation with animCurve?
I think framecache node is what I need and connecting it up with varying time input/output.

Are there other alternatives perhaps?


Hey Johan,

MASH can do delay effects too if that is all you are really trying to do. It also has a Python solver. It might not be any faster than an expression, but it is Python, which is nice. I only did brief tests. You can sample time with Python commands in this solver. It can import any module you like.

Expressions can definitely get slow, but they can also be very useful. A lot of studios like to avoid things without question because they experienced some pain in the past. It’s best to test if you have the time. It is also possible to evaluate expressions on-demand instead of every frame, depending on your needs.

I’m also doing something time-based, and considering using frameCache vs. a GUI tool that the animators can call on-demand. They animate, then just hit “go” and it solves the motion. If they update the animation, they have to run it again. Not sure which route we’ll take yet.


Thanks Chris,

Mash is not in Maya 2016 right, so that’s not possible for me. I’m gonna do some tests on performance between the nodes and expressions and decide on the right route for me. A “fire and forget” script is not an option for me as it needs to be interactive. Hopefully it stays interactive when I have a lot of them, but we’ll see. Amd I agree about past problems dictation future decisions :slight_smile: I try to keep an open view, hopefully without getting burned to hard :slight_smile: