Parenting multiple objects to nearest parent vertices

I found an older thread asking this question which was hopelessly derailed by it’s originator, which is a shame as it’s a valid question I think…

How to parent multiple objects to the nearest vertices of a parent object? Does anyone know of a method or script that can automate this…?

Here is my setup if you need specifics: I have a cartoon pig which has to eat and get fat. He has these square kind of tufts all over his body, which I am keeping as separate objects because I don’t want them to scale up or distort as he morphs to his ‘fat’ shape key. So I want to parent each one to it’s neartest vertex on the Pig’s body- but as there are a couple of hundred I would prefer to avoid doing each by hand! This whole setup has to export to a realtime engine too, so I can’t just use particle hair.

Any suggestions?

Thanks :slight_smile:

I don’t think you should make each dirt as a separate object, thus leaving you with dozens of dirt objects.

You should use instancing instead, or better yet geometry nodes. This automatically attaches the dirt instance onto the skin of the pig object.

1 Like

Hi Sandtail,

Thanks for your suggestion, but I think you missed the part of my setup where it has to be able to export to a real time engine. If it was confined to Blender I would totally use Geometry Nodes or hair particles.
It might be a bit brute-force, but I have to keep it simple for the game engine so I think parenting objects to vertices is the best option.

Does anyone know how to automate the parenting…?

1 Like

Maybe solve this in the used engine? So maybe the realtime engine does have something like instancing in blender (to vertices which wouldn’t work very good) or something like particles controled by vertexgroups?
Because the only thing i can think of right now is using hair particles for instancing those square tufts, converting them to mesh and export via… whatever? But this would be big because the meshes wouldn’t be instances any more…

1 Like