Mesh kisses

How can I let these meshes kiss?

I am trying to smooth the meshes together on the place yellow marked. I tried dividing vectors (no smooth overflow), and I tried kangaroo (in larger script it is to heavy).

Do you might know what I can try more?

20190214 problem mesh kiss (55.7 KB)

Why don’t they touch to begin with? What are they and how are they made? There is not going to be any automatic solution for that unless you can define and predict a rule in the logic of the design.

Or do you mean to just collide one into the other?

1 Like

I want that based on the distance it z-directs towards each other. It are meshes.

The part in the yellow marking I am trying to collide so it will be ‘partly stitched’ as sheets.

You could use snap in kangaroo or some collision option,

for now this can do the trick: (73.9 KB)

It uses a point to create an attraction between the two meshes closest to it and moves vertices of corresponding faces along the face normal - you can extend the logic to curves or other attractors

1 Like

Weird Valentine’s day here, but hey…


Thank you for your response :smile:

I tried something similar before wherein I let the points move by the z-axis. I tried kangaroo snapping but was not able to get right.


I now tried to get them hugging like sheets. But, as I tried before, it also did not work.

Do you might know how to let the meshes hug within a range? (91.3 KB)

hugging is different from kissing :rofl:

Don’t have time to look into it right this minute but you could ‘sandwich’ the meshes to a curve passing in between them to account for such range along the curve versus the search radius of the single point.

maybe you can borrow from this other solution if you’re staying away from kangaroo:

1 Like

I am trying to avoid kangaroo because it takes a lot of calculation time.

I looked at my own work again, but still doing something wrong. I now use crvs to get intersecting points and limit the range of moving points by the distances of the intersecting crvs.

Do you might know what I am doing wrong?

I was could not understand the sculted_tower_update.ghx (96.3 KB)

okay, hugging is different from kissing, but sandwinching it to much…
for what I want to achieve in my design

I apologize, I was being funny - stupid word choice, sandwich or hugging or kissing - I simply meant pulling them towards each other.

I haven’t come back to see your script yet but as Michael pointed out in his earlier response with more clarity in your screenshot or explained logic perhaps it makes it easier for one to grasp what you’re after.

Can you show a more accurate picture/sketch of what you mean by ‘making the meshes kiss/hug’?


1 Like

No, I found it funny. :slight_smile: I made a joke back, and jokes mean nothing and are only made because they are funny.

This is what I want. I want the neighboring meshes [blue] come to each other [as in red]. The rest of the mesh stays in position.

Based on how close the mesh vertices are to the other mesh, I want it magnetize to the other. I divided the vector by 2, so they will not cross each other. And moved only along the z-axis. (70.1 KB)

I tried something like this before, but I cannot get it smooth. I am just a student, so I have to study how to do it, but I tried it for some couple of months in between other stuff. I cannot find a way.

It just looks like happy :poop: (close, but not what I want to achieve). I want to let it transition smoothly.

20190216 problem mesh kiss (71.4 KB)


Transition smoothly and not touch or do you want the objects to touch?

Pull them less?

Though if they must touch or be super close then find the SmoothMesh component and smooth the resulting meshes with it, or smooth with weaverbird.

Also, thanks for the sketch you provided - your geometries in it are depicted a lot smoother than the meshes you’re using in the file - so the question is do you have to use those meshes only?

Transition smoothly and not touch or do you want the objects to touch?

I want the objects touch one another.

Pull them less?

Pull them less does not work either because the ‘z-moving points’ neighbors’ does not go with them while moving.

Though if they must touch or be super close then find the SmoothMesh component and smooth the resulting meshes with it, or smooth with weaverbird.

When smoothing it smooths everything, so other ‘connections’ with itself will disappear.

…so the question is do you have to use those meshes only?

No, I am going to use several meshes.

I want to let ‘close neighboring parts of meshes’ attract to each other so they touch each other and form a one transitional ‘surface-form.’ Doing this depending on the distance between the ‘close neighboring parts of meshes.’

Did I explain it good enough?

Trying to do it with the component ‘pull points’ instead of ‘project points’ will give also a happy :poop:

20190216 problem mesh kiss (154.9 KB)

1 Like

The naked vertices complicate this as you’ve already seen - the point where the meshes ‘kiss’ involves enough naked vertices in the vicinity, which then forces you to also grab those points, which defeats the purpose of keeping the rest of the mesh unaltered - then if you choose to leave the naked vertices in place you end up with a forced kiss ( :poop: ) - switching to surfaces (mesh them later) or to denser (subdivided) meshes might give you smoother results - that hoopsnake work-around starts to look interesting though :wink:

Hey @ForestOwl,

Earlier today I was dealing with a different-but-similar mesh problem

Here’s a modified approach to the kissing, now with surfaces rebuilt from your meshes: (49.2 KB)

[edit] for other interesting graph mappers maybe try Riched Graph Mapper


1 Like

Hi @ForestOwl,

Here’s a pythonic approach, if you’re interested:

The script first evaluates the meshes that aren’t already touching.
Then it looks for pairs that need to be kissing and moves the vertices of closest regions of both meshes closer together. Feel free to check it out below! (47.0 KB)


Great thank you! :smiley: I know tried to use more points and more meshes. This script is very handy for me.

What I know tried is to let the vector movement depend on the z-axis towards the attractor points. However, I get some bumps by that and not everything is connecting well due to my implementation.

How could I make it more ‘controleable’ and let it made itself as fluent as in your example but then in the context of ‘more points and meshes?’ I cannot find a different way of what I am doing now.

20190216 problem mesh kiss (135.4 KB)

Wow, you did it in Python :astonished:

I almost studied all of it and already learning much of it. I am very happy with it because I now learning of how to work with meshes in Python.

I tried it also with three separated meshes, and understand by that it is meant for ‘two meshes.’
I am going to see how I can ‘expand it.’ I was thinking of using ‘anemone’ to loop, but first I am going to try to see if I can make it work with more than two meshes.

20190216 problem mesh kiss (51.5 KB)

1 Like

I haven’t tested it beyond your example, but it might already work for more than two meshes. It just evaluates the kissing for mesh pairs, but it loops every mesh. You might have to play with the sliders for it to work though.

A mesh is created for every neighbor close by the ‘target mesh’ within the loop.

As a student I am already very impressed by what you helped me with giving me something to learn from :smiley: So, again, thank you.

I am now trying collecting all new_mi’s vectors and new_mj’s vectors together and take then the average of every ‘group’ vectors per point per mesh to deform them.

the mesh loops resulting in four meshes

I am going to try to change this part