maya to bgeo exporter

   6568   4   1
User Avatar
Member
14 posts
Joined: 7月 2013
Offline
Hello guys,

I want to do a geometry/particles exporter in Maya to Houdini (in .bgeo format) and for that, I would like to use Houdini Engine. The purpose of it is speed (I have seen some external tools like mgeo, which is REALLY slow, using intermediate ascii formats and then using gconvert to do the process, which is REALLY slow). I would like to have a really fast exporter, and as there is no open documentation of .bgeo format and therefore I am not able to do a maya c++ plugin, I think that this could be the better way to go using Houdini Engine.

The main goal is:
- Be able to select the geometries (that could be anything: 1, 2 or 50 for example).
- Just pressing render, evaluate every frame but just when I press render, and not evaluate all the time that I press play (because maybe I want to visualize things in the viewport, and I don't wanna write anthing.

What could be the better way to go?

What I tried so far:

- I have created a HDA, which is a subnet with a File node inside, exposing just the File Mode (to change it for writing or readind purposes) and the Output File Path. Problems:
a) I can't select multiple object as an input, just the default set to selection…
b) Everytime that I play render the node is being evaluated.

- For that reason, I tried to create another HDA, having inside a File Cache node, which is like a ROP node, and requires to press render to be evaluated. The problem of it is that I am not able to render anything. Maybe is because I need to connect the maya timeline with the Houdini one, or maybe other things that I don't know now.

Sorry guys, but I don't have experience with Houdini Engine so far, and I will really appreciate any help or hint.

Thank you very much guys.
User Avatar
Member
818 posts
Joined: 9月 2013
Offline
Maya's timeline can't be driven from inside the asset at the moment, so it's difficult to accomplish the entire process from only the Houdini asset. It's fairly easy to with a bit of help from MEL.

I've quickly put a MEL script that should work for most cases. The MEL file has a hardcoded path to the HDA file, so you'd need to point it to the where you store your HDA file. To export the geometries, do something like the following:

// 1. Open the scene file
file -f -open “/tmp/houdini_geometry_export/houdini_geometry_export_test.mb”;
// 2. Select the objects to export
select pCube1 pCube2 nParticle1;
// 3. Either have the MEL script in your MAYA_SCRIPT_PATH, or source it explicitly. Also, remember to modify the hardcoded HDA path.
source “/tmp/houdini_geometry_export/houdini_geometry_export.mel”;
// 4. Run the export function.
houdini_geometry_export(`ls -sl`, “/tmp”);
This could be easily made into a shelf tool too. Hopefully, this would be useful for other people as well!

Attachments:
houdini_geometry_export.zip (12.5 KB)

Andrew / アンドリュー
User Avatar
Member
3 posts
Joined:
Offline
I dont know mgeo for comparison, but we are using partio with great success for the trip to Houdini from Maya. For the way back from Houdini I've got a basic HDA that just reads the BGEOs.


http://www.disneyanimation.com/technology/partio.html [disneyanimation.com]
User Avatar
Member
85 posts
Joined: 4月 2017
Offline
Is there any similar solution exporting BGEO file from Maya py3 to Houdini py3?
User Avatar
スタッフ
463 posts
Joined: 8月 2019
Offline
You will either need to go through the Houdini Engine for Maya plugin or write your own plugin to write the format.
  • Quick Links