Maya to Octane - Obj/Alembic export workflow

Forums: Maya to Octane - Obj/Alembic export workflow
Generic forum to discuss Octane Render, post ideas and suggest improvements.
Forum rules
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB

Maya to Octane - Obj/Alembic export workflow

Postby Renart » Tue Oct 04, 2016 2:58 pm

Renart Tue Oct 04, 2016 2:58 pm
Hi,

I've been looking for a simple and clean method to export my scenes from Maya to Octane Standalone.
which mean, one export for my scene and one import in Octane, with a pin of each material.

For some reason, when I export one .OBJ from my scene, with materials option enable. I end up in Octane with a pin for every single shader of my scene, not just the object I exported.
I tried different export/import options without success.

So I move on the Alembic format.
Here the problem is different. When I export multiple object of my scene. The import node in Octane give me one material per object. Even if in Maya they share the same one.
I found out that when importing in alembic, it's the name's shape that is used to sort the materials.


My solution for this is to rename the name's shape. And give the same one for each object which use the same material.
Using this Mel script:
Code: Select all
for ($i in `ls -sl -dag -shapes -l`)
  rename $i "NewNameShape";


But this is not very convenient for a fast and simple workflow and we have to rename the name shape every time we create or modify a geometry. Every time that the name of the geometry change basically.
Same if we need new materials...

So I've wondering if anybody has a solution for a clean, simple and fast workflow between Maya and Octane, which gives a smart and efficient import node inside Octane?

Maybe a script that automatically change the name of the shape according to the material assigned? That we have to run every time we want to export something..

Thanks!
Renart
Licensed Customer
Licensed Customer
 
Posts: 70
Joined: Mon Jul 04, 2016 8:21 pm

Re: Maya to Octane - Obj/Alembic export workflow

Postby Refracty » Tue Oct 04, 2016 3:27 pm

Refracty Tue Oct 04, 2016 3:27 pm
You need to use face sets instead of per object material assignment.
User avatar
Refracty
Licensed Customer
Licensed Customer
 
Posts: 1598
Joined: Wed Dec 01, 2010 6:42 pm
Location: 3D-Visualisierung Köln

Re: Maya to Octane - Obj/Alembic export workflow

Postby fantome » Sat Jan 30, 2021 4:25 pm

fantome Sat Jan 30, 2021 4:25 pm
I have exactly the same problem and i don't find a better way either.

in fact when you combine geo and when you export face sets in your alembic , you have the correct shading group input in octane standalone.
but this work only for static assets.

when you have a rig geometry you can't combine everything. because when you want to export an alembic from you character rig animation, you can indeed try to combine all the geo in your rig before export. But the export will be around 100 times / 1000 times slower, because it need to reevaluate each transform of the original geo before combine. So in practice this strategy doesn't work for rig character.

so to me the best option would be to add an option in the octane standalone alembic loader to let the user choose the method to sort the geometry contained in the alembic
- sort by geometry shape name
- sort by face set name

Thus if we choose the sort by face set name we could directly get input pin base on shader group assignation name instead of geometry shape name.
That would be really more convenient cause now in fact we have to rename all shape node like you describe in your post, but as soon as you start to use maya reference, this strategy fall apart because you can't rename the shape name contained in your modeling reference. And if you do character animation you will use reference.

EDIT:
i think the best option is to build a small python script exporter that.
- import all the reference in the scene
- for each selected object , rename the shape node of each geo with the name of the assign material, by preserving Namespace.
- export with the maya alembic exporter with namespace strip on

thus your lookdev abc and your animation geocache abc, can have the exact same input pin in standalone and you can replace them easily by just using a material map node for assignation.
You just have to replace the geo input in the material map node when you build your rendering scene.

i'll post the python script when i have something bulletproof.

=> but again the best way to solve this issue in a clean way, would be to add an option in octane standalone abc loader parameter. In fact the shading group names info are stored in the abc as face sets info. This info is in there but can't be read if you have multiple object in your abc. Octane read the info contain in face sets shading group only if you merge the object in one single mesh, and thus ended with per face assignation instead of per object assignation.

If we just can say to octane please, don't use shape name for input pin sorting, but instead use shading groups name , all problem are solved.
User avatar
fantome
Licensed Customer
Licensed Customer
 
Posts: 266
Joined: Wed Dec 16, 2015 3:38 pm

Return to General Discussion


Who is online

Users browsing this forum: No registered users and 24 guests

Sun Apr 28, 2024 1:00 am [ UTC ]