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: 

Create Maya Object

15 REPLIES 15
SOLVED
Reply
Message 1 of 16
Christoph_Schaedl
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?

 

biftoM.JPG

----------------------------------------------------------------
https://linktr.ee/cg_oglu
15 REPLIES 15
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.

----------------------------------------------------------------
https://linktr.ee/cg_oglu
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.

----------------------------------------------------------------
https://linktr.ee/cg_oglu
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.

 

bif_one.JPG

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 8 of 16

Here is the scene.

 

 

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 9 of 16
mjcg91
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
https://maximejeanmougin.com

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
Message 10 of 16
labbejason
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:

bif_to_mesh.gif

Message 11 of 16

Thats great! Many Thanks.

----------------------------------------------------------------
https://linktr.ee/cg_oglu
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!

Thanks!

 

biftomaya.jpg

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 15 of 16

New version to convert a GraphShape into Maya Geo.

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 16 of 16
raomuqi
in reply to: Christoph_Schaedl

thanks

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

Post to forums  

Autodesk Design & Make Report