Jump to content

how to repeat section with offset


Recommended Posts

i want to repeat two segments of the channle curve but with an offest. let say, a obect moves in tx 0.5 in frame 10, moves in tx 0.8 in frame 20. after i create these 3 keyframe, i want the object continue this movement in tx. ( that is move 0.5 in frame 30, 0.8 in frame 40...so on)

here is what i want to achieve.


Link to comment
Share on other sites

To shift the repeated parts vertically to match the previous cycle, you can use the following expression:


First I repeated only frames 1-20, since frame 0 is normally for special setups, like bind-pose. Then there is this complicated looking part after the repeat-statement. The two chf()-functions calculate the offset, by which the copies must be shifted to match the previous one. If you want some other channels repeated with offset, you will have to adjust the channel-name "tx". Also note, what the frame of the first chf-function is 19 (= 20-1), since the value at frame 20 will already be determined by the custom-expression. the floor(...)-statement will count the cycles. A general formulation of the expression would be:

SF:   start-frame
EF:   end-frame
CN:  channel-name

Sometimes Houdini messes up the display, if you move the end end-key of the repeated range. Then you will see some strange peaks, due to some round-off errors in the evaluation of the expression. If you close the channel-editor and reopen it, Houdini will place new sample-positions and everything is fine again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...