Time Shift inside For-Each Loop

   14560   9   3
User Avatar
Member
146 posts
Joined: Jan. 2016
Offline
Hello,
Time Shift inside the For-Each Loop is ignored?

Do I have to find a workaround (do second branch with the Time Shift before the Loop and store timeshifted results in some “external” attribute and read it inside the first Loop?)

Or is there some simple workaround, please?

Thank you very much!
User Avatar
Member
4504 posts
Joined: Feb. 2012
Online
You need to connect TimeShift directly into the incoming node before the Block Begin node.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
146 posts
Joined: Jan. 2016
Offline
Thank you. I need to use Time Shift inside the loop … but I will have to find workaround, probably. Thank you for your answer, now I know that it is not my fault, that it doesnt work

Do you know why it doesnt work? I would like to understand it.
User Avatar
Member
4504 posts
Joined: Feb. 2012
Online
That's the proper way, you need to connect the TimeShift to the input node directly, not to Block Begin node.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
146 posts
Joined: Jan. 2016
Offline
Like this? Time Shift cannot be inside the loop, ok?

Attachments:
timeshift.hipnc (97.6 KB)

User Avatar
Member
4504 posts
Joined: Feb. 2012
Online
No, connect the output of TimeShift to Block End node.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
146 posts
Joined: Jan. 2016
Offline
Hello Pusat, thank you very much. But I did not succeed

I wanted to have two streams inside the For Each:

- block begin
- one stream with the timeshift (to see the “end state”, where the circle ends)
- second without the timeshift (to keep the animation)
- attribute transfer from the timeshifted stream
- rotate the animation, according to the end state
- block end

Is it possible? I did not succeed, so I made two separate Blocks … in the attached file.

Attachments:
timeshift-two-streams.hipnc (174.4 KB)

User Avatar
Member
7 posts
Joined: Oct. 2013
Offline
Hi ikoon. I'm having the same problem here. Trying to get a time offset for a series of wedges and a timeshift inside a foreach loop, however it appears timeshift simply doesn't work inside a loop.

Did you ever manage to find a workaround?
User Avatar
Member
146 posts
Joined: Jan. 2016
Offline
Hello, unfortunately I did not find a workaround. Maybe you could write a file cache outside the loop, and then read the specified frame inside the loop? EDIT: I mean, use the File Cache SOP and Save to disk outside of the loop, do you understand? I did not test this.
Edited by ikoon - Oct. 6, 2016 13:35:56
User Avatar
Member
2 posts
Joined: Feb. 2018
Offline
Hello,
I didn't take a look at your files but here is a simple example of using Time Shift SOP in a Foreach loop - for eaxmple to offset animations per primitive.

Maybe you could adapt this approach to your scenes?
Edited by juraj - Feb. 1, 2019 13:12:52

Attachments:
timeshif_foreach.hipnc (97.0 KB)

  • Quick Links