[Sidefx-houdini-list] copy_stamp_order

herman02 at netvigator.com herman02 at netvigator.com
Mon Apr 23 10:50:05 EDT 2018


hi Philip,

thanks for the effort of showing me, it works!

cheers
Herman

----- Original Message -----
From: "Phil Spicer" <PSpicer at bournemouth.ac.uk>
To: sidefx-houdini-list at sidefx.com
Sent: Monday, April 23, 2018 4:42:12 PM
Subject: Re: [Sidefx-houdini-list] copy_stamp_order

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,

Phil.


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

https://www.youtube.com/user/NCCADigitalFX


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.

Thanks.

Herman



_______________________________________________
Sidefx-houdini-list mailing list
Sidefx-houdini-list at sidefx.com<mailto:Sidefx-houdini-list at sidefx.com>
https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list

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.
_______________________________________________
Sidefx-houdini-list mailing list
Sidefx-houdini-list at sidefx.com
https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list


More information about the Sidefx-houdini-list mailing list