Search - User list
Full Version: Transposing a channel
Root » Technical Discussion » Transposing a channel
koen
Hello all,

I have an animation the runs from frame 20 to 200, the values are from 0 to one.

I am looking for a chop node (or expression) that will allow me to find the frame at which the curve passes a certain value. If I could transpose the chop ( x becomes y and y becomes x) I could look up the values, is there such a chop?

Thanks,
Koen
edward
Shuffle CHOP [sidefx.com].
AndrewJBeard
Hmm… for a minute there I thought all my work my Transpose Chop was for nowt ‘cos I hadn’t read about the Shuffle Chop properly. However, I think koen was asking for something a little different than what the Shuffle Chop can do - which is exactly what I created the Transpose Chop for: see attached.

A few words of warning: I haven't fully tested it on arbitrary data - only my own needs which was to transpose a channel of never-decreasing data in the range 0 to 1. I don't know what will happen if you try to give it a decreasing data set, or one that increases and decreases (although this latter case has no real meaning for a transpose operation since channels cannot ‘loop back’ on themselves).

I also haven't supplied a test hip as such (I'm lazy) - the attached file is just the raw Vop network. However you should get an idea from the network how I went about solving the problem. I forget the intricacies of why every node has to be there (and trust me, they all do) as I wrote it a while ago. Anyhow, the basic principle is that for each index the Vop iteratively ‘hones in’ on where the channel crosses a certain threshold and sets this as the new sample value. I recall using some clever base-2 logarithmic math to compute how many iterations were needed for a given channel length, but forget how this works exactly.

I'd be interested to know how you came to need this Chop, koen, as I've been using it myself for reparameterizing motion along curves and I keep getting stuck on the damn camera flipping when the view and tangent normals coincide. From what I've learned so far, only ‘pythagorean hodograph’ curves posses the property of uniform (i.e. not wierd) frenet frame rotation over their length, and the term alone was enough to scare me off following it up any further. My maths just ‘aint good enough.

Anyway, hope the Transpose Chop helps. If you modify it to account for more general cases (i.e. decreasing channel data) I’d love to hear back from you.

All the best,

Andrew
koen
Thank Andrew, that indeed is much closer to what I was looking for.

I solved it in a different way, there are several, but to me, this really felt like a chops problem.

I am animating the “on” state of points on a curve, by animating a value and turning on the points if the “u” value is < this animated value. I have this curve.

Now I want to store an attribute on each point that stores the frame at which it when it turns on ( this is not an animated value, there us just a “on_frame” and it is set once.

I currently used a simple sop solver for this, but the transpose would have been simpler I feel.

Cheers,
koen
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB