Offset Attribute Value in time

   1212   11   1
User Avatar
Member
65 posts
Joined: Jan. 2019
Offline
Hi,

I've got a situation where I need to offset an attribute in time and I can't seem to figure it out.

Example,

Attribute 'foo' animates from 0-1 across 24 frames. However, it's offset per point, so each point arrives at 1 on different frames and all points are 1 by frame 24.
I need 'foo' to animate from 0-1 across 48 frames (or some other arbitrary time frame), while maintaining each points individual offset.
I essentially want to create a delay in the 'foo' attribute.

Any suggestions, VEX or VOPs?

Example file included. How far I got is in the VOP node.

Thanks!
Edited by TheDude123 - Jan. 12, 2024 12:17:15

Attachments:
attribute_delay_v001.hipnc (160.7 KB)

User Avatar
Member
46 posts
Joined: April 2016
Offline
Hi,
I think you should look in the CHOP direction as this is animated in time attribute and you want to change range of animation. I don't have a lot of knowledge of this context unfortunately.
User Avatar
Member
65 posts
Joined: Jan. 2019
Offline
vicvvsh
Hi,
I think you should look in the CHOP direction as this is animated in time attribute and you want to change range of animation. I don't have a lot of knowledge of this context unfortunately.

Yeah, I saw CHOPs popping up in my searching, but I'm not familiar with CHOPs...or should I say, I don't currently have the CHOPS to do it in CHOPs (hehe).
Hoping there is another way (maybe fitrange or using @Frame somehow).
I updated the file to better reflect my current issue for anyone interested.
Thanks
User Avatar
Member
2041 posts
Joined: Sept. 2015
Offline
If I understand you right, you should be able to easily do what you want with the time warp node, using the 'Input Frame Range' parameter to equate your bezier parameter function start and end frames - Then define the 'Output Frame Range' to either shift the start and end times somewhere else or stretch(1-48 rather than 1-24 for example)or even both shift and stretch.
User Avatar
Member
65 posts
Joined: Jan. 2019
Offline
BabaJ
If I understand you right, you should be able to easily do what you want with the time warp node, using the 'Input Frame Range' parameter to equate your bezier parameter function start and end frames - Then define the 'Output Frame Range' to either shift the start and end times somewhere else or stretch(1-48 rather than 1-24 for example)or even both shift and stretch.

That kinda works, but the issue I'm running into now is:
I've got a transform attribute (3x3 matrix from kineFX) that I'm trying to offset. With the timewarp, it's offsetting Translation, Rotation, and Scale. I ONLY want to offset the SCALE though...otherwise the positions are all weird.

See images for visual aid.
First is with timewarp.
Second without (for reference)
Edited by TheDude123 - Jan. 12, 2024 17:11:30

Attachments:
Captureq.JPG (286.3 KB)
Captureg.JPG (319.0 KB)

User Avatar
Member
46 posts
Joined: April 2016
Offline
Try this. In the hip current range of animated @foo (24 frames) stretched in time to the new range (48 frame). Start time still the same, end time changed.

Attachments:
attribute_delay_v001_01.hipnc (226.6 KB)

User Avatar
Member
2041 posts
Joined: Sept. 2015
Offline
You can do chops then and only address specific parameters/channels.
In this example I was able to directly feedback into the foo parameter with some re-cooking to clear the infinite recursion,
but it's probably not a good idea, so in this example foo is in the previous node and the chop re-time or stretch is having the export directed to the next node as scale.
Edited by BabaJ - Jan. 13, 2024 11:22:51

Attachments:
attribute_delay_v002.hipnc (156.2 KB)

User Avatar
Member
65 posts
Joined: Jan. 2019
Offline
vicvvsh
Try this. In the hip current range of animated @foo (24 frames) stretched in time to the new range (48 frame). Start time still the same, end time changed.
Hi Victor! Didn't recognize the screen name.
That does work, but I'm running into the same problem as with BabaJ's solution. It's on me though, I read my description in the first post and it's incorrect for what I need.
I think what I'm after is a way to trigger the scaling once a certain threshold is reached.
Here is what I have so far:

Tracking @foo and seeing when it reaches 1.0 on each point.
Once it reaches 1.0, an i@counter attribute starts.
If the i@counter attribute is greater than a chi("threshold"), trigger scaling of objects.

Now I run into the problem:
How do I store an attribute that increases over say 10 frames (0-1 value). Then use that attribute to scale the spines (the white outlines in the images above).

So as an example (I have MUCH more points FYI):
At frame 10: point 0 reaches an @foo value of 1.0, at frame 20 the @counter is 10 and the scaling is triggered.
At frame 15: point 1 reaches an @foo value of 1.0, at frame 25 the @counter is 10 and the scaling is triggered.
At frame 20: point 2 reaches an @foo value of 1.0, at frame 30 the @counter is 10 and the scaling is triggered.
AND SO ON...

Ultimate goal: the spines stay with the animated geo and scale-up after the curve is unfolded (after @foo is 1 and the @counter threshold is reached). As of now, they scale-up but the animation timing is too fast. I'm trying to offset it with the above workflow.
Edited by TheDude123 - Jan. 13, 2024 11:35:36
User Avatar
Member
65 posts
Joined: Jan. 2019
Offline
BabaJ
You can do chops then and only address specific parameters/channels.
In this example I was able to directly feedback into the foo parameter with some re-cooking to clear the infinite recursion,
but it's probably not a good idea, so in this example foo is in the previous node and the chop re-time or stretch is having the export directed to the next node as scale.
Thanks, BabaJ
I'll give this a look and see if it works with my set-up.
User Avatar
Member
117 posts
Joined: Aug. 2017
Offline
Chop's

Attachments:
cv.hiplc (91.8 KB)

Conservation of Momentum
User Avatar
Member
46 posts
Joined: April 2016
Offline
TheDude123
Hi Victor! Didn't recognize the screen name.

Never mind!

TheDude123
How do I store an attribute that increases over say 10 frames (0-1 value). Then use that attribute to scale the spines (the white outlines in the images above).

solver sop I think

TheDude123
Ultimate goal: the spines stay with the animated geo and scale-up after the curve is unfolded (after @foo is 1 and the @counter threshold is reached). As of now, they scale-up but the animation timing is too fast. I'm trying to offset it with the above workflow.

it's hard to say without seeing your setup but maybe reading somehow attribute that triggering spines scaling.

In hip my guess where I skip counter part, it is just a concept.

Attachments:
attribute_delay_v001_02.hipnc (326.9 KB)

User Avatar
Member
65 posts
Joined: Jan. 2019
Offline
Thanks everyone for the suggestions and files! I got it working.

I'm using TWO solvers.
First solver initializes a i@counter attribute.
Second initializes a float attribute (f@s) which increments when the i@counter is greater than a threshold. Once the f@s is > than 1.0, f@s is set to 1.0.
Then in a point wrangle after the solvers, I'm using: scale(3@transform, set(f@s, f@s, f@s)); This scales the spines at the end of the curve.
In the video, the @foo attribute is colored (Red is full 1 value). You can see that the scaling of the spines is slightly offset back in time (@foo is 1 for a few frames, then the spines grow on).

Image of network and video below:

https://www.dropbox.com/scl/fi/uerf0a90oqgil5aqyzzmu/Offset_Scale.mp4?rlkey=guzlqkvllspbqecmt4yp5i1xr&dl=0 [www.dropbox.com]
Edited by TheDude123 - Jan. 13, 2024 22:53:31

Attachments:
Offset_Scale.mp4 (65.0 KB)
Capture.JPG (116.7 KB)

  • Quick Links