Page 1 of 1
wire: Randomly pick slices from slice input?
Posted: Sun Mar 20, 2022 16:00
by cosmowe
Hey there,
I am using a slice input with the 4x4 dummy.
I would like to pick for example 8 random slices out of the 16 slices and turn them magenta.
I am fiddling around here the last hours an cannot find a way to do it. I could hardwire it.... but that's not usable for me
any idea
Best wishes
cosmowe
Re: wire: Randomly pick slices from slice input?
Posted: Mon Mar 21, 2022 09:17
by Zoltán
slice in-> reshuffle -> Read
--begin-wire-patch--
735.3ocuV0zaiBCD8uxJeFhrM1FH2XayJ0K6gtGqxAWvIwZI1Qfoenp7eeGCIDXaZK8C0DIR7n23Y77diGdBkaMFUtSaM0n427DZUkcK7Gb.x13103PKCPNKXgD3w5jZipBsbePOTxQn3drTO1xxt8cD3nmClEfzlNKC.xN6tpMEpG.bfIisPAo7SHr+gz4pz2135LoM0NoIuag6wcJzbjoY6sPlGftSV1.FHh86CP2ZaLEsv1nzq23PySfvbutvsAfDAkgG7PIyDbFlSiiXQw7.zin4QrjYXJgy3LBlvETNrc4kx5tLn.BYbrHMlJ3gJAYUHiliCSHTYHtHWhYpXF3kOgTU095zbb6NXy+K36c5BkE0VGsUv5UvGgDiaM0d7bGNpdR5zwrtTmqNcJuwzTVF708XounsQWTnf78lCQ2yFxs9n+Gez+wUFDfh7bdoW.EVn2pL0cpt9befwSG.hX49ARuvNr89z9SO5CGevgUk16G.qc4.X50FYI57J.dxIEPJuUADwncjdJ4kY4r3KuLjcQJKLUr3xvnnrEfXQrHSj8YY4ScdeiLc.pnYGDDoaTizsVa4ovtRVVq.nUp5MMqVUNhapzqWOrmyuu.1ZkpX.LswoFACOVjMHKN36.A2gfBNPOmd63kPe.AWuqSTw0d2z6HNIK6cZZh0ine874X0rEtSUsyVJauF9jG4arijNneaMsGg6qj61oMqeMrWq1ojto25vSEssNrHwjacXY7y15P9PsN8Ch9V6c5FU8JpbXF6nuiuZ8jD+ZkrvSNQOWeOccieP5aHb.u87ZvjldlLY9mvfgmXNSjbXvIKgNiyIQBBNIJMwOP8kEFKRWPBY+L6hvzXFMDLsfSwwYDbzmUXb3kNFU9fBv6le90w5F6SSPu6KOlNsdV5x+9M++jNd5LfRRDBJAmFMfyn7TNkvdCBKKlPGNDLi7kMD7qhvtxTn8p68cisrMUcZ886+GvLodX6
--end-wire-patch--
Re: wire: Randomly pick slices from slice input?
Posted: Mon Mar 21, 2022 10:12
by cosmowe
Hey Zoltan,
oh man ...thank you very much.... The magic sauce in your patch was Float -- indices --- index .......
I was thinking all the time that "read" can only have one instance
Thanks
cosmowe
Re: wire: Randomly pick slices from slice input?
Posted: Mon Mar 21, 2022 15:19
by Zoltán
You can read multiple values, with a multi instance index.
Using the indices is easier for me, than setting a multi instance integers.
You could also check the Size of the Slice in, and use that as max to generate Random numbers, join those together into a single cord, and use the read. That might generate the same random numbers though.
Re: wire: Randomly pick slices from slice input?
Posted: Thu Mar 24, 2022 10:32
by cosmowe
Zoltán wrote: Mon Mar 21, 2022 15:19
You can read multiple values, with a multi instance index.
Using the indices is easier for me, than setting a multi instance integers.
You could also check the Size of the Slice in, and use that as max to generate Random numbers, join those together into a single cord, and use the read. That might generate the same random numbers though.
Hey there.... I've got a follow up question to this. In the upper case, is there any option for me in wire to change the instance-count of a node with for example a Int-In or so?
thanks in advance
cosmowe
Re: wire: Randomly pick slices from slice input?
Posted: Thu Mar 24, 2022 12:10
by Zoltán
Dynamic instancing only works for Slice in currently. Adding slices in Resolume, all following nodes will behave like if you'd set the slice in in Wire manually to different instance count.
I'm guessing you'd like to be able to choose a different count of random slices, right?
That I'd do with reading the max amount of slices I want to support, then render the ones which are not needed either off screen, transparent, or very small.
Reading 10 items from a smaller set like 3 (0-2) can be done two ways, with the Warp setting.
Repeat will loop back to first item at index 3, then read the second again at 4.
Clamp will read the last item repeatedly with higher indexes.
Re: wire: Randomly pick slices from slice input?
Posted: Thu Mar 24, 2022 20:45
by cosmowe
Zoltán wrote: Thu Mar 24, 2022 12:10
I'm guessing you'd like to be able to choose a different count of random slices, right?
I cannot hide my intention from you...

yes of course, you are right.
I will dive into your suggestions shortly.... thank you Zoltán
Re: wire: Randomly pick slices from slice input?
Posted: Fri Mar 25, 2022 16:43
by cosmowe
Zoltán wrote: Thu Mar 24, 2022 12:10
That I'd do with reading the max amount of slices I want to support, then render the ones which are not needed either off screen, transparent, or very small.
Reading 10 items from a smaller set like 3 (0-2) can be done two ways, with the Warp setting.
Repeat will loop back to first item at index 3, then read the second again at 4.
Clamp will read the last item repeatedly with higher indexes.
With the clamp the last instance indexes just stays at a value. So the last slice is rendered multiple times over another... for my use case that is not a problem. So no need to render them tiny or transparent. ...I guess

- Unbenannsdt.PNG (14.15 KiB) Viewed 9513 times
Thanks Zoltán for pointing me in the right direction.... works like a charm.
I now solved it that way....
Thanks!
Re: wire: Randomly pick slices from slice input?
Posted: Thu Jan 11, 2024 23:04
by Difrique - ERA CT
I have been looking all over for this discussion. You guys Rock
Got the standard slice chaser down demonstrated in the 7.10 release video.
Now trying to figure out the random selection and multiple slices option.
@cosmowe could you please share some more screenshots of how you figured it out?
Thanks!
Re: wire: Randomly pick slices from slice input?
Posted: Tue Jan 23, 2024 08:41
by edwin
Maybe also good to mention is that since this topic has been created we worked on attribute flow.
Meaning that you can set the amount of instances to read through an input/inlet now.