Unreal not loading material overrides

   4521   3   1
User Avatar
Member
5 posts
Joined: 5月 2017
Offline
I've been searching and searching and testing many different setups but no matter what I try I can't get material overrides to properly work with an HDA inside of Unreal.

My setup is simple, a for loop that sets the material and override for the basecolor_texture. But no matter what I do this only imports blank when in unreal. The only way I can get it to load the texture in is by hard coding the path directly in the shader. Is it even possible to do this? My end goal would be to load the textures in then assign them to an instanced Unreal material but I first need to get them loaded.

Any help would be appreciated.

Attachments:
Annotation 2019-09-06 155111.png (77.3 KB)
Annotation 2019-09-06 155417.png (30.4 KB)

User Avatar
Member
5 posts
Joined: 5月 2017
Offline
Is there a way to just tell Unreal what files to load in directly through the HDA? I can then just reassign them to an instanced material in Unreal. Otherwise I would have to manually load them in which doesn't make much sense here.
User Avatar
スタッフ
550 posts
Joined: 9月 2016
Offline
Hi,

Unfortunately, material overrides like this won't be supported by the unreal plugin, as the plugin / HAPI only sees this setup as one material (the one in your matnet), and will only use its default value (the one directly set on the material itself).

You'd actually need to create a new material for each of the piece in your loop, and assign it to the unpacked geometry.

In UE4, the plugin would then create a material for each of the pieces, with the texture assigned.
You could then use the unreal_material_instance attributes to create instances of an existing Unreal material, and unreal_material_parameters to use the texture created from the houdini material.

Unfortuantely, there is currently no way to just set an image file path to the “unreal_material_parameters” and have unreal automatically load/create the texture, but that would be a good RFE.
User Avatar
Member
20 posts
Joined: 9月 2013
Offline
Is there any support for this kind of functionality in newer versions of Houdini Engine 2.0? Looking to do something similar, automatically generate textures and material instances from a material_override attribute, without having to create tons of shaders in python etc, which can be problematic when using PDG. thanks
  • Quick Links