Page 1 of 3

Why no layered materials?

Posted: Wed Jan 14, 2015 5:43 am
by itsallgoode9
I'm wondering if I can get some feedback as to why there is no layered material system in Octane. Is this some sort of technical limitation of GPU rendering? Has there not been enough requests? Is this planned to be added eventually? what's the story?

I create lots of bottle labels which have multiple finishes on each label (matte paper, glossy paper, satin text/images, metallic text/images ect) ,and the mix material node is very messy, convoluted and inefficient way to achieve this. Sometimes I end up with 4 or 5 mix material nodes to create all of these layers. It becomes a pain to go through the material graph and see which mix material node affects which material finish. Why can we not route all of the materials into a single layered material node, having that layered material node reference each material's individual alpha map?

Maxwell render started out with a system similar to octane's method but eventually switched to a layered method and I have seen nothing but praise and thanks once they switched over. I think the mix material node has its uses and should not be abandoned but I think there is a definite need for a layered material system as the main way to create materials.


here's an example using a liquor bottle label as an example:

Proposed Layered Material:
Image

Current Mix Material:
Image

Re: Why no layered materials?

Posted: Wed Jan 14, 2015 8:13 am
by gordonrobb
So what's the real difference? Is it just like the mix node, but being able to mix more than 2?

Re: Why no layered materials?

Posted: Wed Jan 14, 2015 8:28 am
by itsallgoode9
to some extent, you are correct. functionality wise, think of it literally as using layers and alpha masks in photoshop.

in my liquor label example, you have the base layer as the paper, you add a new foil material on top of that with the foil text masked out, etc., exactlly like you would in photoshopshop using layers and masks. using the current mix material method you end up piping mixed materials into mixed materials only allowing 2 materials combined at a time. it gets a bit cumbersome to track down the correct mix material to make an adjustment to a mask. in the layered material, each material would have it's opacity mask applied directly to the material.

if you have 6 materials you need combined opaquely, using the mix material method it would take a minimum of 5 mixed material nodes to make this work, and you really have to think about what materials you combine when and how to correctly create your masks to make the final material correct since each mask affects TWO materials at a time. . in the layered material, it would eliminate 4 of those additional mixed materials and making the combining much more simple.

Re: Why no layered materials?

Posted: Wed Jan 14, 2015 9:37 am
by profbetis
I brought this up in a top a little bit ago (http://render.otoy.com/forum/viewtopic.php?f=9&t=43365). Nice to see some more support for it though. Especially with the voting section up top.
Edit: It looks like you were the first one to reply in that topic :D

Re: Why no layered materials?

Posted: Wed Jan 14, 2015 2:57 pm
by gordonrobb
You could create a material that has nested mix nodes inside it, and inputs that are materials and masks. Not sure how you would do that in standalone, but I think it'll be possible in Lightwave plugin. That way you could create a node that has say 4 material and mask inputs.

Re: Why no layered materials?

Posted: Wed Jan 14, 2015 6:42 pm
by itsallgoode9
gordonrobb wrote:You could create a material that has nested mix nodes inside it, and inputs that are materials and masks. Not sure how you would do that in standalone, but I think it'll be possible in Lightwave plugin. That way you could create a node that has say 4 material and mask inputs.
yeah, it's a work around but that sounds like a lightwave specific solution and it doesn't address simplifying the mix materials work. I work in maya and I know there's no way to do your solution outside of writing some custom code.

Re: Why no layered materials?

Posted: Wed Jan 14, 2015 7:12 pm
by grimm
My concern with this is that it will slow Octane down, especially when this kind of layer system really belongs in your 3d package you are texturing with. I texture with 3D-Coat and it has a layering system which does all this. Then when I'm finished 3D-Coat will merge all of the layers into individual diffuse, specular, etc. images. This also saves vram for other images or mesh. I guess I'm not seeing the advantage for Octane to have this?

Re: Why no layered materials?

Posted: Wed Jan 14, 2015 7:27 pm
by itsallgoode9
grimm wrote:My concern with this is that it will slow Octane down, especially when this kind of layer system really belongs in your 3d package you are texturing with. I texture with 3D-Coat and it has a layering system which does all this. Then when I'm finished 3D-Coat will merge all of the layers into individual diffuse, specular, etc. images. This also saves vram for other images or mesh. I guess I'm not seeing the advantage for Octane to have this?

Not sure how it would slow down Octane because using a layered method actually reduces the amount of nodes needed. You mention that a layering system belongs in the 3d package you're texturing with....i'm not sure what you consider octane but I use octane to create my materials. Octane IS the 3d package.

Not meant to sound harsh but it just sounds like your aren't familiar with this type of workflow or don't have the need for it so you aren't seeing its advantages? We aren't talking about baking out simple diffuse, spec, etc maps for use in one material. We're talking about this method for material creation, not texture creation (although it would be very useful for that as well if they created a layered texture node too).



Here's an example:
If I were rendering this using the layered material, I would split this into a minimum of 5 materials. Yes you can do this using the current mix material node but it is way more complicated and confusing than it needs to be. From what it sounds like you're saying is that you could create this label using one material? I mean, that might be able to be done but you'd have to create extremely complicated roughness, spec and bump maps to achieve this. And once they are created, it would not be very friendly to make updates once you see they don't work perfect. In the layered method you would just create a solid black and white mask for each layer of material so that way each material can be adjusted independently of the others.

1. Paper Background
2. Gold Foil
3. Black glossy text
4. Red Glossy Text
5. Tan Glossy decorative graphics

Image

Re: Why no layered materials?

Posted: Wed Jan 14, 2015 9:42 pm
by gordonrobb
Yes

Possibly a LW thing. I knocked something up to show you what I mean. Haven't thought through the right order or anything but should show the point.

This is what the Material inputs would look like (alhtough they would have their own textures image inputs etc.
materials.png
And this is what it looks like inside the compound node.
Compound Node.png
Hopefully that all makes sense.

Re: Why no layered materials?

Posted: Wed Jan 14, 2015 10:05 pm
by grimm
No problem. :D The problem comes about when Octane needs to combine the layers into usable textures. This is extra logic that the CUDA kernel needs to deal with, that slows things down. Then because the layers are separate, they take up more memory than a combined image. I suppose that you could do the layer blend before the render fires off, that would save vram. But this still slows down the initial render setup.

It may sound easy to do layers, but programming wise, this is a fairly complex thing to do. I can see the advantage of being able to tweak the layers in Octane, but it would be a big project.