0
$\begingroup$

If two meshes have the same topology (the same number and order of points, edges and faces) but their points are deformed in completely different ways - how to put points of the first mesh onto positions of points of the second mesh in Geometry Nodes? Can it somehow be done using points indices? I am still not very familiar with Geometry Nodes. In Python it is really trivial task (pseudo-code):

for v1, v2 in mesh1.vertices, mesh2.vertices:
   v1.position = v2.position

But in the Geometry Nodes I've found only "Field at Index" node, but nothing like "Set Value at Index". Is there a way to do it?

$\endgroup$
2
  • 2
    $\begingroup$ Use the Sample Index node. Here is an example: blender.stackexchange.com/a/289403/107598. Just drop the Mix node and use the target positions. $\endgroup$
    – Blunder
    Commented Mar 29, 2023 at 22:29
  • 1
    $\begingroup$ You could also use the search. There are many examples showing how to transfer attributes from one geometry to another. In versions below 3.4 this has been done with Transfer Attribute and since 3.4 with Sample Index. With Set Position you can finally move the points. $\endgroup$
    – quellenform
    Commented Mar 29, 2023 at 22:51

1 Answer 1

3
$\begingroup$

you can use this node tree:

enter image description here

The transform + join just doubles and moves the geometry:

enter image description here

the noise texture with set position randomizes one suzanne a bit:

enter image description here

enter image description here

the nodes in the gray box do the setting of the points to the points of the other geometry via sample index. So these are essentially the nodes you are looking for. I just moved them on the x-axis (again) via transform geometry because else both suzannes would be on the same position and you couldn't see both:

enter image description here

of course you won't need the mix node in your case. I just inserted it for the purpose of animated visualization.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .