Convolution on triangle mesh

Dear Community,

I’m trying to do convolution on vertices or faces of a triangle mesh (from trimesh remeshing)

The problem is, the mesh is not a simple grid with rows and columns, so I cannot always use a fixed kernel–I don’t know if a mesh face has 1 or 10 neighboring vertices, for example. Could you please give me some advice?

Thanks a lot!

Can you give further details of what are you trying to do?


Kangaroo2 have this:
2024-01-05 16_37_05-Window
very simple but also basilar.

Otherwise you can go to scripting to access RhinoCommon topology methods for meshes… or find a plugin that give you components for the same.

1 Like

Thanks for your help Riccardo! VertexNeighbors sound like a great way to start–I will elaborate the operation I want:

My convolution operation is like this:
I have (part of a large) matrix

[ ...
 [...1, 2, 3, ...],
 [...4, x, 6, ...],
 [...7, 8, 9, ...],
...]

to update x, I multiply with a kernel (in this case 3 * 3) centered at x (dot product). I sum values in the resulting 3 * 3 matrix, so I get new value of x here.

The problem is, mesh from trimesh is not a grid with rows and columns like this. The number of neighbors of a vertex changes, too, I’m wondering if a process similar to convolution exist for mesh vertices.

Thanks a gain!

Sorry I’m lost.
I’m not understanding what you are trying to do.
Also I don’t know matrix operations…

Are you trying to “smooth” values through your mesh?
Check this:

1 Like

Thanks very much for the resources you pointed me to. I’m making progress after reading through them!

1 Like

That’s nice.
And… the thread I linked later redirect to this one:

where Daniel Picker go deeper about it.

1 Like