DASD
2015年11月12日 05:45:22
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.
ttvdsfx
2015年11月12日 11:15:06
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!
DASD
2015年11月13日 14:14:46
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.
ttvdsfx
2015年11月13日 15:26:32
Hello,
Setting colours on shaders should work. Are you using stylesheets by any chance? Can you attach your asset so we could have a look at what's going on?
Thanks!
DASD
2015年11月13日 15:40:33
I'm not using stylesheets, as far as I know. I'll try to find a solution next week and make an update in this post.
Andreas Strømberg
2015年11月15日 17:45:38
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?
DASD
2015年11月17日 03:35:00
I tested it (Houdini Indy version 15.0.287) and the only thing that worked was to feed cops into the shaders (like shown in your example).
- It's not bad but I guess that is not intended behavior.
Andreas Strømberg
2015年11月20日 06:34:43
I'm still having problems getting this to work, so I'm uploading a cleaned version of my project file.
With one digital asset that works and one that does not.
Andreas Strømberg
2015年11月24日 17:08:27
Could anyone test my file, to see if I have done something obviously wrong?
DASD
2015年11月26日 05:42:06
My guess is that it does not like that you feed objects into each other. Try putting it all into one object node.
MorganNilsson
2015年11月26日 07:19:26
You could also try to use a single material node to assign your materials, place it at the end before the output node.
ttvdsfx
2015年12月18日 16:53:11
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).