Is Inverse distance weighting used somewhere?

I was recently working with the deformation of some models, I needed to do something like the Mesh Deform Modifier, but I wasn’t getting good results with it.

So I tried a custom implementation of something very similar to that modifier, in which I used Inverse Distance Weighting to calculate the “weight” of the cage deform for each vertex. The results were pretty good, and I’m wondering if it’s used somewhere in the codebase, for example it would be a good option for the “Transfer attributes” operation.

A related question: Can someone give me some hints about how the Mesh Deform and Lattice modifiers are implemented?

Thanks!

1 Like

The paper for the Mesh Deform modifier is linked on the manual page.
https://graphics.pixar.com/library/HarmonicCoordinatesB/

Not sure exactly what the Lattice modifier is based on, but that sort of thing is described in CG textbooks and graphics papers from the 80ies like this:

I don’t think we use inverse distance weighting specifically. There are alternatives like this too that may have a better balance between simplicity of implementation and quality:
https://www.cs.wustl.edu/~taoju/research/meanvalue.pdf

There are some parts of implemenation (you can use search field on ropository page or clone repo and use file search on your pc):

Wonder is this was a geometry nodes approach or you tried with just modifiers?

Did not seen such thing before, so not sure if there is such thing in a blender. This feels like something between NURBS curve (supported by geometry nodes, custom knots will be with #130132 - Curves: Custom NURBS knots - blender - Blender Projects) and gravitational potential field (will be supported with #129824 - WIP: Geometry Nodes: Space Field nodes - blender - Blender Projects).

Thanks for your answers!! I’ll take a look at the material you sent and come back.

I just extracted vertices and manipulated things with numpy, then set the positions back in the mesh object for visualization

What I found interesting about IDW is that it’s a field, so it creates smooth gradients that are spatially consistent