If I have two cubes (with the same vertices and indices) and they are animated to move on their own paths, can I calculate the distance between v0 of one cube and v0 of the other cube to drive something like vertex color of the original for v0? Ideally I'd like to do it for all 8 vertices by indexed pair (v0 to v0, v1 to v1, etc...).
The only thing I could think of was to capture the Position Attribute of two Object Info nodes and then do a Vector Math Distance on those. This seems to just result in the distance of the vertices from one cube to 0,0,0. I get the Position node is based on the geometry downstream, but I feel like that is limiting in this case as I want two uniques sets of geometry to be compared.
It is super simple in Animation Nodes. Just use some mesh input nodes for each object, grab the Vertex locations and then calculate the list of distances. Would love to have that same simple functionality in Geometry Nodes.
UPDATED Example with Solution
Based on the selected answer from Robin Betts I'd like to share an example of how I was planning on using the feature. Here's a simple example of transferring the 'Distance' between vertices of two frame offset Alembics (should probably work on rigs and FBX files as well) over by an attribute to the Shader. Then I just ran the attribute through a ColorRamp to give shading based on the 'Speed' of the individual vertices. I left the offset copy of the Alembic in the scene in wireframe view if that helps to see where the colors are coming from.
velocity
? You could always recover the floatspeed
from that in the shader, if you wanted to dispense with some of the information. $\endgroup$