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: 

Create Maya Object

Message 1 of 16
1218 Views, 15 Replies

Create Maya Object

Is there an other way to create a Maya Object from Bifrost than using an existing Shapenode and reconnect it?



Message 2 of 16

You can hit tab in the Node Editor and type in `mesh` to create an empty mesh at which point you can connect to that, as oppose to creating a temporary torus. Is that what you meant?

Message 3 of 16

Thats still to complicated.

Users here in the Studio want a single click solution.

Message 4 of 16

Why does it need to be a Maya object specifically?  Why not just a bifShape?


You can of course make a one-click solution by packaging up the MEL/Python commands to make a board, add whatever compounds you need inside it, and hook it up to the DG - and wrap it as a button on the shelf - same as you would with any other MEL or Python script.

Message 5 of 16

BifShapes do not render outside the Arnold world.

And i need todo some extra modeling work on this objects.


And we dont have any TDs here to get such tools working.


I agree i could do it myself but there is no time during production.

Small Studios have different demands.

Message 6 of 16

That's already as simple as it gets, so the only other option is like Marcus said, and that's to script it. Afterwards you can place it on a shelf, or do it old school guerrilla style and execute from the Script Editor.


Here's a quick script snippet that will loop through all selected bif shapes and create new Maya meshes from them. It won't work for Bifrost instances, but as long as the output is an Amino object it *should* be ok.

Message 7 of 16

It does work. Thanks.


But i get in this case a strange result. It does only convert one of the cubes.

Im not sure if thats the expected behavior.



Message 8 of 16

Here is the scene.



Message 9 of 16
in reply to: Christoph_Schaedl

That's because Jason's pretty script doesn't take into account object array. It only creates a mesh per bifShape.


You can modify the script to query the size of the .mayaMesh array of bifrostGeoToMaya, and then add a loop on it. It's a bit annoying though as you need to force pull some data first in order to query the array size. What I do is plug mayaMesh[0] to a temporary mesh, use cmds.refresh(), and finally I can pull the size of the array, and then create my meshes inside a loop. 

Maxime Jeanmougin - Technical Artist

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

Yes Max is correct, it wasn't taking into account Amino arrays.


Here's an updated version that will support arrays. Kind of annoying to get it working since `bifrostGeoToMaya` doesn't expose the length of its output until after it's connected to a mesh, so at first it does a temporary connection to an empty mesh to expose that length, then generates the meshes. Edit: Just noticed Max came across the same thing here! *curses Maya*


Here's a test with your scene with 3 bifs at the same time that have mixed single/array outputs:


Message 11 of 16

Thats great! Many Thanks.

Message 12 of 16


Message 13 of 16

No worries, you can send my beer in the mail 🙂



Message 14 of 16

This script deserves a Shelf Icon!




Message 15 of 16

New version to convert a GraphShape into Maya Geo.

Message 16 of 16
in reply to: Christoph_Schaedl


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

Post to forums  

Autodesk Design & Make Report