Home Unreal Engine

Material layers in 4.19.2 ?

poopipe
grand marshal polycounter
Offline / Send Message
poopipe grand marshal polycounter
Hello, 

I thought I'd have a play with this today but can't find the option to create the required assets 
namely these
  • Material Layer
  • Material Layer Blends
They don't seem to be in the create menus, the experimental editor option to enable them is missing from 4.19.2 (the example layers and blends option is there though)

I can't find any mention of them being removed and haven't seen any indication that the workflow has changed.  does anyone have any idea what I have to do ? 


ta

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Go to the project settings, type "support material layers" into the search.
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    aha! nice one...  

    did I miss something or did they just move it without documenting the change?
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    It was always like this.
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    you're right - this is what happens when you drink at lunchtime kids :D
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
  • melviso
    Options
    Offline / Send Message
    melviso polycounter lvl 10
    Is there a way to convert a material to a material layer? Say u have a complicated material setup, how is this done? before u set it up to work with a material blend? or do I have to make the material attibutes in the material layer all over again. Also does material layer support different shading models?
  • leleuxart
    Options
    Offline / Send Message
    leleuxart polycounter lvl 10
    Material Layers don't support multiple shading models. Material Layers is just a another word for "texture set inside a Material Function," so you can probably figure out the limitations are based on Material Functions and a single material. Although some shading models(cloth, clear coat...) support a scalar value as a mask, so technically you can do a standard + cloth shading model in one material, but otherwise you can't do standard + cloth + skin + whatever.

    If you make something in a standard material and want to turn it into a layer/function, just copy/paste it and hook up whatever outputs you want or use the Material Attributes before the single function output to pass the MA type.

    Once your layers/functions are made, you can go back to a standard material and utilize the various functions Epic made for layer blending, or make your own. You can get individual properties of a Material Layer to blend with a non-layer, or just modify in general, by using the Get and Set Material Attributes functions.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    @leleuxart - I think he is asking about the new system, which works very differently. You don't need those layer functions anymore. Get-Set material attributes aren't needed either anymore. It works very much like a Photoshop layer stack now, and you can add in any amount of layers in an instance by pressing a + button, and then assign layer assets. Layer assets can have parameters exposed, so it only takes a few minutes to set up a multi layer material with lets say 20 layers, if all the layers are similar.  But you are right, you still can't blend different shading models.
  • melviso
    Options
    Offline / Send Message
    melviso polycounter lvl 10
    Thanks guys. Guess I will have to do without material layers then. Blending between shading models would have been dope.
  • Prime8
    Options
    Offline / Send Message
    Prime8 interpolator
    Just learned about the (not so) new material layer system, watched some Epic videos, read documentations and in the end figured out they put the development on hold  :/
    Too bad, looked really promising, hope they continue with it in the future.
  • melviso
    Options
    Offline / Send Message
    melviso polycounter lvl 10
    Does the material layering work with shading models now?
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    No and I don't think it ever will. If it would be possible you'd be able to simply lerp between shading models. You also can't change shading model at runtime. And if you could blend them using material layering, it would mean that you could also change it at runtime (say using a mask texture).
  • melviso
    Options
    Offline / Send Message
    melviso polycounter lvl 10
    Thanks for the info, mate. So back to the Lerp node then which I find to be way better for more control.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I was actually thinking about this and I don't think I can think of a case where this would be needed. Do you have any specific case in mind? Maybe theres a way to do it some other way.

    For example, softly blending from sss to clear coat could be done by using a double mesh at the transition with a tiny offset on the outer one, and use an opacity mask with dithered masked blend mode. Not totally ideal , but works.
  • melviso
    Options
    Offline / Send Message
    melviso polycounter lvl 10
    Like a window, some people use metallic maps for the glass areas instead of cutting out the faces but ue4 uses a different shading model for glass. That's the issue.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    That would be a bad prectice to be honest. You would need to calculate both shading models for the whole asset. The proper way to do this is to add a separated material. Otherwise this would be as bad as using only one material (which is translucent) for the window glass together with the frame and use a mask. The frame would be rendered using the much more expensive shading model for no reason. Not to mention the rendering errors that can arise in this kind of cases. Haven't seen people using non standard shading model for window glasses though.
  • melviso
    Options
    Offline / Send Message
    melviso polycounter lvl 10
    I had figured that out a long time ago. There are  some people who aren't familiar with ue4, coming from offline renderers who do this and I agree its wrong. I was thinking that the material layers system  in ue4 was aimed at making such things possible  in future and all those issues will be eliminated in the long run.
Sign In or Register to comment.