Download

Support for so called 'Mix Shaders' (Blender concept)?

I’m a recent lurker/hobbyist looking to pick up UE4 in the coming months and have started doing a bit of research around its capabilities. I’ve started with the material system and I like what I see so far; I think I mostly understand how I would construct things. However, I haven’t quite internalized all the possible ways materials may be combined and how that relates to a material’s singular lighting model.

Which leads to Mix Shaders:
I admit, part of what I like to do with materials involves things like Glass/IoR/Translucency and I’ve already gathered that those are not available today. However, theoretically if UE4 one day gets Glass and Translucent lighting/shading model support, would something like the following be possible (see the Cycles Material Section): http://www.mclelun.com/blog/2014/08/blender3d-cycles-crystal/

The following alludes to the answer being no – in other words, no combining of shading models, you need to make a new model if you need something like this:

Or did I misinterpret the above link and something like this would be possible now?

You can do it with layered materials I believe

Thanks Anadin, I was actually going to mention layered materials in the post but then got confused and thought it best if I didn’t steer the conversation there but now I can be a little more sure :slight_smile:

The two things that confused me were the use of static blend modes vs. a more flexible node-graph to apply the blending/mixing (like the 50/50 slider in the first link I posted). Right now I’ll just have to assume that Standard blend is that 50% mix.

The other is that all docs of layered materials usually mention masking to expose the various materials throughout the model, but for my case I just want all the materials (and their shading models) to apply to the entire mesh in this case. I guess I should just study up on the layer Blend modes and then benchmark the scene of course since the docs warn of extreme performance requirements.

Hmmm sorry I may have got this wrong, are you looking to do something like the page you linked to where you just reduce the translucency via a value?

No problem Anadin. Ultimately it’s really about freely mixing the models. In terms of what UE4 has today, it would be like applying the “Clear Coat” lighting model over top of a “Subsurface” material and getting a proper mix of both models. Now, it’s entirely possible that the effect of using Blender’s Glass+Transluceny models can be done in a completely different matter, which might be true, but I’m just using that example as a nice way of showing what could be possible.

The docs feel outdated in this area in general so it’s hard to understand what’s really possible. For example with “Clear Coat”, the best we get is what was listed in the 4.4 release notes. Namely “The new Clear Coat shading model makes it easier to design materials that have a translucent coating on top. … This can be used for multilayer materials where a translucent layer of film is over the surface of a standard material, either a metal or nonmetal. Specifically it was designed to model this second class of smooth colored films over a non-colored metal.

The bolded part implies that Clear Coat is not freely mixable with other models and is really just a slight extension on top of the default Lit model if I’m interpreting that correctly.

Yup it won’t be. I have not tried using a layered one without masking or polygons and obviously the multiple processing of the pixels will always be expensive.