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: 

How to retrieve each element from Maya array attribute

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
Anonymous
1366 Views, 9 Replies

How to retrieve each element from Maya array attribute

I have a question about Maya array attribute (not Bifrost array port). 

 

Maya array attributes (double and vector arrays only) can be connected to a Bifrost node as an amino object, but I don't know how to get the elements of that array in a Bifrost graph.

 

Is there way to retrieve the element of Maya array in Bifrost graph?

 

2021-03-08_12h13_54.png

Labels (2)
9 REPLIES 9
Message 2 of 10
morten.bojsen-hansen
in reply to: Anonymous

It seems like this is not currently supported. If the array attribute comes from e.g. a particle system, you should just drag in the particle system into the Bifrost graph and extract the relevant attribute using get_geo_property. Would that work for you?

Message 3 of 10
Anonymous
in reply to: morten.bojsen-hansen

Now we are trying to instantiate an object by Bifrost at points generated by Mash.
We can decompose the output of Mash into multiple attributes and connect them to the Bifrost graph, but in that case the changes in Mash are not reflected in Bifrost.

Of course, I know that we can do it all in Bifrost from the beginning, but I need to support designers who are used to using Mash.


Is there a better way to do this?

Message 4 of 10
morten.bojsen-hansen
in reply to: Anonymous

@Anonymous, I'm not really an expert on Mash but if you can supply a scene file showing your problem (either here or in DM) I can take a look.

Message 5 of 10
Anonymous
in reply to: morten.bojsen-hansen

We have found a solution to this problem.
If a double (or vector) array is connected to the Bifrost Graph as an Amino object, it will be interpreted as a geo_property of any type.
As shown in the image below, the name of this property is the same as the name of the attribute connected to the Bifrost Graph

(we could not get values directly as a float3 array with get_geo_propety).

2021-03-11_19h11_11.png

2021-03-11_19h10_41.png

 

I found this method by referring to convertParticleToBifrost, but I couldn't find any documentation on this behavior, so I don't know if this is really the recommended method.
However, I would like to use this method for now.

 

@morten.bojsen-hansen Your advice helped us a lot. Thank you very much!

Message 6 of 10
morten.bojsen-hansen
in reply to: Anonymous

I am glad you figured out a workflow that works for you!

Message 7 of 10
dangermouse82
in reply to: Anonymous

I was just having a read through this topic. I was wondering if you found a way to do the reverse as well eg

get a doubleArray or vectorArray generated in bifrost and output it so it could be connected into an attr of a node in maya with types double or vector array?

 

Thanks

James

Message 8 of 10
Anonymous
in reply to: dangermouse82

I'm afraid I haven't found a way to do that.

Message 9 of 10
Anonymous
in reply to: Anonymous

Hi I'm trying to figure this out as well, as I'd like to use Bifrost to do some numpy-style array manipulation and pump out a  doubleArray attribute in the end for consumption by maya.

Message 10 of 10
andrea_pinto82
in reply to: Anonymous

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report