Basic ICE array question

11 views
Skip to first unread message

Ben Rogall

unread,
Jun 15, 2009, 4:18:42 PM6/15/09
to soft...@listproc.autodesk.com
At least I think it should be basic.

I want to find the closest point which also has a boolean attribute set
to true. I've tried a few things but can't seem to get it.

Thanks,
Ben

Grahame Fuller

unread,
Jun 15, 2009, 4:29:06 PM6/15/09
to soft...@listproc.autodesk.com
Get Closest Points gives you an array of locations sorted by distance.

You can look up data at locations, so plug the output from Get Closest Points into a Get Data and get your Boolean attribute. You now have an array of Booleans.

Plug that into the Array port of Find in Array and plug a constant True into its Value port. The Index output will be the first index found, which is also the closest because the original array was sorted by distance.

Finally use the index and the original array of locations with a Select in Array node to get the location of that point.

gray

winmail.dat

Thiago Costa

unread,
Jun 15, 2009, 4:29:09 PM6/15/09
to soft...@listproc.autodesk.com
closest location location port > plug source port of get data gettin
your bool attr > find in array node, feed the bool in the array port,
you will get the index of true in the out port > select in array, and
that's your filtered item.

-----Original Message-----
From: softimag...@listproc.autodesk.com
[mailto:softimag...@listproc.autodesk.com] On Behalf Of Ben Rogall
Sent: 15 juin 2009 16:19
To: soft...@listproc.autodesk.com
Subject: Basic ICE array question

Ben Rogall

unread,
Jun 15, 2009, 4:53:32 PM6/15/09
to soft...@listproc.autodesk.com
Grahame and Thiago - thank you so much. I only wish I had asked a few
hours ago.

Ben

Czarek Kwasny

unread,
Jun 15, 2009, 4:59:57 PM6/15/09
to soft...@listproc.autodesk.com
Ben, please also be sure to take a look a Thiago's ICE training at
cmiVFX. I'm going through it and there's a chapter devoted to "getting
the closest location" nodes. I'm sure it could further save you hours of
experimenting, since Thiago covers lots of details on ICE during 4 hours
of training, which is a blast of informations in such a short time. It's
a great introductory material if you are going to play with ICE further.
--
Czarek Kwasny
http://czarekkwasny.com/
Reply all
Reply to author
Forward
0 new messages