simple sop question

   2559   1   0
User Avatar
Member
313 posts
Joined: July 2005
Offline
How can I loop the keyframes (or animation curve) in the channel editor?

How can I make partition group rule?
I tried to make groups which contains

partition_group1 = primitive0 - primitive9;
partition_group2 = primitive10 - primitive19;
partition_group2 = primitive20 - primitive29;
………………………..


I got frustrated about the partition rule because the houdini menu always does not have sufficient examples and explainations.
User Avatar
Member
7709 posts
Joined: July 2005
Online
1. Make a channel segment that is the length that you want to repeat. Highlight it in the graph mode of the channel editor. In the function pulldown menu, choose cycle(). If you don't want a repeat with offset, substitute cycle with repeat instead.

2. The Partition SOP evaluates the expression contained for each of the given entities (points or primitives). Whatever the name comes up in evaluating the rule, the entity goes into that group. For help on the expression language look in the corresponding pdf file. If you look at the examples, you will note the use of backticks which embeds an expression into a regular string. The trick really is to know which local variables are available for use (besides knowing how the expression language works). For points, try the help for the Point SOP. For primitives, try the Primitive SOP.

Now to answer your question, I'd try this: partition_group`int($PR/10)+1`
$PR gives the current primitive number that we're deciding to put into which group. So dividing by 10 and casting to an integer will give you 0 for numbers 0-9, 1 for 10-19, 2 for 20-29, etc. Since you wanted the numbering of the groups to start from 1 instead of 0, you just need to add 1.
  • Quick Links