Broken Material Reference in instanced mesh

   266   2   1
User Avatar
Member
3 posts
Joined: Nov. 2017
Offline
I have created a houdini asset to scatter trees for a forest. However the billboard LOD breaks whenever I try to import it into the houdini asset. The culprit seems to be the material reference. The base mesh has 2 materials (one for the stem and one for the leaf cards). The LOD has one material with the billboard texture on it.

What seems to happen is that the billboard gets assigned the material that is in the first materail slot of the asset. That is to say the stem material. Does anybody know how to fix this, so that the LOD gets the proper material slot?
Edited by Grainiek - Oct. 31, 2019 05:59:08

Attachments:
broken_material_in_instanced_mesh_with_lod.jpg (1.2 MB)
lod_assigned_to_incorrect_material_slot.jpg (318.6 KB)

User Avatar
Member
3 posts
Joined: Nov. 2017
Offline
Alright, so I have found a workaround. The issue stems from the system not knowing the correct materials ids. So if all lods have all materials applied it works fine. I created a tringle for each of the materials present in all of the lods. I applied a materal to each of these and then assigned them for all lods. That way all lods have all materials assigned and can thus find their proper main material.
User Avatar
Staff
369 posts
Joined: Sept. 2016
Offline
Hi,

Yes, this does sounds like a bug with the material ids when converting the Houdini data back to Static Meshes.

On a side note, if you're not processing the mesh in Houdini (a simple scatter HDA for instance), I'd actually recommend that you use unreal_instance attributes for the instancing over copying a geometry inputs.
This will make the instancer use the original unreal mesh, instead of using a copy of it that's been processed by Houdini and the plugin.
  • Quick Links