[Resolved] Assigning materials
6983 7 1- Mike K
- Member
- 40 posts
- Joined: Feb. 2015
- Offline
What's the process for assigning a UE4 material to an HDA? I've tried creating a primitive attribute called “unreal_face_material” and have it assigned to the names of my UE4 materials as shown in the editor. I do get the multiple material groups on my static mesh, but they are always set to the default material.
- Mike K
- Member
- 40 posts
- Joined: Feb. 2015
- Offline
Ok, the way to do it is to right click the Material in the UE4 editor content browser, and select “Copy Reference”.
Then paste this as the Value of the “unreal_face_material” attribute. It's a long string that should look something like “Material'/Game/FirstPersonBP/Oxidized_Aluminium_MAT.Oxidized_Aluminium_MAT'”
Then paste this as the Value of the “unreal_face_material” attribute. It's a long string that should look something like “Material'/Game/FirstPersonBP/Oxidized_Aluminium_MAT.Oxidized_Aluminium_MAT'”
- Journeyful
- Member
- 4 posts
- Joined: Jan. 2017
- Offline
Mike K
What's the process for assigning a UE4 material to an HDA? I've tried creating a primitive attribute called “unreal_face_material” and have it assigned to the names of my UE4 materials as shown in the editor. I do get the multiple material groups on my static mesh, but they are always set to the default material.
How exactly did you go about doing this? I put down an attribute rename in my geometry node but I dont know what to put in the FROM section to target the material name I want to switch for Unreal Cooking….
- dpernuit
- Staff
- 534 posts
- Joined: Sept. 2016
- Offline
Hi,
You don't need an attribute_rename node, but an attribute_create.
Create an “unreal_material” primitive or detail string attribute.
The attribute must contain the path to the Unreal material you want to assign. The easiest way is indeed to use “copy reference” on the material.
On a side note, “unreal_face_material” will work as well, but is marked as deprecated, so I'd recommend using “unreal_material” instead.
You don't need an attribute_rename node, but an attribute_create.
Create an “unreal_material” primitive or detail string attribute.
The attribute must contain the path to the Unreal material you want to assign. The easiest way is indeed to use “copy reference” on the material.
On a side note, “unreal_face_material” will work as well, but is marked as deprecated, so I'd recommend using “unreal_material” instead.
- Michela Ledwidge
- Member
- 12 posts
- Joined: Aug. 2013
- Offline
- dpernuit
- Staff
- 534 posts
- Joined: Sept. 2016
- Offline
Hi,
This should be working, the last important thing is to make sure your attribute is created on primitives or details (your attribute create node should have either primitive or detail as its class).
I've attached an HDA that does that, you can replace the material ref in UE and it should update the material.
This should be working, the last important thing is to make sure your attribute is created on primitives or details (your attribute create node should have either primitive or detail as its class).
I've attached an HDA that does that, you can replace the material ref in UE and it should update the material.
- gabriel.roccisano
- Member
- 16 posts
- Joined: May 2009
- Offline
Hi guys,
I've got this much figured out. Additional question:
I want to assign materials to various HDA's in UE4 and make sure they update the material paths for that asset on disk.
Currently building materials in Substance Designer and don't necessarily know names or want to assign ahead of time. However if we set up an asset and export it to UE4, when I do an update on that asset from Houdini it of course wipes out any material assignments done in UE4.
E.g. Assembling an apartment and have set it up to have wall polygons with individual unreal_material strings so each wall can potentially have a different material assignment (accent wall, etc).
Is this possible? I.e. HDA's being modified from both H16 and UE4?
I've got this much figured out. Additional question:
I want to assign materials to various HDA's in UE4 and make sure they update the material paths for that asset on disk.
Currently building materials in Substance Designer and don't necessarily know names or want to assign ahead of time. However if we set up an asset and export it to UE4, when I do an update on that asset from Houdini it of course wipes out any material assignments done in UE4.
E.g. Assembling an apartment and have set it up to have wall polygons with individual unreal_material strings so each wall can potentially have a different material assignment (accent wall, etc).
Is this possible? I.e. HDA's being modified from both H16 and UE4?
- chrisgreb
- Member
- 603 posts
- Joined: Sept. 2016
- Offline
-
- Quick Links