How to filter locations?

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Post Reply
wesserbro
Posts: 177
Joined: 27 Oct 2012, 18:05

How to filter locations?

Post by wesserbro » 02 Dec 2015, 01:05

Hi! I want to pass locations further only if their weights match certain conditions.
"get Self.PointNeighbors" //got location array of n neighbors -> MAGIC -> array of n-x filtered locations
Is it possible?

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 09:44

Re: How to filter locations?

Post by Bullit » 02 Dec 2015, 04:20

You have to put the values of what you want to test and conditions i think.

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: How to filter locations?

Post by Mathaeus » 02 Dec 2015, 10:09

As Bullit said, there should be small setup for filtering. There's one in factory 'Get Neighboring Particles', used to exclude the 'self' searching point, should be easy to adapt it for something else. So, something based on 'Find In Array' node.
By the way, you can put an array as an searching input in some other geo queries too, like Raycast, or Get CLosest Location - in this case they will return the array, too. Let's say if you want to simulate ambient occlusion with ray casting. Or, to test some volume by looking from long array in 3d space, of 'probe points', using Get Closest Location.

wesserbro
Posts: 177
Joined: 27 Oct 2012, 18:05

Re: How to filter locations?

Post by wesserbro » 02 Dec 2015, 10:52

Is this setup right?
locations1.jpg
I will be able to see if it works only after much more complex setup...
I'm not quite sure how ICE internally loops through arrays. May be it just passing one location per ICEtree execution....

User avatar
rray
Moderator
Posts: 1775
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: How to filter locations?

Post by rray » 02 Dec 2015, 11:17

something like this shoud work, it returns an array of only those weights that are > 0.5 (using the "find in array" as Mathaeus suggested)
Attachments
Unbenannt.PNG
softimage resources section updated Jan 5th 2024

wesserbro
Posts: 177
Joined: 27 Oct 2012, 18:05

Re: How to filter locations?

Post by wesserbro » 02 Dec 2015, 12:20

Right, we find indexes in weights array, then select by those indexes from location array. Stupid me!
Thanks, guys!

P.S. I'm trying to make directional tension map. Like you paint weights every other edge loop, which define "direction". And then known tension algorithm is modified to take average only from the neighbors with the same weight value, so only the stretch along the "direction" counts.

User avatar
rray
Moderator
Posts: 1775
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: How to filter locations?

Post by rray » 02 Dec 2015, 13:20

That's a really cool application, you could even have different weightmaps and tension maps that way. I was doing that some time ago using an edge cluster but the look up whether points are connected by the cluster wasn't so nice (get edge neighbors, filter by cluster, get points of those edges, filter away current point and some more) ..weightmap approach is better because you have more control (if you paint everything gray you'll have a normal tension effect)
softimage resources section updated Jan 5th 2024

Pooby
Posts: 501
Joined: 27 Aug 2010, 22:25

Re: How to filter locations?

Post by Pooby » 02 Dec 2015, 16:00

I did one of these, but I didn't use neighbours, I just stored a location that was along the correct direction and compared its distance as the mesh stretched.
This way you're not evaluating larger arrays and dropping redundant values, you're just placing the one (or two) you intend to use.

wesserbro
Posts: 177
Joined: 27 Oct 2012, 18:05

Re: How to filter locations?

Post by wesserbro » 02 Dec 2015, 16:09

Who would doubt the most sensible solution will come from Pooby )
By the way, Paul, where can we see your character work in production? Want to see your non-disclosable ICE muscles in action)

Post Reply

Who is online

Users browsing this forum: No registered users and 38 guests