Bifrost Forum
Welcome to the Bifrost Forum. This is the place for artists using Bifrost to ask and answer questions, browse popular topics, and share knowledge about creating effects procedurally using Bifrost. You can also visit the Bifrost Community on AREA to download an array of ready-to-use graphs, read Bifrost news and updates, and find the latest tutorials.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Array of meshes into a for_each outputs all the meshes as 1 combined mesh. How do I get them as individuals?

Message 1 of 3
352 Views, 2 Replies

Array of meshes into a for_each outputs all the meshes as 1 combined mesh. How do I get them as individuals?

Sorry my brain is not working.  I have an array of meshes going intoa for_each node.  The output of the for_each node says it's a single mesh.  But the outport of the for_each node says it's an array of meshes.  And I hooked up a dump_object to print out the size of that array and it matches my input array.  But I still only get one final outmesh that is a union of all the meshes from the for_each loop.  What am I missing to separate them?  Do I have to use a build_array?



The for_each "out_mesh" port says it's an array.  And the output "outMeshes" is a hat shape.  But I'm only getting 1 bif mesh.



Message 2 of 3
in reply to: mcw0

Always pay attention to the port icons, they say a lot about what happens. If you look inside your for_each loop, you can see that your output port is an iteration target, meaning that it's going to returns each results of the loop into an array.

For_each compound only have iteration target allowed for output because this node compute things in parallel. If you want to manually build an array inside a loop, like based on some conditions, You can use either iterate or do-while, and use a port-state.

Though, it's the problem here. When you say you get a single bif mesh, do you mean only one bifShape in the Maya scene? If so that's perfectly normal. Bifrost generates one bifShape per output port, wether it is an array or not. You can also convert your BifrostBoard graph to a BifrostShape graph (from, and won't have to deal with bifShapes anymore. Each sub meshes is still accessable, like when using BifrostGeoToMaya, you can get each sub meshes individually out of the port.

Maxime Jeanmougin - Technical Artist

Join the Bifrost Addicts community on Discord:
Message 3 of 3
in reply to: mjcg91

Hi Maxime, I have access to all the output meshes in the bifrostGeoToMaya node.  It must be getting too late and I didn't notice it the first time.  Thank you.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators

Autodesk Design & Make Report