Temitope FALADE's profile

HOUDINI - MAYA WORKFLOW

HOUDINI - MAYA WORKFLOW
INTRODUCTION
There are situations whereby we need to create a visual effect inside of Houdini and then export it into Maya so we can render. This module is going to explore the various ways in which we can work between Houdini and Maya efficiently.
1. SCENE SCALES:
The very first thing that we need to ensure before starting anything is that the scene scale in Maya and Houdini matches. This is to ensure a direct one-to-one transferability from Maya to Houdini and vice-versa.

By default, Maya uses centimeter (cm) unit while Houdini uses meter (m) unit. We can access the units settings in Maya and Houdini as seen below:
If for instance we have a model that is say 100 cm in scale in Maya, if we import it into Houdini, it would become 100 m, which is too large inside Houdini.

To get the correct scale, we need to first scale it down by 100 units in Maya so that it is now 1 cm, which in turn would become 1 m inside Houdini.
2. PREPPING COLLISION GEOMETRIES
There would be many cases whereby we want to import collision geometries from Maya to Houdini to use them as colliders in Houdini simulations. 

As we know, the best form of collision in Houdini is volume-based, that is, VDB. This means the collider geometry has to be airtight closed without any open edge borders on it.
To ensure that a collider geometry is airtight closed from Maya, we must use the 'fill hole' to close up any open edge borders before exporting such geometry to an alembic (or FBX) file.
When we do this, the vdb collision will work correctly inside Houdini.
3. EXPORTING MESHES FROM HOUDINI TO MAYA
When we create a visual effect (such as water simulation, rigid body simulations, vellum clothes etc.) inside Houdini, there are many cases whereby we want to export the cached simulation as mesh(es) so that we can import them into Maya to render.

As a result, the best way to do that is to export the mesh(es) as alembic files using the 'rop alembic output' node at the end of the simulation nodes.
In the node's parameter settings, we want to make sure we change the 'valid frame range' to 'render frame range' so that it bakes out all the frames of the simulation for us. We should also specify the output directory and add the file format/extension ".abc" at the end.
4. HOUDINI DIGITAL ASSETS
This is the most efficient way to work seamlessly between Houdini and Maya. We will create our assets from Houdini (can be literally anything), turn them into digital assets and import them into Maya via the Houdini Digital Asset (HDA) plugin that must have been installed in Maya.

In order to really understand this workflow, we will do an example exercise whereby we create some particles effect in Houdini and export them to Maya via the HDA plugin.
i. Creating Houdini Digital Asset inside Houdini:
Let us start by first creating an empty geometry node renamed as "particles sim".
Now let's go into it's SOP level and create a sphere, convert the sphere to polygon and increase it's subdivisions. Let's also translate it upwards.
Next, go to the 'particles fluids' shelf and click on 'emit particle fluid'. Follow the instructions that pops up on the viewport to create the particle effect. Now we should have an automatic particle effect setup for us. We can also add a ground plane collision so that the particles collide with a surface.
Let us go into the 'particle fluid' SOP level and locate the dopimport node. This node contains the particle simulation data that we need to export out. Connect it to a 'rop geometry output' node. We will use this node to cache out this particle simulation. So specify the output directory, cache name, and frame range, and hit 'save to disk'.
Now let us create a Houdini digital asset from this particles.

So first go back to the object level and create a new 'subnet' node and give it a name, say "maya_particles" and enter it's SOP level.
Next, create a new file node, rename it as 'maya_particles' and connect it to the 'sub-network input #1' node present there. Enter into the SOP level of this file node and we should see an empty file node.
Now let us load in the cache of our particles simulation into this node. Navigate to the directory where the cache was saved and select the cache file there, click OK to open it up. This brings back our particles simulation again.
Now we are going to create the Houdini digital asset, go back to the object level and select the subnet node again, then navigate to the 'assets' menu at the top of the window and choose 'new digital asset from selection'.
We can change the 'operator name' and 'operator label' if we want, but importantly, we have to make sure the directory is pointed to: 
"C:/Users/Topzone/Documents/houdini19.5/otls/maya_particles.hda" on our PC. Then click the accept button. 

This will create an 'edit operator type properties' window for us. This is where we can now add or remove the parameter properties we want to be included in our asset.
Let's go to the 'From Nodes' tab, expand the folder like below:
For our particles simulation, let's select the 'Geometry File' and add it to the Existing Parameter tab;
Also add the 'Reload Geometry (reload)' to the Existing Parameters.
On the Existing Parameters tab, select the 'Transform' and 'Subnet' folders, and make them invisible from the Parameter Description tab. The layout should now look like this:
Finally, click Apply and Accept; our Houdini digital asset is now created.
ii. Importing Houdini Digital Assets into Maya and Rendering:
Now let us go into Maya and first enable the Houdini Engine plugin under the plugin manager. Once enabled, it should now pop up on the Maya menu window.
Then open the Houdini Engine menu and choose 'load asset'. This will open up a browser window for us to load the Houdini digital asset we created. Navigate to the directory where we saved our Houdini digital asset (that is, the OTLs folder) and we should see it there. Then select it and click open.
We get an error! This is because Maya do not understand the file path system that Houdini uses. As we can see in the 'geometry file' path field, there is the flag "$JOB" which Maya doesn't understand.
So click on the three dots in front of 'geometry file' path field, it will open up a browser for us again. Let's navigate to where bgeo.sc particle cache was saved to and select the first frame. Click the select button.
This will pop up a warning window, simply click 'yes'. Now the bgeo.sc files will be imported into Maya. Next, click on 'sync asset' button, and the particles should now appear in the Maya viewport.
But the simulation doesn't play. So we have to add the flag "$F4" to the name, and now the simulation should playback. 

But we notice that we can't scrub and play the simulation in real-time. When we jump to a certain frame, the simulation doesn't update until we click the 'sync asset' button.
To get the simulation to play in real-time, we will change the animation evaluation mode in Maya from 'parallel' to 'DG', and now we should be able to playback the simulation in real-time.
Finally, we can render the particles with any render engine of our choice. Let us quickly demonstrate with VRay render engine in Maya.

Select the particle node in the outliner and assign a VRay MTL to it. Set the color you want. Also setup a simple light. The particles should now render.
HOUDINI - MAYA WORKFLOW
Published:

Owner

HOUDINI - MAYA WORKFLOW

Published: