Is there a way to combine existing materials in a layered manner without material functions?

Hello,

I’ve been playing with Material Functions and layered materials. What I’m trying to do is add a colored hue and glowing rim to existing objects, without having to modify every material from these objects, and was hoping this was possible. I.e. instead of using Material Funcs and blend them together, blend real Materials instead.

Has anyone achieved this? Is this a planned feature?

Thanks!

Hey joelr -

You have actually answered your own question here. The Material Function is what you are wanting to bring into your object materials. You will have to add the glow/Fresnel Material function to your existing materials through a single material function. Here is an image of a quick and dirty material function that could work for you.

Let me know if I need to clarify

-Eric Ketchum

Thanks Eric!

My question is more about combining this effect with an existing material, i.e. a game item that is already textured. So far it looks like I would have to convert the object material into a material function to be able to blend it with the above function.

The MatLayerBlend_Simple node for example, will take 2 “materials” as input, but I’m not able to reference another existing material in the node editor, just material functions through MaterialFunctionCall. Is that possible?

Hey joelr -

No you should be able to simple add this material function into your existing material with a Lerp setting which is all the Simple Blend Material function is anyway.

Here is an example (The object’s base color is LERP’d between the new material function and its original base color as well as the new material function plugged directly into the Emissive Color.):

Hope that helps, but let me know if you need more

-Eric Ketchum

Hey Eric,

That’s exactly the issue here. The existing materials I have are not functions, they are materials of varying complexity. I have a number of these materials for a variety of items which I would all like to get “glowing” capability, without having to modify each individual material.

I was thinking about making a super material which would combine:

  • The material already on the object as one input
  • The glow function or another function as another input
    then dynamically replace the item’s material with the combining material when the item is selected, setting the old material as the first input. Setting a material (not a function) as an input to another material is where I have the problem. This does not seem possible.

If I understand your explanations correctly, I would have to convert all my materials to add in the glow function, or modify them all to become functions that can be referenced from the combining material. Is this correct?

Let me know if I’m unclear, I’ll try to upload my diagrams tonight.

Hey joelr -

Yes, you are correct you will have to add that functionlaity into the original objects materials. If you are trying to do this dynamically though you can develop a blueprint that switches between the original material and the glowing material through a dynamic material instance.

-Eric Ketchum

(Sorry if it’s too late to post here)

I found that Static Switch Parameter node is very useful for this approach. I added different effects implemented as material layers inside my original material then used a chain of static switch parameters to choose the result. Then I created one material instance per effect with corresponding switch turned on:

the question was how to mix already existing NON FUNCTIONS materials, so I guess the answer is not possible