3 new Array ICE nodes
Plugins linking to this thread: (hide)
Most Common Array Element
Returns the most common element from an array. Works in object and per component context.
Can be modified to find the second most common element and so on. Compound screenshot.
local backup: Get Popular Number.xsicompound
local backup: Get Popular Number.xsicompound
ICE Array Nodes
A set of ICE nodes for some array operations that are not possible to recreate using
factory nodes. Examples are: grouped sums, cumulative sums and operations on 'fake'
2D arrays (=linearized to a normal array).
Includes (from the si-community thread): Get Grouped Sums Array - groups values from an input array in a specified pattern and outputs the group sums as a new array. It can also do cumulative sums. If you're not working in a subcomponent context, you can also try this approach using GenerateSampleSet. Get Grouped Products Array - Same for products of array entries... uses cross product for vectors - Get Cumulative Sums Array - This one is a convenience node that does what is shown in example #4. It contructs the group sizes array based on the input array and output the cumulative sums array [A1, A1+A2, A1+A2+A3, A1+A2+....] - Get Repetition Array - This is a simple compound that creates repetions of an array, number of repetions is configurable of course. It is used to prepare a normal array for an operation with a 'fake' 2D array.
See the si-community thread for a few examples. A more complicated example is interpolating strands by nearby guide strands. Problem here: 'Get Closest Points' returns an array of the closest points and a 'Get StrandPositions' on this would require native 2D array support which does not exist. Workaround possible with these nodes: Build a global GuideStrandPositions array by concatenating the Guides' StrandPositions and store each guide's offset into this array as an attribute on the guide. The example scene demonstrates how to use this plugin to calculate the interpolated strands from this array.
local backup: ICEArrayNodes.xsiaddon CurvesAsGuides_Example_2014SP1.scn
Includes (from the si-community thread): Get Grouped Sums Array - groups values from an input array in a specified pattern and outputs the group sums as a new array. It can also do cumulative sums. If you're not working in a subcomponent context, you can also try this approach using GenerateSampleSet. Get Grouped Products Array - Same for products of array entries... uses cross product for vectors - Get Cumulative Sums Array - This one is a convenience node that does what is shown in example #4. It contructs the group sizes array based on the input array and output the cumulative sums array [A1, A1+A2, A1+A2+A3, A1+A2+....] - Get Repetition Array - This is a simple compound that creates repetions of an array, number of repetions is configurable of course. It is used to prepare a normal array for an operation with a 'fake' 2D array.
See the si-community thread for a few examples. A more complicated example is interpolating strands by nearby guide strands. Problem here: 'Get Closest Points' returns an array of the closest points and a 'Get StrandPositions' on this would require native 2D array support which does not exist. Workaround possible with these nodes: Build a global GuideStrandPositions array by concatenating the Guides' StrandPositions and store each guide's offset into this array as an attribute on the guide. The example scene demonstrates how to use this plugin to calculate the interpolated strands from this array.
local backup: ICEArrayNodes.xsiaddon CurvesAsGuides_Example_2014SP1.scn
author site: http://rray.de/xsi / si-community thread
3 new Array ICE nodes
Get Grouped Sums Array
adds up groups of values from the input array and outputs the group sums as a new array. It can also do cumulative sums. If you're not working in a subcomponent context, you can also try this approach using GenerateSampleSet: http://xsisupport.com/2014/02/27/ice-su ... -of-group/
INPUTS
---> Input Array: The input array that gets read from for the additions (allows per subcomponent, object contexts and as datatype: vector, scalar, integer, quat, color)
---> Group Size(s): The number of elements in each "addition group". Can be an array.
---> Increment: Steps to take to find "next" group element to add. Usually 1 but other values can make sense, see examples.
OUTPUT
---> Result Array: Output array of the sums of the individual groups. Get set to the same datatype and context as the Input Array.
EXAMPLES
// Example 1: groups of 4
Input Array: [2,3,0,5,0,1,2,3,1,5,5,5]
Group Size: 4
Increment: 1
Result: [2+3+0+5, 0+1+2+3, 1+5+5+5]
// Example 2: groups of 3, every 4th element
Input Array: [2,3,0,5,0,1,2,3,1,5,5,5]
Group Size: 3
Increment: 4
Result: [2+0+1, 3+1+5, 0+2+5, 5+3+5]
// Example 3: differently sized groups
Input Array: [2,3,0,5,0,1,2,3,1,5,5,5]
Group Size: [1,5,2,4]
Increment: 1
Result: [2, 3+0+5+0+1, 2+3, 1+5+5+5]
// Example 4: cumulative sum
Input Array: [2,3,0,5,0,1,2,3,1,5,5,5]
Group Size: [1,2,3,4,5,6,7,8,9,10,11,12]
Increment: 0
Result: [2,5,5,10,10,11,13,16,17,22,27,32]
Get Grouped Products Array
Same for products of array entries... uses cross product for vectors
Get Cumulative Sums Array
This one is a convenience node that does what is shown in example #4. It contructs the group sizes array based on the input array and output the cumulative sums array [A1, A1+A2, A1+A2+A3, A1+A2+....]
Get Repetition Array
This is a simple compound that creates repetions of an array, number of repetions is configurable of course:
// Example #1:
Input Array: [2,3,0]
Nb Repetitions: 3
Repeat Full Array: True
Result: [2,3,0,2,3,0,2,3,0]
// Example #2:
Input Array: [2,3,0]
Nb Repetitions: 3
Repeat Full Array: False
Result: [2,2,2,3,3,3,0,0,0]
enjoy and please report any bugs/ideas!
-rr
adds up groups of values from the input array and outputs the group sums as a new array. It can also do cumulative sums. If you're not working in a subcomponent context, you can also try this approach using GenerateSampleSet: http://xsisupport.com/2014/02/27/ice-su ... -of-group/
INPUTS
---> Input Array: The input array that gets read from for the additions (allows per subcomponent, object contexts and as datatype: vector, scalar, integer, quat, color)
---> Group Size(s): The number of elements in each "addition group". Can be an array.
---> Increment: Steps to take to find "next" group element to add. Usually 1 but other values can make sense, see examples.
OUTPUT
---> Result Array: Output array of the sums of the individual groups. Get set to the same datatype and context as the Input Array.
EXAMPLES
// Example 1: groups of 4
Input Array: [2,3,0,5,0,1,2,3,1,5,5,5]
Group Size: 4
Increment: 1
Result: [2+3+0+5, 0+1+2+3, 1+5+5+5]
// Example 2: groups of 3, every 4th element
Input Array: [2,3,0,5,0,1,2,3,1,5,5,5]
Group Size: 3
Increment: 4
Result: [2+0+1, 3+1+5, 0+2+5, 5+3+5]
// Example 3: differently sized groups
Input Array: [2,3,0,5,0,1,2,3,1,5,5,5]
Group Size: [1,5,2,4]
Increment: 1
Result: [2, 3+0+5+0+1, 2+3, 1+5+5+5]
// Example 4: cumulative sum
Input Array: [2,3,0,5,0,1,2,3,1,5,5,5]
Group Size: [1,2,3,4,5,6,7,8,9,10,11,12]
Increment: 0
Result: [2,5,5,10,10,11,13,16,17,22,27,32]
Get Grouped Products Array
Same for products of array entries... uses cross product for vectors
Get Cumulative Sums Array
This one is a convenience node that does what is shown in example #4. It contructs the group sizes array based on the input array and output the cumulative sums array [A1, A1+A2, A1+A2+A3, A1+A2+....]
Get Repetition Array
This is a simple compound that creates repetions of an array, number of repetions is configurable of course:
// Example #1:
Input Array: [2,3,0]
Nb Repetitions: 3
Repeat Full Array: True
Result: [2,3,0,2,3,0,2,3,0]
// Example #2:
Input Array: [2,3,0]
Nb Repetitions: 3
Repeat Full Array: False
Result: [2,2,2,3,3,3,0,0,0]
enjoy and please report any bugs/ideas!
-rr
- Attachments
-
- ICEArrayNodes.zip
- (21.33 KiB) Downloaded 586 times
Last edited by rray on 15 Aug 2014, 15:51, edited 3 times in total.
Reason: bugfix (float values did get rounded to integers)
Reason: bugfix (float values did get rounded to integers)
softimage resources section updated Jan 5th 2024
Re: 3 new Array ICE nodes
Thanks. Now to learn about arrays.
Re: 3 new Array ICE nodes
Thanks for these.. I am trying to think of a use for them.
(that sounded slightly like I'm implying that they are not useful, but thats not what i mean at all. THey are the kind of thing that will be just the ticket one day I'm sure)
Is there a way of finding (in per point context) the most common number in an array without a repeat loop? that would be useful to me right now.
(that sounded slightly like I'm implying that they are not useful, but thats not what i mean at all. THey are the kind of thing that will be just the ticket one day I'm sure)
Is there a way of finding (in per point context) the most common number in an array without a repeat loop? that would be useful to me right now.
Re: 3 new Array ICE nodes
Thanks for your feedback!
Hey pooby-
Not this one, but another compound I wrote (remove duplicates) should help with that (see attachment)
Not tested a lot
Hey pooby-
Not this one, but another compound I wrote (remove duplicates) should help with that (see attachment)
Not tested a lot
- Attachments
-
- Get Popular Number.xsicompound
- (16.61 KiB) Downloaded 415 times
Last edited by rray on 20 Nov 2014, 02:15, edited 2 times in total.
Reason: added some comments to the tree
Reason: added some comments to the tree
softimage resources section updated Jan 5th 2024
Re: 3 new Array ICE nodes
RRay walks around with a box full of tools
Re: 3 new Array ICE nodes
A magic bag of tricks =)
"Tresspassing" => making something extremely versatile.
"Incredible!"
"I Must have it!"
Capturing/Reducing Felix
Now what philosophy (not 'who') could represent the professor?
(ps: the solution to bad philosophy isn't blows to the head ;] )
"Tresspassing" => making something extremely versatile.
"Incredible!"
"I Must have it!"
Capturing/Reducing Felix
Now what philosophy (not 'who') could represent the professor?
(ps: the solution to bad philosophy isn't blows to the head ;] )
Last edited by FXDude on 21 Nov 2014, 03:02, edited 2 times in total.
Re: 3 new Array ICE nodes
haha I should make a site for collecting all these tools xD
Let me think about this question!
Let me think about this question!
softimage resources section updated Jan 5th 2024
Re: 3 new Array ICE nodes
lol! =)
Also this
Sports RRay =)
Also this
Sports RRay =)
Re: 3 new Array ICE nodes
Hey Ray, Spent some time digging through your Add Curve Guides compound today and finally grokked how the component parts of your Ice Array Nodes fit together for a gloriously intuitive strand grooming toolset. Nice work fella.
Who is online
Users browsing this forum: No registered users and 54 guests