Get Pointposition from "SubGroup"

Discussions about SOFTIMAGEs© Interactive Creative Environment©
caledonian_tartan
Posts: 253
Joined: 17 Feb 2010, 14:13

Get Pointposition from "SubGroup"

Post by caledonian_tartan » 06 Oct 2010, 12:43

hi folks
i have some situation i run into every once in a while...
maybe someone could help me on that.

basically i have some sort of two groups of particles in one pointcloud.
in this example i distribute a so called self.__test_ID attribute along the particles.
half of them have a value of one and the others have zero.

now i would like to return the pointpositions of one of them groups!

so i thought i could filter out the other ones and all that's left should be the pointpositions of all particles with __test_ID = 0

BUT: as soon as at least one point of both groups is emitted there's one(or more?) value(s) at the center (of the universe ;) [0,0,0])

i think i should shrink the array so that there is just the number of points that are actually in the group, or so..??

i'm not quite into arrays that much...
Image



EDIT: If i plug in a "Resize Array" between the filter and set data and setting the size to 1 and value to 0,0,0 it actually eliminates the center point(s).
but now i have an array per point, which isn't very good. ahhhrg, i don't get it
SI 2015 @ WIN7-64

grahamef
Posts: 281
Joined: 23 Jun 2009, 19:01

Re: Get Pointposition from "SubGroup"

Post by grahamef » 06 Oct 2010, 17:49

It looks like the filtered values are being displayed as (0, 0, 0) but it appears to be a display issue only. You can hide them by turning on Show Values Computed at Current Frame Only. In any case, any real calculations you make with the values will be properly filtered.

caledonian_tartan
Posts: 253
Joined: 17 Feb 2010, 14:13

Re: Get Pointposition from "SubGroup"

Post by caledonian_tartan » 07 Oct 2010, 07:16

i had that display issue in other constellations. e.g. when using cases with filtered pointpositions, but if i plug it into a move towards goal they actually fly to [0,0,0]... so it works for me with the resize array and then i could take the array average this time. i've got to learn more about array though...
SI 2015 @ WIN7-64

grahamef
Posts: 281
Joined: 23 Jun 2009, 19:01

Re: Get Pointposition from "SubGroup"

Post by grahamef » 07 Oct 2010, 18:26

Select Case has a default output -- that might be why the particles flew to the origin. I'll take a closer look at that.