question

Steven Caron avatar image
Steven Caron asked ·

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?

shaderlayer
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Mads Drøschler avatar image
Mads Drøschler answered ·

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.


qwe.jpg (138.0 KiB)
Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Steven Caron avatar image
Steven Caron answered ·

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.

2 comments Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

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.

0 Likes 0 · ·

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 ;)

0 Likes 0 · ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.