December 1, 2005, 5:34pm
I have a Spread with 360 slices (thnx for the help Sanch :), and all the slices contain a value that is either 1 or Zero.
Now, I have another Spread, let’s pretend it has 360 colors (thnx for the sweet patch Kalle :) ).
I want to change only the colors in the color spread at the place where in the value spread a value off 1 is given (still with me?)
I can do that wit get slice and set slice, but than I need the numbers off the slices where the value is 1.
I patched something that does it for me (see attached patch), but it uses the ‘buggy’ sift node, and converting a value to a string just to get this information is not very nice. (but it works)
Any one sugestion how I can reach the same goal on a nicer way (only working with numbers).
Thnx for the time!! :)
get slice using sift.v4p (12.0 kB)
December 1, 2005, 6:10pm
have a look at the help patch of the select (value) node!
on the right side (Select pin) you have your 0 & 1 spread.
on the left side (Input pin) you don’t have to put anything because the new pin “Former Slice” just outputs which slices were selected.
December 1, 2005, 11:47pm
Omg, how could I miss that??
I tried it, but I think I mixed up the pins :(
Thnx for the answer!! I need to use an
I (spreads) to make a spread out off al the values I want to sellect from.
Always had a feeling this could be solved different.
I attached a new patch, others might learn from it.
get slice using select.v4p (5.5 kB)
December 2, 2005, 1:24am
i found a small bug while playing with the select node. (will be fixed in the next version)
however found a way to do the stuff you wanted more general.
it allows not only a spread of 0 & 1 to select the slices, it allows to say how many times you want to select them.
and the countindices node is the right candidate if you have a bunch of indices and want to form a spread which outputs how many occurences you have for each slice. (just the other way 'round)
get slice using select.v4p (7.8 kB)
December 3, 2005, 2:05am
That looks prety interesting indeed!! Now I can do the same things to different spreads.
But wow, I could just use
Blend (color) to do what I want, it is soooooooooooo easy…
(and now I am going to sit in that corner with my popcorn-box-shaped donkey hat on my head))
Mixing Colors Use Blend.v4p (8.2 kB)