Hi, I'm working with a setup that uses Houdini Engine to read point clouds for scattering static meshes in Unreal Engine. I'm encountering an issue with material instance overrides.
Currently, I'm using the unreal_uproperty_OverrideMaterials attribute to override the assigned materials. While the override itself works successfully, I can't seem to specify which material slot should receive the override material.
I've attempted various syntax approaches, including:
Prefixing the material path with square brackets to indicate slot index:
/Script/Engine.MaterialInstanceConstant'/Game/P214/Environment/Alley/CityGen/Pavement/Mesh/MI_Pavement_Base_01.MI_Pavement_Base_01'
Modifying the attribute name to include slot numbers:
unreal_uproperty_OverrideMaterials_1
According to the UProperty dump logs:
LogHoudiniEngineRuntime: unreal_uproperty_OverrideMaterials : OverrideMaterials (Override Materials) - UE TYPE: ObjectProperty array - H TYPE: string
This indicates that while Unreal expects an ObjectProperty array, the Houdini attribute type should be a string. I've tried using both string and string array types in Houdini, but neither approach seems to work for specifying material slots. The plugin version is at 20.0.590, and unreal version is 5.2, not sure if this affects the behavior though.
Is this functionality unsupported, or am I missing something in my implementation? Any information would be greatly appreciated.
unreal_uproperty_OverrideMaterials specify material slots
314 1 1- Cedric4826
- Member
- 10 posts
- Joined: 6月 2020
- Offline
- dpernuit
- スタッフ
- 550 posts
- Joined: 9月 2016
- Offline
Hi,
Generic property attributes are more aimed towards random properties on objects that are not "manually" supported by the plugin.
For materials, you can just use the "unreal_material" attribute.
Prefixing with the material slot in square brackets is what we use when creating meshes - as one face can only have one material assigned, unreal_material has only one value that can be used to specify the material slot
ie s@unreal_material = "/Path/To/First/Mat/In/First/Slot"
s@unreal_material = "/Path/To/Second/Mat/In/Second/Slot"
With instances - you only have one "point" - so we need to use multiple attributes per material slot as we cannot give the unreal_material attribute multiple values.
In that case, you can just add the index of the material slot you want to change to the attribute name:
For example: SM_Pavement has two material slots
s@unreal_material0 = "/Path/To/First/Mat/In/First/Slot" (or s@unreal_material= XXXX)
s@unreal_material1 = "/Path/To/Second/Mat/In/Second/Slot"
etc..
Generic property attributes are more aimed towards random properties on objects that are not "manually" supported by the plugin.
For materials, you can just use the "unreal_material" attribute.
Prefixing with the material slot in square brackets is what we use when creating meshes - as one face can only have one material assigned, unreal_material has only one value that can be used to specify the material slot
ie s@unreal_material = "/Path/To/First/Mat/In/First/Slot"
s@unreal_material = "/Path/To/Second/Mat/In/Second/Slot"
With instances - you only have one "point" - so we need to use multiple attributes per material slot as we cannot give the unreal_material attribute multiple values.
In that case, you can just add the index of the material slot you want to change to the attribute name:
For example: SM_Pavement has two material slots
s@unreal_material0 = "/Path/To/First/Mat/In/First/Slot" (or s@unreal_material= XXXX)
s@unreal_material1 = "/Path/To/Second/Mat/In/Second/Slot"
etc..
-
- Quick Links