Community
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.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Array of objects ....

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
valhallen
957 Views, 4 Replies

Array of objects ....

I'm guessing I can't pass a generated array of strands to the output of a graph?

Get from array works - for one strand - , passing the whole array to the output doesn't (Maya just won't connect it):
// Error: Bifrost failed to create Maya attribute for type array<array<Amino::Object>>. //

Is there a way around this?  I'm generating wires in a fence basically and want the ability to have n wires by user input

Thanks again in advance

4 REPLIES 4
Message 2 of 5
valhallen
in reply to: valhallen

valhallen_0-1612669371553.png

Maybe I could loop through the array? Kinda voids the idea if I have to go add a get from array every time I want to add a wire 😞

Message 3 of 5
mjcg91
in reply to: valhallen

There seems to be an issue prior to get_from_array. The error message suggests that the output ports coming from get_from_array are 2D arrays, which means the data prior to these nodes is a 3D arrays. You should double check on this side. A single array would be enough in this case.

That said, regarding what you're trying to make, ideally you'd do this using a loop yes, and ideally you'd have a single strands object containing all the wires. 

I made a blog post about how to process strands, hopefully it can help you: https://maximejeanmougin.com/2020/09/08/bifrost-strands/ 

Maxime Jeanmougin - Technical Artist
https://maximejeanmougin.com

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
Message 4 of 5
valhallen
in reply to: mjcg91

Thank You so much @mjcg91 !  The blog post nailed it, that and one "flatten nested array" node ... was one of those "obvious" moments.

That post is utterly awesome and very well written, thank you again!  Now I know about substrands I am going to go a rebuild my strands offset system so it can be a single strand with n substrands on output.  Then I'm going to have some "fun" with MPM fibres, so there might be a flurry of questions about that too later on 😄

Message 5 of 5
calibrix
in reply to: mjcg91

Thanks for sharing this. Really great deep dive into this topic.

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

Post to forums  

Autodesk Design & Make Report