How do I get multiple material slots on one object (via houdini engine in unreal engine)?
As far as I know, for unity you can create an attribute “unity_material” and set it to string with a path to a material. What's the equivalent for Unreal? I tried just assigning different materials via a Material Sop, but that didn't work. (I still only get one material slot per object).
- I'm asking, because I read somewhere that support for that was recently added.
How to assign multiple materials to the same object
14624 11 1- DASD
- Member
- 453 posts
- Joined: 2月 2013
- Offline
- ttvdsfx
- Member
- 173 posts
- Joined: 4月 2014
- Offline
Hello DASD,
We do have support for multiple materials per generated static mesh. Please have a look at the attached asset; points of interest are SHOP nodes Multi_Whole1/2/3 and obj Multi_Whole (look at material nodes). You can also import this asset into UE and see how it works.
Please let me know if this answers your question.
Thank you!
We do have support for multiple materials per generated static mesh. Please have a look at the attached asset; points of interest are SHOP nodes Multi_Whole1/2/3 and obj Multi_Whole (look at material nodes). You can also import this asset into UE and see how it works.
Please let me know if this answers your question.
Thank you!
- DASD
- Member
- 453 posts
- Joined: 2月 2013
- Offline
Your example file certainly works. I tried to apply this on my file and I did something very similar before, but I am still debugging.
I think - correct me if I'm wrong - that the different cop nodes being fed into the materials is actually essential for this to work. I did not have time to test it yet, but I think that if you only set colors on the shaders, Houdini Engine won't differentiate between dirrent shaders and give the object only one material slot.
- If that's not it, I must be missing something else.
I think - correct me if I'm wrong - that the different cop nodes being fed into the materials is actually essential for this to work. I did not have time to test it yet, but I think that if you only set colors on the shaders, Houdini Engine won't differentiate between dirrent shaders and give the object only one material slot.
- If that's not it, I must be missing something else.
- ttvdsfx
- Member
- 173 posts
- Joined: 4月 2014
- Offline
- DASD
- Member
- 453 posts
- Joined: 2月 2013
- Offline
- Andreas Strømberg
- Member
- 3 posts
- Joined: 3月 2015
- Offline
I have spent some time trying to figure out this myself, and I got it working after placing my shop network inside my digital asset.
I had it outside first, since I have more than one digital asset that uses the same materials.
That was on a simple sphere with 2 materials, I could not get it working in my proper digital asset.
But is that the case, that the shop network needs to be inside the digital asset?
I had it outside first, since I have more than one digital asset that uses the same materials.
That was on a simple sphere with 2 materials, I could not get it working in my proper digital asset.
But is that the case, that the shop network needs to be inside the digital asset?
- DASD
- Member
- 453 posts
- Joined: 2月 2013
- Offline
- Andreas Strømberg
- Member
- 3 posts
- Joined: 3月 2015
- Offline
- Andreas Strømberg
- Member
- 3 posts
- Joined: 3月 2015
- Offline
- DASD
- Member
- 453 posts
- Joined: 2月 2013
- Offline
- MorganNilsson
- Member
- 45 posts
- Joined: 2月 2014
- Offline
- ttvdsfx
- Member
- 173 posts
- Joined: 4月 2014
- Offline
There's also a way to specify Unreal materials, using unreal_face_material string primitive attribute (you can have different assignments for different primitives); it must be a valid UE4 material or material instance reference. If engine does not find such material during cooking, it will fallback to default Houdini UE4 material which we ship (which samples vertex colors, I believe).
-
- Quick Links