On this page |
A Houdini Engine session is needed in order to use the Houdini Engine for Unity plug-in. The session will load the necessary Houdini libraries, start up the Houdini Engine server, and setup the environment and preferences for using Houdini Engine.
The plug-in handles creating and closing the session automatically when loading an HDA or creating Houdini assets inside Unity. In most cases, the user does not need to manage the session. For the more advanced user, or if want to debug a session-related issue, there are session tools available via the HoudiniEngine ▸ Session menu.
Additionally, the Session can be configured in the HoudiniEngine ▸ Plugin Settings window, under the Session section.
Session Architecture ¶
It might help to understand how Houdini Engine works, though for most users this isn’t necessary.
There are 2 main pieces to the architecture. First is the server which we call HARS. It can run standalone via the HARS executable found in Houdini bin folder. Or we can start it inside Houdini itself, for example using Houdini Engine SessionSync. The HARS server handles the Houdini-specific work. This server allows plugins to connect through use of a client library which we call HARC.
The plugin will automatically start the HARS server or it can be started manually from the HoudiniEngine ▸ Session ▸ Create menu (see Create a Session). Or can connect to an existing HARS server from the HoudiniEngine > Session > Connect menu (see Connect to Session).
The plugin uses the HARC client library to then communicate with HARS.
Session Menu ¶
Session Types ¶
Pipe Session ¶
A named pipe session allows the main Houdini Engine processing to happen in a separate process, outside of the Unity process. The named pipe is used for inter-process communicate between the Unity process and the Houdini Engine process. This is the recommended method when using the Houdini Engine for Unity plug-in.
Socket Session ¶
A Socket Session allows the main Houdini Engine processing to happen in a separate process, outside of the Unity process. For socket sessions, a TCP socket is used to communicate between the Unity process and the Houdini Engine process.
Create a Session ¶
By creating a session, the HARS server is started manually, and the plugin connects to it. This is done by using menu HoudiniEngine > Session > Create. Then it can be closed via HoudiniEngine > Close All Sessions. Note the HARS server created will be running on the local machine.
Connect a Session ¶
By connecting to a session, this assumes that the HARS server is already running. The plugin connects to it which can be done by using menu HoudiniEngine > Session > Connect. This might be useful for when running HARS on a remote machine.
To connect to a remote HARS server, follow these steps. For running HARS locally, you can skip steps 1-6, and assume remote means local.
-
Install Houdini on remote machine.
-
Create a folder on your local machine:
C:\\HEngine\\bin
-
Copy libHAPIL.dll, libHARC.dll, and libHAPI.dll from the remote machine’s Houdini installation folder (e.g.
C:\\Program Files\\Side Effects Software\\Houdini 18.0.460\\bin
) to local machine folderC:\\HEngine\\bin
-
Open Unity on local machine. Go into menu HoudiniEngine ▸ Plugin Settings ▸ GENERAL ▸ Override Houdini Install Path, and set C:\\HEngine (note the missing bin folder, but using the parent only)
-
Restart Unity on local machine.
-
Start HARS on remote machine using socket mode:
C:\\Program Files\\Side Effects Software\\Houdini 18.0.460\\bin\\HARS -s 9090
-
Back in Unity, go into menu HoudiniEngine ▸ Plugin Settings ▸ SESSION and make sure the Socket Session Host Name has the right IP or host name, and Socket Session Port is 9090.
-
Go into menu HoudiniEngine ▸ Session ▸ Connect ▸ Socket Session
It should connect successfully, allowing you to use the plugin features. If it fails, check the pop-up dialog window or the log console for information on the error and workarounds (see Session Troubleshooting).
IMPORTANT: If connecting to a remote HARS server, for loading HDA and other required files, they need to be accessible by the HARS server. It is recommended to use a network shared drive accessible on both the local and remote machine by the same paths.
Houdini Engine SessionSync ¶
Houdini Engine SessionSync can be helpful when learning to use Houdini Engine and creating HDAs, or troubleshooting HDA issues. For more information, see SessionSync.
Session Troubleshooting ¶
If you are getting session creation or connection issues, try the following steps:
-
Check that the connection settings in HoudiniEngine ▸ Plugin Settings ▸ SESSION are correct. Make sure pipe name is valid if using pipe session, or server name and port are valid if using socket session. Revert to defaults if not sure.
-
Force close and reset sessions via HoudiniEngine ▸ Session ▸ Restart Session. This closes the current session and creates a new session without any assets loaded. Once restarted, existing assets in the Unity Scene can be recooked by changing their parameters or by invoking Recook via the Inspector UI. Recooking will automatically load the asset into the new Houdini Engine session.
-
Check that Houdini is installed at the correct location that the plugin expects. You can override this location in the plugin settings: HoudiniEngine ▸ Plugin Settings ▸ GENERAL ▸ Override Houdini Install Path.
-
Restart Unity and try again.
-
Open the process manager, and kill an HARS processes on the local machine.
-
Restart the local machine or reinstall Houdini and the Unity plugin.
If all else fails, please contact support@sidefx.com with details of the problem, including the any log errors or pop-up dialog messages, Unity and Houdini version, and licensing information.