PDA

View Full Version : Select one or multiple values from a set? Get Set Size?

probiner
09-10-2014, 05:30 PM
Some times I want to filter a set and retrieve one or multiple values.
Also many times I want to know the size of the set. How many instances does this have? 20? 30?

http://i.imgur.com/4PWAZp4.png

In ICE I can't get a value from a set like that like "Select in Set", no, I have to build an array with the set and then "Select in the Array" with using a single or a set of IDs.

Anyway to get thesse done in LW? Select in a set and get the Set size? (Yeah of course then I'll ask about the set Maximum, Minimum, Average, Sum ;) )

ICE Example (cluster filters only top vertices and from those I choose vert 0 and 1. Yes the result is an array in this case, but I have access to both if I want to):
http://i.imgur.com/OJWnioe.png

Cheers

Sensei
09-10-2014, 06:19 PM
I think you might misunderstanding how nodes are working...

Actually they are called as many times as you have instances.

1st execution, id = 1,
then spot will have 1st value
you calculate result, it's applied.

2nd execution, id = 2,
then spot will have 2nd value
you calculate result, it's applied.

repeat it, over and over again..

While you're calculating id=1, results from 2nd executions do not exist, yet..

Similar for spots in images..
X on screen is 0, Y on screen is 0,
then for x=1, y=0,
then for x=width-1, y=0;
then for x=0, y=1,
....
repeat this as many times as width* height..
repeat this as many times as anti-aliasing passes..

RebelHill
09-10-2014, 07:21 PM
For the instance thing, you can use logic node... if ID==21
For the vertex thing, spot info is no good, spots aren't vertices. Use DP point info.

probiner
09-10-2014, 08:39 PM
Hey, thanks for the input.

So Size of the set is out of question I guess... big bummer... no way to set a maximum in remapping operations.
I was looking for something along the lines of Total Childs. But for any ID: Vertices, Polygons, Items, Instances Parts, etc.
http://i.imgur.com/vMAJ03w.png

Yeah I figured the logic + Mixer for instances. But that's not a single value, it will return the position when instance 21 is evaluated and return 0,0,0 for the rest. So if you want to use one instance position to offset all instances, how do you do it? Or the biggest Y value of all instances to be the max in a remap? etc.
I guess I'm also missing the order of evaluation of instances. It's probably quite last.

DP Point info is ok, but you can't also filter a single value, you have to type in the ID explicitly.

Well, it was worth to ask.

Thanks...

probiner
09-19-2014, 05:01 PM
For the vertex thing, spot info is no good, spots aren't vertices,
We'll they aren't certainly spots per se on displacement level, are they? There's not camera "ray hit thingy" at that point. Other wise other spot nodes would work at that stage and they don't. So... dunno...