Loop offset Ramp Parameter

   3363   2   1
User Avatar
Member
39 posts
Joined: July 2014
Offline
Hello,
I'm still new to Houdini and am trying to work out how things are handled inside the app. In this scene, I originally made it in python and it made sense, inside VOP's I'm a little confused as to how to do it, or if its possible?

I'm basically looking to loop the ramp parameter across the points over and over across all the frames. If you open the file and play it back you'll notice the error half way.
Here is my original python snippet that I am trying to replicate.

The issue I am trying to get my head around, it how to deal with lists inside of VOP's. Any help would be really appreciated by this new Houdini convert


# Offset loop
def list_range(t, totalcount, mylist):
start = t % len(mylist)
end = (start + totalcount) % len(mylist)
if end > start:
return mylist
return mylist + l

Attachments:
Loop_Ramp_01.hip (125.5 KB)

User Avatar
Member
182 posts
Joined: April 2009
Offline
You were almost there
You need to offset “u”, then calculate the modulo ( to make it loop ) and pipe that through your ramp.

Attachments:
loop_ramp_01_vop.hip (82.5 KB)

User Avatar
Member
39 posts
Joined: July 2014
Offline
Thanks blackpixel, you're way makes a lot more sense
  • Quick Links