Zeedorf
Hi SOuPers

I have two pieces of geometry. I use mesh2Arrays to generate position array from the vertices. My intend was to combine the two geometries' positionArrays to one array. As I tried to plug mesh2Array.positionArray to the mergeArrays the attr .inArrays[0].inArray was gray.

Mesh2Arrays_mergeArrays.png 



Reply 0 0
pshipkov
That's very strange.
Early today I combined scatter points with another vector array using this node and it was fine.
Can you try with another node.arrayAttribute?
Reply 0 0
Zeedorf
It might be that my understanding of array data is limited. Is there a good reference (maya API docs?) about what the data types mean used in connection with SOuP? Array, multi, doubleArray, dynamicArray, etc. I think we should describe it on the SOuP wiki.

Back to the current problem. There is a graph shows that I could plug arrayToArray nodes into the meregeArrays. But the instancer does not work as before without mergeArrays node.

MergeArrays_graph.png 

Another interesting thing is that the arrows from mesh2Arrays display different color (gray) then the arrows from arrayToArray despite it should be the same data type (array).

I attached the scene file as well (maya 2015 scene file).
Reply 0 0
pshipkov
There are couple of things going on:
1. It is better to combine the source mesh geometry upfront, because this way you conform to the standard Maya data pipeline. There will be one object controlling the point distribution. Of course if you insist you can do it as separate objects, but then there will be more work to noodle the SOuP networks afterwards. This is what is happening right now.
2. mergeArrays node supports only scalar arrays (double, int, etc) data types, but not vector arrays. The reason is that it is not easy to merge double array with vector array. There is not clear math rule how this should be done. And it does not make sense really.
NOTE: i should probably code a mergeVectorArrays node. Adding it to my to-do list. It is pretty easy to write it, so no problem.
3.The arrayToArray node converts from vector to double arrays. But this is not recognized by the arrayToDynArrays node, since the instancer requires vector arrays for point positions.

Here is my advise to you - yes, we can merge the output of the mesh2arrays, but save yourself the trouble of dealing with this kind of stuff, combine the mesh objects, slap a cluster on the individual shells and after that is just one simple SOuP network to get you to the instancer.

4. mesh2arrays is more expensive to get vertex positions than pointAttributesToArrays. Your data set is pretty small, but if in the future you have to deal with bigger data, go for the later node.

Let me know if you need further assistance.
Reply 0 0
Zeedorf
Thank you Peter

It helps a lot!
Reply 0 0
Reply