Async Cooking

   960   0   1
User Avatar
Member
1 posts
Joined: Jan. 2021
Offline
Hi there,

I'm currently facing an issue with Houdini plug in for Unity : I'm not able to cook asynchronously my HDA in Unity.

What I understood, by reading doc and check all sources, including wrapper and C code.

- Houdini async cooking must be set up while we're initializing our session thanks to this hapi.initialize [www.sidefx.com].

By default,
cooking_thread_stack_size
value is
-1
, that means we're using all core but 1.

- Synchronous cooking is just added on "top layer" by polling request cooking status in 'infinite loop' to Houdini engine server until cook is done (successfully or not) and lead to blocking behavior as intended in not async mode.

RequestCook with Async = true just return on update Houdini routine (from AssetUpdater), to let the core do others jobs, and not blocking on update Unity main thread.

- No matter what I do, the call
session.CookNode
(hAPI cook node doc [www.sidefx.com]) is a blocking call, even with session setup with async.

What I've done :
- Once session created from code (tried both Pipe or Socket) and connected, HDA loaded and input node setup, we're ready to cook. So, I call RequestCook (from HEU_HoudiniAsset.cs class in Unity plug in) with bAsync at true.
Result : Unity freeze until cook is done, and my HARS process in Mac OS X going up to 1536% usage.

Tried to tweak
cooking_thread_stack_size
lead to no change. Absolute values, negative (like -4 to use less core, etc...)

My questions :
- Is cooking async have an issue with M1-M2 Mac system?

- Is HQueue required to get Async cooking working?

- Am I misunderstanding something about Unity plug in, and how Async/Sync cooking is implemented?

Thanks for your help!
  • Quick Links