Modulus question

I’m trying to load in a .bgeo sequence that I want to loop over a specific frame range. Having trouble getting the modulus functioning correctly.

In Houdini, given a frame range of 2155, I would typically write out my file name in the file in sop as /filename.$F4%2155.bgeo

Can’t seem to get this working in touch.

Also is there a way I could have it count up to 2155 and then back down to one using expressions? I have yet to figure out how to create my own variables but I’m guessing this would be the preferred method. Does anyone have an example file they could post?

Thanks!

-Matt

you can use

/filename.padzero($F%2155,4).bgeo

if you are saving out files this way and your realtime flag is checked, not every frame will save out a file.

for the filename issue, the only way to do it in one expression would be to use the half the range and increment for the first half, decrement for the second half. if you don’t want to use half the range, then the simplest way is to use a count CHOP followed by a limit chop with type set to Zigzag. use the limit chop value in your filename. the count CHOP will have to be initialized on the first frame one only.

any particular reason why you want it to count up & down? might be more work than its worth.

Selina

Thanks for the help! Should actually be written like this though:

padzero(4, $F%2155)

I realized that I could just duplicate my sequence and order it backwards starting with frame number 2156 - 4300 to achieve the effect I want.

Thanks again.

-Matt