Get Closest Location on itself, but on a selected cluster.

Discussions about SOFTIMAGEs© Interactive Creative Environment©
User avatar
probiner
Posts: 127
Joined: 17 Apr 2013, 09:52

Get Closest Location on itself, but on a selected cluster.

Post by probiner » 12 Mar 2014, 17:44

Trying to make a setup where part of a mesh glues into another part (same mesh) after envelope deformation, etc, etc.
Basically:

If vertices in point-cluster-X distance less than 0.1 from polygons in polygon-cluster-Y then they go to the closest location in polygon-cluster-Y.

The math parth I got it I just don't know how to get the mesh to get the closes location to another part than itself.
I made a copy mesh but then I get the problem of feeding it with original mesh point positions and then feeding the original mesh with the copy point positions: cycle.


So how would you guys go on about getting the closest location on a specific area (cluster)? The "Positions" seems easy, just filter the point positions with point cluster. But the "Shape"... no idea how to go around that with polygon cluster.

Cheers

Pancho
Posts: 659
Joined: 19 Sep 2010, 09:28

Re: Get Closest Location on itself, but on a selected cluster.

Post by Pancho » 12 Mar 2014, 18:06

Could you post your ice tree and tell us where it doesn't work? Did you use a filter of if node. If closest location = true and location = part of cluster, then set point position. Use the cluster's IsElement to check whether true or not. You might need a poly cluster, not a point cluster, to make it work.

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

Re: Get Closest Location on itself, but on a selected cluster.

Post by Mathaeus » 12 Mar 2014, 20:04

probiner wrote:Trying to make a setup where part of a mesh glues into another part (same mesh) after envelope deformation, etc, etc.
Basically:

If vertices in point-cluster-X distance less than 0.1 from polygons in polygon-cluster-Y then they go to the closest location in polygon-cluster-Y.
So you don\t use the silver forum them like me, well.. :)

I'm afraid this could work only by introducing the another mesh as target, or exactly, more of them. Let's say, one separate target mesh for each cluster, then you'll be pointing the get closest location node, by cluster on original mesh.

There's another trick that works nicely on point clouds, for tasks like creation of groups in form of Voronoi pattern, so on. Not so well on meshes because of stretched faces in between moved points, but just for info: first, save the point position as attribute. Then just move points by some criteria, far away from original position, but, put the saved attribute as searching point in 'get closest location'. Finally, apply result, or, move points back to original.

User avatar
probiner
Posts: 127
Joined: 17 Apr 2013, 09:52

Re: Get Closest Location on itself, but on a selected cluster.

Post by probiner » 16 Mar 2014, 04:58

Hello.
Thanks for the replies!

@Matheus
Vladimir Jankijevic on the mailing list pointed out exactly that trick. Will serve me well for other situations. Thanks
http://xsi.jankin.com/dump/closetsLocationSelf.zip

Cheers