keyframed lookup curve?

I’ve been trying to come up with a way to create an interpolated curve that correlates to variables based on some arbitrary keyframes. I know the animation comp can kind of do it, but is there an easier way? I’d have thought that a DAT to CHOP might be able to, but it seems like you can’t really specify both the X and Y axes the way I want to… is a Keyframe CHOP with an Animation COMP the only way or is there something obvious I’m missing?
-michael

Hi Michael,

I’ve run into the exact same problem. The keyframe chop doesn’t seem to work properly without an animation component attached, which means real time editing of this data gets dicey - injecting values into an animation comp isn’t too bad, but then there can be weirdness in how this animation displays in the ui and plays back.

For me, I realized that while ‘inefficient’, figuring out your required sampled density, then just computing every single time step, then loading everything into a huge chop (whether a dat to chop, or saving out .bchan data from houdini etc), and using a lookup chop for real time playback can be way more efficient than you’d think. Maybe several hundred thousand samples sounds like a lot, but in reality that’s only KB or MB of data. You will sometimes need to be very careful with that data to ensure it’s playing back properly - scaling the lookup properly, throwing some trim chops to absolute zero to avoid extra samples on frame drops, all the usual chop tricks - but it definitely works!

Thanks for the info, jmt4zj. Since it doesn’t seem to exist, I made one myself. It uses the Animation comp in the way you suggest, but actually does seem reliable. You feed it a table with X and Y values and it generates a spline. It takes an index input and outputs a nice interpolated value. I had to do a few funky things though… for example, it internally multiplies the “X axis” by 1000 to get the resolution to make keyframes work.
keyframeLookup.toe (5.31 KB)