Managing material effects on my characters

Hello,

I am working in a game with character armor customization. This means only one character can have multiples meshes with multiple textures. For each par of the character (head, chest, arms, legs, etc) can be dozens or hundreds of skins, everyone with its materials.

Now I want to add some common effects to my characters. For example, I want them to be colored in yellow/golden when they are unstoppable. I found a great package in the market with fresnel material function that looks great. However, the only way I know to apply it is material by material. I can add the function to the material, and a scalar parameter to control when it is active, but I have to do it to almost all the materials in my game. What if now I want to generate a different effect on my characters. For example, control the opacity. Have I to add a parameter on each material to control de opacity?

My question is. What is the suitable way to manage this (different visual effects on the materials of the character)? The only way I know now are:

  • having different material instances of the same material for each effect
  • Addind to each material a parameter for each effect

I have read a bit about Material Parameter Collections. If I understand well, all the materials related to the parameters are going to change, but I want to change only the materials of the character that is suffering the effect. Two different characters can have some materials in common (for example, if both have choosen the same sword), but I only want to show the effect in the character that is suffering it, not all with the same materials. This is why I think Material Parameter Collections is not for this.

What is the suitable way?

1 Like