"Recook Asset" instafreezes Unity

   2359   13   2
User Avatar
Member
52 posts
Joined: Nov. 2016
Offline
Hey there. I have attached a test HDA below I have been using.
It loading a texture as a heightfield,
projects an object from the scene unto it and lets you export the new heightmap.

It works sort of as intended.
If I move the object projected and then click on keep world transform for the input in Unity I can update the projection.
If I move the object, then click the checkbox on and off (or change another parameter) it updates.

But if I click on Cook on Transform Update or press the Recook Asset
Unity just freezes up.

There is nothing running wild in the task manager, it does not look like an infinite loop of caching problem, it's just a freeze that also stops the Unity interface.

I also tried making another quick HDA for testing which does not exhibit any bad behavior like this.

So is anyone else seeing this?

I am on Unity 2018.1.0f2, Houdini 16.5.496 using the Beta v2 on a Windows 10 machine.


Update: Yea so having the ROP File Output “Render” button exposed as an Asset Parameter seems to be at fault. I'll find a way to file a bug report…
Edited by MartinBaadsgaard - June 27, 2018 05:43:25

Attachments:
Martin_terrainprojector.hda (19.8 KB)

User Avatar
Member
571 posts
Joined: May 2017
Offline
On the recook, the render is taking a while, hence the freeze. It does return once its done. I'll look into make this asynchronous so its not blocking the Unity UI.
User Avatar
Member
52 posts
Joined: Nov. 2016
Offline
Hey there. Thank you for looking into this.
Unfortunately, this is not the behavior I am seeing.
The Unity interface freezes, no process seems to be taking any noticable amount of resources and the process is still hanging after an hour.

System specs:
i7-8700 3.20Ghz
32GB ram
Geforce GTX 1070
Kingston A400 SSD drive

So I take it it's definitely not hardware related.

Is there a timeout somewhere I might have missed that I need to set or something?
User Avatar
Member
571 posts
Joined: May 2017
Offline
I haven't been able to reproduce it hanging indefinitely.

There is no timeout yet, but can be added. Note that while the cook is done asynchronously in Houdini, the call to cook is what seems to be holding the Unity UI. This is something I'll investigate and improve on in the near future.
User Avatar
Member
52 posts
Joined: Nov. 2016
Offline
Thank you again.

After redoing the expressions and inputs on it a few times I just deleted the node and redid the steps one at a time, with output, settings etc. and now I am back at the same point and it works..
Recooking takes a moment. It hangs for a bit, then shows the “Recooking..” button for a split second and then resumes interaction. Not sure what was up with the problem, but it should be present in the originally attached HDA.
(Again, only happens when pressing recook, not when actually pressing the “render” button).

Anyway…
I don't understand why it does the rendering on recook though, and ONLY if the button is exposed.
Is that really intended behavior??
Edited by MartinBaadsgaard - July 3, 2018 09:47:58
User Avatar
Member
571 posts
Joined: May 2017
Offline
The button being exposed works like a toggle.

The Recook button forces an explicit cook of everything, regardless of any parameters have changed. When only manipulating parameters which causes the regular implicit cook, only the parameters that had changed are updated, then the asset is cooked, then only geometry and materials that had changed are updated. On Recook, parameters are always updated, asset is cooked, and all geometry and materials are updated.

If it helps you understand it better, pressing the Render button is sending just the button parameter, while Recook sends all parameters. Perhaps the other parameters are causing issues. I'll have to dig into it to see why the stall between Render and Recook.
User Avatar
Member
52 posts
Joined: Nov. 2016
Offline
Okay. I will start a new topic then and ask how to avoid that.
I thought things like Render and Cache to Disk and such were not part of the main “flow” and only ran their logic when they were specifically invoked.
User Avatar
Member
52 posts
Joined: Nov. 2016
Offline
Okay I HAVE to ask again, since this is a major blocker.

Is it really supposed to render automatically, just because the button is in the Operator Parameters?
There is no way it happens in Houdini, it's only in Unity.
It also doesn't happen when I firstl load the Asset. It is only on Recook.
The COP network is not wired up in the SOP, the ROP File Output is not connected in the COP network.

So there is a ROP File Output just floating around by itself that triggers cooking.
Edited by MartinBaadsgaard - July 5, 2018 12:27:05
User Avatar
Member
571 posts
Joined: May 2017
Offline
Please upload the HDA and I'll take a look.
User Avatar
Member
52 posts
Joined: Nov. 2016
Offline
Thank you! Here it is

Sorry for any “trash” in there,
I am just chipping away trying to learn Houdini and produce a “proof of usability” at the same time, so it's a bit of a mess.
Edited by MartinBaadsgaard - July 5, 2018 12:43:11

Attachments:
Martin_WorkfileExampleOBJ.hda (2.7 MB)

User Avatar
Member
571 posts
Joined: May 2017
Offline
After investigating, this looks to be an unintended behaviour of Recook. Button parameters that have a callback function are always invoked when a value is set. Since Recook sets the values of all parameters, it is inadvertently triggering the callback. I'll be fixing this soon, and will let you know.
User Avatar
Member
52 posts
Joined: Nov. 2016
Offline
Great! Thank you!
All I need for now is to be able to point and say “this will work soon”,
so that fits me fine..
User Avatar
Member
571 posts
Joined: May 2017
Offline
This should now be fixed in Houdini 16.5.528 and newer.
User Avatar
Member
52 posts
Joined: Nov. 2016
Offline
Thank you!
  • Quick Links