Layer List Shaders
When I create (say) a tree, it comes with a Layers List shader, with a whole bunch of nested sub-shaders that are applied to leaves, branches, trunk etc (see top image). I can set up the individual shaders within that shader tree, and everything is hunky dory.
So I thought I'd try and create my own. I created an object (a park bench - image 2). It has 2 shading domains, one for the seat and one for the support. I created the Layer List shader and added my two multtichannel shaders to it, but how do I get the layer values into the layers list - my drop downs are empty, and as usual the manual is no help! I've assigned the shader to the object, but I can't se a way of assigning the object to the shader...
Thx :)
Comments
I am sure there is a better way than I am about to suggest. Here is what I did.
- modeled a quick bench with separate shading domains for the wooden planks and the metal legs and frame.
- Used layer list
- First layer is a basic multichannel with just simple color red. (so far, whole object will look red).
- Second layer is a basic multichannel with just simple color blue. Blue will be applied wherever the opacity mask is set to white, and not at all where opacity mask is black. (can mix as well).
- For opacity mask of the blue layer, chose projection mapping, flat mapping, then clicked the box for the whole object. Projection mapping has a drop down menu for where to apply the mask to. I chose the wood planks. So the legs remain red and the wood planks are blue. You can make the channels for red and blue as complex as you would like.
The key for this method is the opacity mask. Choose projection and use the dropdown menu to pick the shading domain. Set the color of the opacity mask to white.
EDIT: I should say that I chose projection : flat mapping and then clicked the 6-sided box.
You need to set it at the level of the parametric shader for each layer - it won't let you change it at the top level. My screenshot shows a basic layer, but it's the same with the parametric one. I have no idea why the dropdowns only populate at the lower levels, just one of Carrara's delightful quirks.
In vertex modeler, under the "model" tab there is a box called shading domain.
after selecting the vertices for the boards, go to the shading domain and create a new domain...name it boards or whatever...
then
select the vertices that are the frame, go to the shading domain and create a new domain...name it frame
now you will have the dropdowns available for your boards & yor frame and it will all work properly.
Interesting - I was about to post that they will still not appear in the top level because it didn't work for TangoAlpha and has not worked for me in the past, but your certainty made me try it again and suddenly it works. Now I have no idea why it didn't work for TangoAlpha above. He said he has more than one shading domain set up on the object, but if you look at his first screenshot, the drop-down is not populated with the names of the shading domains he created.
My problem was that the dropdowns were not populated at any level, so there was no way to assign a shader to the domain. After a night's sleep, I opened the project this morning, and all the dropdowns were now populated. AT EVERY LEVEL!
So the solution it seems, is save and reopen the project. Maybe this is a Mac issue?
I've tried building one of these shaders several times in the past, but because the list boxes didn't populate, I just threw it away and went back to the old staple of creating separate master shaders. This was the first time I saved it, shut down Carrara and reopened it later.
Anyhow, thanks guys, MDO2010, McGuiver, Diomede
the object with the layers must be selected in the preview window for the layers to show up. There is a drop-down list in the top left corner of the preview window if it is showing a plane or globe instead.
Interesting. Good tip!
Seems to do the trick - thanks :)
And here's the bench rendered with the layers list shader applied. Still needs a bit of work on the texture maps, but it's coming along...
Looks really good )
Agreed. Very nice job. ;)