HDA for Unreal Engine 4 materials workflow

   180   0   1
User Avatar
2 posts
Joined: Oct. 2012
Hi! I'm relatively new to Houdini and maybe this quistions are kind of nooby, anyway I'm trying to figure out the best ways to solve my problem and I hope you can help me with this.

I'm making a HDA that makes door system: it can generate different kind of doors, different sizes, ornaments, door frames etc. It also generates 3 LODs (0, 1 and 2) and hi-res model for maps baking. This asset also unwraps the UVs (for each LOD) and then I have a Maps Baker (normals, ao, material IDs, metallic).

Ideally I'd like this asset to be as much reusable as possible, and trying to achieve this I got to several questions:

1. Since I have slightly different UV-layout for each LOD is it possible to create one “Bake” button to bake them all in the asset UI? Or there must be one button for each baker?

2. I'd like to push all baked textures automatically to UE project (in the case when I use Unreal material for my doors) – AFAK the only way to do it is to create Houdini material that utilizes that textures and send it to the output… I use this expression (in the “File” field) to access to the files
strreplace(chs("../../maps_baker1/sOutputFile"), "$(CHANNEL)", "normal")
, but I'm not sure if this way is correct. Or maybe there's another (more convinient) way for that – since this approach can cause errors if files don't exist until they are baked*. Could you please help me with this?

* Ofcourse I can use file_stat VEX function to check if baked files are exist and then pass the result to the Switch node that simply will skip the material assignment if no textures were baked, but maybe this approach is too overwelmed, idk.

Thank you!
Alexander Zubkov,
  • Quick Links