Vertex or Vector array in Simulation Flow graph

Post Reply
CG_Nema
Posts: 67
Joined: Fri May 31, 2013 5:23 am

Vertex or Vector array in Simulation Flow graph

Post by CG_Nema » Mon Jun 17, 2013 3:21 am

How can I store the vertices of a mesh in an array in the new Graphs interface so that I can run them through a loop. I can't seem to find the right nodes for this.

galakau
Posts: 2
Joined: Mon Mar 04, 2013 6:50 pm

Re: Vertex or Vector array in Simulation Flow graph

Post by galakau » Mon Jun 17, 2013 10:07 am

Hi,

please check out the attached image of graph nodes.
This is the way, to get an array of all mesh-vertices.
The "GetObject->GetObjectMesh->ObjectMeshToMesh" Nodes can be
replaced by any other mesh type.
For efficiency reasons, you might remove the "ObjectMeshToMesh"-Node, since
"GetVertices" also accepts ObjectMeshes as input. Just added it, to make clear
that you may access any "Mesh"-Type...

Unfortunately, I have to admit, at this point, it is not possible to set
in return the vertices of meshes via graph-nodes.
To do so, you have to wait for the next patch...
Galakau
You do not have the required permissions to view the files attached to this post.

CG_Nema
Posts: 67
Joined: Fri May 31, 2013 5:23 am

Re: Vertex or Vector array in Simulation Flow graph

Post by CG_Nema » Mon Jun 17, 2013 6:35 pm

Thank you for the reply, but this is the setup I've been trying. I should have been more specific:

I want to compare the positions of verts with the same index from 2 meshes with identical topology. So I think I need to store the position vectors of the verts into 2 arrays and run them through a compound node. I will try it again with these nodes, this whole visual programming is very new to me, any help would be nice.

I wish the documentation had a node reference like the python reference.

galakau
Posts: 2
Joined: Mon Mar 04, 2013 6:50 pm

Re: Vertex or Vector array in Simulation Flow graph

Post by galakau » Tue Jun 18, 2013 2:50 pm

Hi,

well, then it depends on what exactly you want to do...
But if the topology is equal, you may use the shown graph twice, with different object-inputs.
You will get two vertex-arrays, with same order, since the topology is equal.

If you would like to, e.g., detect changes, you may substract simply the arrays and compare
the resulting vector-array to (0,0,0).
Of course, you also can use a compound and a for-loop for touching all vertices separately.

BTW: We are working on the documentation. But we are publishing at the moment tutorials
on the graph-nodes, check them out, since the basics are already covered:
http://www.youtube.com/user/RealFlowLab ... lf_index=3

more are in production at the moment...

Post Reply