Mountain material in cycles

So I know in BI you can do a mountain texture based on light groups, but that is not possible in cycles. Is there any way to get the same snowy on rock effect?

Thanks a ton!

An example of a slope-based shader that is not exactly what you’re looking for, but can be easily changed into what you are looking for.


The main part of this shader is the normal node, you can use it to find the normals that are facing up which would allow you to assign a different shader to it.

http://img836.imageshack.us/img836/6138/33054055.jpg
Link for larger

Thanks Ace! so I got this far using the normal node and a gradient texture, but I am getting some weird behavior. Notice how I am mixing grey and white, but the outcome is solid black and solid white. When I change the grey to be darker, it seems to somehow change the factor value? I have no idea what is going on, it seems like this setup should work.

Thanks a lot!

You might need another color mix node (with the bright/contrast output going into the fac. input) before you feed the stencil into the mix shader input. It might be that since the brightness/contrast node does not clip values to 0-1, your final mix involves values above 1 and below 0.

So that’s where the color mix node comes in, you would use the two color values as a way to keep all values between 0 and 1 so as to not get shading that looks incorrect or bugged.

Thank you! Now it works perfectly! In a little while, this project should show up in the WIP section.

Thanks, I would have never tried that in a million years!

Wow, I just ran into another problem, and I am not sure if it is a bug or I am doing something stupid.
http://img198.imageshack.us/img198/2231/nodes.png

Link to bigger version

What I want to do is have the part that is snowy be smooth, but give the rocks a bump map.

Every time I try to plug that mix node into the other mix node (connected by the yellow line) Blender crashes when either in render view or when rendering. Otherwise it’s OK. I have fooled with it a bit, but I cannot find what is wrong!

Any ideas of what I am doing wrong, or is this a weird bug?

In any case, a crasher would be considered a bug, but it would be difficult to give a good description of it with a setup that complex.

As of now, I’d try breaking down the node setup in another file to see if you can get a simpler example of a setup that crashes to make it easier for the developers, if not, then report the bug along with a simple version of the .blend along with that screen. It’s also probably recommended you un-group the nodes in the bug file so anyone investigating it has a better overview.

Does this setup works for you on CPU? For me it crashes immediately i switch to GPU mode and works on CPU, which is usually case when i have too much textures going into - out of memory thing. Cycles just crash then without any warning, like it does now. You have 6 texture slots and two normal blocks calculated here. I wonder if that’s being held and calculated in GPU memory.