Community
Arnold General Rendering Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

layer rgba shader layer order

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
stevencaron
586 Views, 4 Replies

layer rgba shader layer order

I am finally fed up with not understanding the Layer RGBA shader... the docs say it is bottom to top, which I assume means input 8 is the bottom most layer and input 1 is the top layer? In practice, this is how it seems to behave. BUT I am used to input 1 being the bottom layer like in softimage mix 8 colors and 3dsmax composite node. This is where I fail with this node, if I need to add another layer on top of everything.. do I need to shift all my inputs down and then add the new image into the input 1? This seems like a design flaw... tell me I am wrong?

Tags (2)
Labels (2)
4 REPLIES 4
Message 2 of 5
madsd
in reply to: stevencaron

This is not a flaw.
It works exactly like a photoshop document, everything is stacked from the bottom up.

This is why you also build your layers with Arnold Layer node as you would build a photoshop document, start from the bottom, and if you run out of slots, you can cascahde the 8 slot Layer node.

Note, I expanded the OSL composit node to include 10 layers, it works just about the same as the Arnold Layer node. And exact same principle applies, I even labled the bottom slot background.
https://github.com/gkmotu/OSL-Shaders/blob/master/Layers.osl


And yes, the Arnold node gives a number array on inputs that just goes the opposit direction of logic, but that is fine since the slot numbers or names are not important, what is important is that it technically stacks everything from bottom to top.

input6 = Layer 2
input7 = Layer 1
input8 = Background

So start from bottom, so you dont have to shift things around if you need to "insert" something, you can even leave a slot free between all your layers, to give yourself some options for insert slots easily.

Hope that helps.

4588-qwe.jpg

Message 3 of 5
stevencaron
in reply to: stevencaron

Thanks for confirming... I have been adding my first layer into input 8 and building upward. That just isn't intuitive and not what I am used to with other implementations of layer shaders (SItoA, VRay, Clarisse). This is purely an interface/implementation issue, new users aren't going to put their first layer in input 8. The 3dsmax composite node handles this well, layer 1 in the graph UI shows at the top but as you add more layers in the shader GUI it builds upwards.

Message 4 of 5
madsd
in reply to: stevencaron

Right, like the Layers.osl.
I GUESS, as long as you write the text logic as I attempted, there should be no confusion. Nor for beginners. Especially not if they are taught to handle the situation like a photoshop document and disregard anything else.
Granted, the core Arnold node, could potentially be updated to reverse the input slot numbers.

Message 5 of 5
stevencaron
in reply to: madsd

The label metadata your node provides certain helps avoid confusion. I think it might be a good suggestion for the core team to add something like it.

I think the Photoshop analog you provide is an OK example but I think it makes more sense to compare a 3d renderer to another 3d renderer or shader node graph to another shader node graph. Sure, visually Photoshop goes from bottom up but the Background layer isn't the 8th layer you added, it is the first layer added. When you paint a house, the 1st coat is on the bottom next to the wood... its not the 8th coat 😉

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report