Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

keyframed lookup curve?

General discussion about anything TouchDesigner

keyframed lookup curve?

Postby mji » Thu Jul 18, 2019 5:39 pm

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
mji
 
Posts: 322
Joined: Tue Oct 28, 2008 4:21 pm

Re: keyframed lookup curve?

Postby jmt4zj » Sun Jul 21, 2019 11:22 pm

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!
Jonathan Thompson
@pointshader
http://pointshader.com
User avatar
jmt4zj
 
Posts: 160
Joined: Mon Nov 01, 2010 3:15 am
Location: NYC

Re: keyframed lookup curve?

Postby mji » Mon Jul 22, 2019 8:36 pm

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.
Attachments
keyframeLookup.toe
(5.31 KiB) Downloaded 22 times
mji
 
Posts: 322
Joined: Tue Oct 28, 2008 4:21 pm


Return to General TouchDesigner Discussion

Who is online

Users browsing this forum: No registered users and 25 guests