[Sidefx-houdini-list] copy_stamp_order

Phil Spicer PSpicer at bournemouth.ac.uk
Mon Apr 23 04:42:12 EDT 2018

Hi Herman,

A slightly more hand crafted solution...

Wrap a copy to points sop in a For Each Point block, and on the grid copy stream do an attribute create before the input to the for each block begins (using the % operator - for example an attribute called banana with the value @ptnum % 4) .

This can then be called in the Switch SOP using point(“../foreach_begin1”,0,”banana”,0), and in turn will give you the 0,1,2,3,0,1,2,3,0,1,2,3 etc count order.

To get the 0,1,2,3,3,2,1,0,0,1,2,3,3,2,1,0 counting, branch a Sort SOP from the grid and set it to reverse, and append a copy of the attribute create sop under the sort.

The grid has two network streams; however before merging them together and feeding them into the for each point block, append a Delete SOP to each network stream and do a Point Delete By Range.

delete1 -
Start / End 0 $N
Select_of_ opninputs("../switch1") opninputs("../switch1”)*2

delete2 -
Start / End  opninputs("../switch1")   $N
Select_of_ opninputs("../switch1") opninputs("../switch1”)*2

When these two streams are merged together you should get close to what you are after.

The problem with using a sin/cos is that it is a wave count rather than a linear count, and there probably is a more elegant solution than what I have described above; however hopefully it should get you up and running.

Kind regards,


Philip Spicer
Programme Leader - MA Digital Effects
National Centre for Computer Animation
Bournemouth University - UK


On 23 Apr 2018, at 07:50, herman02 at netvigator.com<mailto:herman02 at netvigator.com> wrote:

hi all,

I have 4 objects say 1,2,3,4 and link to a switch sop, how to I stamp in on a grid with the order say 1,2,3,4,1,2,3,4 or 1,2,3,4,4,3,2,1 and so on?

The most commonly use are rand expression at the switch sop -
rand(detail("../foreach_begin1_metadata1", "iteration", 0))*+1

But I would like to control the order.



Sidefx-houdini-list mailing list
Sidefx-houdini-list at sidefx.com<mailto:Sidefx-houdini-list at sidefx.com>

BU is a Disability Confident Employer and has signed up to the Mindful Employer charter. Information about the accessibility of University buildings can be found on the BU DisabledGo webpages. This email is intended only for the person to whom it is addressed and may contain confidential information. If you have received this email in error, please notify the sender and delete this email, which must not be copied, distributed or disclosed to any other person. Any views or opinions presented are solely those of the author and do not necessarily represent those of Bournemouth University or its subsidiary companies. Nor can any contract be formed on behalf of the University or its subsidiary companies via email.

More information about the Sidefx-houdini-list mailing list