I’m curious about the possibility of layered materials being customizable in game by the player. If I were to setup a layered material with parameters that can adjust color, metallic/roughness values, and swap patterns would it be possible to allow players the ability to tweak those options in game? If so, would the different colors have to be handled through preset parameters? Or can they be given access to the color wheel? Also, would it impact performance in a multiplayer game to have a customizable layered material as opposed to a customizable regular material?
Sure, you can do that. If you want to give your players a color wheel though, I suppose you’d have to implement your own GUI for that.
Layered materials are more performance heavy than regular materials, because the object is drawn with both materials and then blended together, even at places where there is 0% of one of the materials. For multiplayer it shouldn’t affect network performance. You only need to replicate the color values initially / on change.
// EDIT: I might be wrong on that color wheel thing. I just read that the Unreal Editor itself is a Slate app, and you can use Slate in your games for GUI. I totally haven’t looked into it, but it may have a color wheel out of the box.
So should I avoid layered materials even for my environments then? I’m building them to be visually appealing, but performance is a big priority. I’ll check out slate, thanks for the info.
Material layers are meant to increase the reusability, whenever you have models in your level that share a certain surface material you can use material layers. Lets say you have 30 different rock models in your level, it would be “stupid” to make 30 diffuse maps if you can just use one material layer for it. The only downside that they have is that every material layer that you have inside your material, always gets loaded into the memory no matter if the material layer is visible or not.
You can have a look at the 2013 Siggraph presentation from Brain Karis to learn more about material layers. Page 10
Edit: And to you initial question. Yea you can control almost any aspect of your materials through blueprints and/or material parameter collections.
Thanks very much for the info, and the powerpoint. =)