Can I use the File node in my HDA? (external geometry)

   4631   4   1
User Avatar
Member
52 posts
Joined: 1月 2009
Offline
Hi all,

I'm building a curve based building builder (user draws a curve and a building magically appears)

However, some of the HDA geometry exists outside of the .hiplc and is brought into the HDA via File nodes (a variety of windows, doors, roof props etc all as .bgeo files)

Unity doesn't seem to like this workflow and refuses to load in the extra geometry, and breaks the asset in Unity.

Can someone advise on the correct workflow for including externally referenced geometry and bringing it in as part of a single HDA.

Thank you - Unity Engine is very very cool, I'm having a lot of fun exploring the possibilities.

Richard.
User Avatar
Member
571 posts
Joined: 5月 2017
Offline
The Unity plug-in should load the bgeo files via a file node (exposed file path parameter) in the HDA. What error are you getting or incorrect behaviour are you seeing? Error could also be due to another part of your network.

Would help to attach the HDA, or try with a simple HDA that has a file node with a poly reduce for example. Also please try the latest version of the plug-in.
User Avatar
Member
52 posts
Joined: 1月 2009
Offline
Hi Seelanv,

Thanks for getting back to me - please find attached some pics of a testScatterer asset I made. My plan is to create an extensible system where the user can plug-in gameObjects (as many or few as required). I'm not sure I've set it up in the most efficient / best way

Houdini [imgur.com]



a ‘picker’ attribute is stamped onto a switch node to randomly select an obj

However in Engine no geo appears and an error reported…

Unity [imgur.com]

If this is not the most efficient way to do it - please advise and I'll do my research and update.

Many thanks for your help.
Edited by Banks - 2018年7月31日 07:12:47
User Avatar
Member
571 posts
Joined: 5月 2017
Offline
The no geometry error means that there was no geometry to scatter. Best way to debug this would be to setup the HDA as you have in Unity, then from Unity, go into Houdini Engine Unity menu -> Debug -> Open Scene in Houdini. It will open up a new Houdini session and show you the state of the asset inside Houdini. Look at your File and Switch nodes to see if there is any output.

I just tried out your method and it does work. I've attached the example HDA I used, as well as a screenshot of the Pack and Instance option to turn on in your copy sop. This turns on packed primitives, allowing to efficiently instance the geometry where only a single copy of the geometry is used and shared across all instances. This is treated as shared mesh in Unity, and the material will be set to use GPU Instancing which enables batching.

More on instancing here: https://www.sidefx.com/docs/unity/_instancing.html [www.sidefx.com]
Edited by seelan - 2018年7月31日 10:23:19

Attachments:
scatter_file.hda (26.9 KB)
packed_instance.png (147.6 KB)

User Avatar
Member
52 posts
Joined: 1月 2009
Offline
Thanks Seelanv,

That helped me chase down the problem - I've replaced File nodes with exposed Object Merge nodes and it works great.

I've also replaced my old fashioned copy-stamping with the new fancy for-each method and it just feels much slicker.

Thanks again for you help, much appreciated.

Regards

Richard.
  • Quick Links