Blend Shader Question

Started by gregtee, February 18, 2013, 04:36:11 PM

Previous topic - Next topic

FrankB

Quote from: gregtee on February 20, 2013, 03:32:26 AM
Ok, I think I figured this out using a different technique.  I'll post a pick of what I did later but what id like to know now is how does one layer up displacemts on fake stones?  I put a voronoi displacer into the fake stone shader input which gave a nice look.  Now I want to continue to add more displacemts on top of that. 

What's the best way?

Thanks again

Greg

I found it's generally best to compose all desired displacements in color space first, then run the result through a single displacement shader.


Tangled-Universe

Colour space gives you a bit more control and more expected results, so that's a good option indeed.
It's easier to build a noise function when you know that what you see in the preview is all in 0-1 colour range.

What I mostly try to do is first use a powerfractal which has feature size rougly 1/3 to 1/2 the size of the fake stone you're displacing.
Set the displacement factor similar or a bit smaller to the feature size.
Use 6-8 noise octaves (this means adjust smallest scale accordingly).

Then duplicate the fractal, change the seed and divide scale settings by 3 or 4. Do the same for the displacement factor.
Repeat this so you have a 3rd fractal.

The advantage over working in colour space exclusively is that you can apply colour along with the displacement which will perfectly match the displaced geometry.
The disadvantage here is that controlling the displacement spikes can be a bit tricky.

Matt

#17
Quote from: gregtee on February 20, 2013, 03:32:26 AM
Ok, I think I figured this out using a different technique.  I'll post a pick of what I did later but what id like to know now is how does one layer up displacemts on fake stones?  I put a voronoi displacer into the fake stone shader input which gave a nice look.  Now I want to continue to add more displacemts on top of that. 

What's the best way?

You can chain your displacement shaders one after another in the usual way - through the "input node" plug on each shader - and then the last node plugs into the fake stones shader input.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

FrankB

Quote from: Tangled-Universe on February 20, 2013, 04:02:53 AM
...
The disadvantage here is that controlling the displacement spikes can be a bit tricky.

I found this to be the opposite. I get spikes often when combining displacement. When I compose it in color space, I have so many options on how I want one pattern to mix with another. Often I can simply add color, or multiply it. Or a combination, or merge color in ever so slightly... which usually saves me from having to deal with spikes. But perhaps it depends on the situation.

Tangled-Universe

Hmmm...we have different experience then, although I reckon I sometimes run into the issues you describe.
As I said it's true that working colour space exclusively that these problems can be avoided more easily.

What works for me is to examine what each PF does 1 by 1 and then start adding them up in the way Matt explained.
The displacement roughness and spike limit are useful for limiting weird spikes and controlling the "opacity" of the displacement.

cyphyr

If your deriving displacement from colour values then taking the Colour roughness in the colour tab down to 1 or lower helps with unruly spikes. Also of course Displacement roughness and spike limit.
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Tangled-Universe

Quote from: cyphyr on February 20, 2013, 06:05:59 AM
If your deriving displacement from colour values then taking the Colour roughness in the colour tab down to 1 or lower helps with unruly spikes. Also of course Displacement roughness and spike limit.
Richard

Yes you're right about the colour roughness (this skews the fractal towards the smallest scale).

However, displacement roughness and spike limit only apply when displacing using a PF.

If you displace using colour-space then you displace using a displacement shader (input port on shaders) which does not offer roughness or spike limit parameters. The substitute of these parameters in colour-space are PF high/low colour + contrast/offset/roughness.

When you displace with a PF the colour settings of that PF do not influence the displacement.
The colour will only match the displacement and you can only control the colour appearance using the high/low colour + contrast/offset/roughness.

gregtee

Great thread so far. 

Another question. I see that there are Boolean operators available.  Can these be used to cut out geo from fake stones using fractals as the negative space?  It seems one could make some interesting volcanic type formations of this was possible. 

Basically what I'm trying to do is create a coral reef.  I've found a lot of great reference on line and as always, god is in the details.  Many of these underwater formations were formed from god knows how long it took for stuff to build up and layer itself over and over on top of older growth and over time it starts to look very craggily and rugged with lots of interesting outcroppings and holes all over the place.

I've got something that's a good base but its far from realistic at this point, but it occurred to me that what I needed in addition to more detailed displacemts was some negative space cut into the rock formations. Can the Booleans do this?

Thanks again, very helpful thread.

Greg

Supervisor, Computer Graphics
D I G I T A L  D O M A I N

Tangled-Universe

Basically the answer is 'no'. You can't boolean cut the way you propose it. TG's surfaces aren't volumetric in the sense that you could cut away a volume with fractals.
The planet object is a hollow sphere of which you push and pull the surfaces with displacements.

There are probably ways to fake/mimic the effect you're looking for, so a more precise description and example of what you want would be helpful.

FrankB

but you can displace inwards, which, depending on the use case and the execution, can look like a cut :)

Tangled-Universe

Quote from: FrankB on February 20, 2013, 11:33:45 AM
but you can displace inwards, which, depending on the use case and the execution, can look like a cut :)

Yup, not a 'but', but an example of faking/mimicing it :P

Oshyan

"Boolean" in this case means in the logic sense, not the modern 3D geometric sense, i.e. true/false: http://en.wikipedia.org/wiki/Boolean
Terragen does not currently support boolean geometry operations, e.g. add, subtract.

- Oshyan