Well, I've been able to use other array nodes to get this to work, but I am
not looking at summing, or averaging my array.
Build Array from set is still giving me a context error when I use it at
the end of that branch I attached in the zip.
I just want each character of a given id to look up its distance to closest
neighbors from a different id, and then output that data to be used in a
velocity blend.
Averaging, Summing, all work fine, but don't quite give me the behavior I
am looking for.

I'll keep digging around to try and get the array from set working,  as I'm
sure both you and Alok are correct and its something simple I am missing in
my compound.

Perhaps it is where in the tree I am placing the array from set node?


On Tue, Feb 19, 2013 at 3:39 AM, Stephen Blair <[email protected]>wrote:

>  Hi Adam
>
> I was able to convert the output of that compound to object context. I
> just plugged it into a Build Array from Set.
>
> I didn't really check out the compound, but I did notice that your And
> takes three data sets:
> - Bool per point
> - Array of bools per point
> - Bool per point
>
> I tested with the Foo Fighters sample scene (I added a second actor, and
> then put your compound into a new ICE Tree on the crowd point cloud).
>
>
> On 18/02/2013 6:30 PM, Adam Sale wrote:
>
> So the idea is basically that in my crowd, I have 3 actors,
>
>  1 bad guy ID =0
> Two pedestrians ID = 1 and 2
>
>  I want only the pedestrians to evaluate the distances between themselves
> and the bad guys. If the distance is less than a given threshold between
> ID's 1,2 and 0, then the characters with IDs 1 and 2 should begin to speed
> up and walk / run away from the actors with ID = 0.
>
>  Here is an example compound of what I am trying to do. I am not so sure
> the arrays are working the way I intedn. Perhaps I am going about this
> wrong.
>
>  Thanks for the eyeballs :-)
>
>  Adam
>
>
> On Mon, Feb 18, 2013 at 3:13 PM, Stephen Blair <[email protected]>wrote:
>
>>  If you're still getting a context error then we don't have the full
>> picture of what you're doing.
>>
>> Here's a basic scenario where Build Array from Set works:
>> http://screencast.com/t/yJ4y6mzUGm
>>
>>
>>
>> On 18/02/2013 6:04 PM, Adam Sale wrote:
>>
>> Thanks Leonard. I am still getting the same context error thought.
>> I was able to convert context using the Select in Array, but it is asking
>> for an index.
>>
>>  My particles have an initialized value on them that sets a customID per
>> particle randomly between 0 and 2
>> Do I just pull in this id, and use it as the index for the Select in
>> Array?
>> My thinking is that this should take my array of values and only
>> implement them on the ID I choose.
>>
>>
>>
>>
>> On Mon, Feb 18, 2013 at 2:54 PM, Leonard Koch 
>> <[email protected]>wrote:
>>
>>> Build array from set works also with arrays and arranges the values like
>>> this:
>>> Particle 1:
>>>  Id = 0
>>> scalararray = [m, n, o]
>>>  Particle 2:
>>>  Id = 1
>>> scalararray = [a, b, c]
>>>  Particle 3:
>>> Id = 2
>>> scalararray = [x, y, z]
>>>
>>>  Build array from set output:
>>> [m, n, o, a, b, c, x, y, z]
>>>
>>>
>>>
>>> On Mon, Feb 18, 2013 at 11:39 PM, Adam Sale <[email protected]> wrote:
>>>
>>>> I guess the subject frames my question.
>>>>
>>>>  I am doing some crowd work, where I am using distance to neighboring
>>>> particles and if true, then rescaling the velocities of certain particles
>>>> from their current velocity to a new velocity.
>>>>
>>>>  Unfortunately I am running into context issues.
>>>>
>>>>  Is there a way for me to convert from an array of values per particle
>>>> to a single scalar?
>>>>
>>>>  I am looking into archives, but am clearly not asking my question
>>>> correctly..
>>>>
>>>>  Thanks
>>>>
>>>> Adam
>>>>
>>>
>>>
>>
>>
>
>

Reply via email to