merge shader

Started by TheBadger, November 22, 2014, 06:09:37 PM

Previous topic - Next topic

TheBadger

The merge shader wikki page is a bit short. I did look at the file that includes a merge shader in the SSS page.

My problem is I have a terrain that is masked by a sss. a rectangle. But I want a more complex shape. So I thought to try the merge shader. But no mater how I plug the sss into the MS node, my hills in the SSS disappear completely.

Must I have at least 2 nodes plugged in first before the MS node will work, or what? Not sure what I am doing wrong yet.

currently I have one terrain node masked by one sss.

The two nodes are the hills in the background of this image I posted here: http://www.planetside.co.uk/forums/index.php?action=dlattach;topic=19148.0;attach=53513;image
I want to move the hills closer to the camera to make a bit more narrow valley. and reduce the edge of the SSS that forms the hills boundaries. (I have an edge of 468m. in the sss) which makes a smooth transition.

Anyway, what can I do to make this work better than I got it now?

It has been eaten.

TheBadger

This is the simple shape I am trying to make for a start. I feel like its simple to do, but its not completely clear to me.
The part in white is the basic shape I want from the sss and the merge nodes.
[attach=1]
It has been eaten.

Kadri


This is not a real answer you want Michael i know but i use image masks for more complex masks.
It is easier to control it that way for me. And it is just another way to do it if don't have any specific need for a SSS shader of course.

Dune

It is simple.

bobbystahr

Quote from: Dune on November 23, 2014, 03:48:49 AM
It is simple.

This is great..I've needed this times past but never considered the Merge shader as a boolean operator...Thanks Ulco
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Hetzen

#5
Quote from: Dune on November 23, 2014, 03:48:49 AM
It is simple.

It is. But that merge shader masks the simplicity of what really needs to happen here.

I have a larger shape which is white the outside of which is black. 1 to 0.

If I have a smaller shape I want to subtract from a larger shape, then just use a Subtract Scaler function.

1-1 = 0

right?

Clamp 01, so no -ve influence down stream.

This is essentially what Photoshop blend layers are. Derivatives of + - / * of one thing with another.

Something I started to explore last year was using colour  to + - * / what was underneath it, to try and see if I could get some sort of 'wash' effect. Colour building on top rather than replacing. You have to be careful, as things can easily get outside the 0-1 colour range. But it's a nice thing to think that I could describe some sort of feature that had an influence on another with colour.

Kadri

My earlier problem was that i used 4-5 or more intersecting shaders and in the end
using a merge shader build got unneeded confusing for me at least ;)
One merge is not much a problem but when i need more i use image masks basically.

Hetzen

Five shapes you want to add or take away. Add/Subtract Scaler. If you don't want negative results, then clamp. Your shapes are 0 to 1.

Works with everything. SSS, images, fractals...


Dune

Most people are a bit afraid of blue, hence my use of the merge shader, but you're right of course, a lot of blues work fine for all sorts of 'merges'.

j meyer

Quote from: Hetzen on November 23, 2014, 07:05:58 PM

......
Something I started to explore last year was using colour  to + - * / what was underneath it, to try and see if I could get some sort of 'wash' effect. Colour building on top rather than replacing. ......
[/quote]

Have you been successful?
And if so,could you possibly show an example of the effect,please?

Hetzen

I was using it on my road a while back.

Here's the direct link.

http://www.planetside.co.uk/forums/index.php?PHPSESSID=f99d47ae972afb928e5c73f5500ae854&action=dlattach;topic=15786.0;attach=42172;image

and here is a before image to flick between in your browser...

http://www.planetside.co.uk/forums/index.php?PHPSESSID=f99d47ae972afb928e5c73f5500ae854&action=dlattach;topic=15786.0;attach=42160;image

The corelation in my mind, was that later surface disturbances would be lighter in tone if the material is dry.

j meyer

Thanks Jon,nice effect.
Have to try something like that,too. :)

Dune

Can I compare your effect with using a color adjust shader a surface shader down and setting gamma to 1.2 (and a slight color e.g.? That's what I often do anyway to slighly change a color down the way in other parts (being part of the first surface shader's parts (so to speak).

Hetzen

Can do Ulco, although the idea was to expand this a bit more and have different soil types cross the road, yet still give the tyre track and general wear some influence on what's underneath it.

I've done some military scale modelling before and was wandering if I could apply similar techniques.