Anyway to create curves from Mash Points using Strands or something?

absoluteKelvin
Collaborator
Collaborator

Anyway to create curves from Mash Points using Strands or something?

absoluteKelvin
Collaborator
Collaborator

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?maya_AY28I1ppaf.png

https://www.artstation.com/kelvintam
Reply
592 Views
3 Replies
Replies (3)

Aslan.Jafari
Autodesk
Autodesk

If I understood your question correctly, you are looking for something like this:curve_from_mesh_points.gif

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

Top_level.JPG

 

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>)

iterate.JPG

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.

compound.JPG

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.


Aslan Jafari
Sr QA Analyst

absoluteKelvin
Collaborator
Collaborator

Thanks for putting this together. I tried to replicate step by step. getting errors. Not sure what i did wrong

 

issues.jpg

 

 

https://www.artstation.com/kelvintam

Aslan.Jafari
Autodesk
Autodesk

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

iterate.png

 

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


Aslan Jafari
Sr QA Analyst