So I have a bunch of cubes from MASH. As I understand there is a way to input the Mash point position to create strands. My ultimate goal is to create a continuous curve connecting each mash point. Is that possible?
If I understood your question correctly, you are looking for something like this:
connecting index 1 of each item to the next and so on.
You can do this simply by getting the point positions of all objects and iterating through the positions and creating a new array of positions. creating one array for each index position. [1,1,1,...],[2,2,2,...][3,3,3,...] etc. (given that all objects have the same number of vertices)
The graph would look something like this at the top level
1) Get point positions of all objects
2) Create an iteration node with the max number equal to the number of vertices of one object. (first_in_array and array size are needed)
3) Create a construct_strands node
Inside the iterate node:
1) Create a compound (Ctrl + G, without any nodes selected)
2) Connect the point_positions and the current_index to it.
3) Set the point_position port on the newly created compound to auto-vectorize (set port type to Array<Math::float3>)
Inside the newly created compound:
1) Create get_from_array node to get the index from the array of positions. The output will auto vectorize to an array of float3.
On the top level connect the newly created Array<Array<Math::floa3>> to construct_strands node.
The output is Array<Amino::Object> , array of strands (one strand per index )
There are other ways of computing the arrays needed for creation of the strands.
In the attached scene file I've included 2 other ways of computing the positions (for_each, auto vectorized compounds)
I hope this helps.
Thanks for putting this together. I tried to replicate step by step. getting errors. Not sure what i did wrong
It looks like the out port on the iterate node is not an iteration target.
You have to set the port to be an iteration target by right clicking on the port and selecting > Set Port Iteration Target > true
For understanding the loops and iteration functions you can refer to:
https://forums.autodesk.com/t5/bifrost-forum/introduction-to-bifrost-iteration-tutorial/td-p/8949069
Cheers
Can't find what you're looking for? Ask the community or share your knowledge.