Preferred input for fake stone shader "scale function"?

Started by N-drju, August 26, 2019, 04:57:13 am

Previous topic - Next topic

N-drju

As in the title.

But let me give you an idea of what I would like to see.

The idea is to have the stone layer differ in scale from place to place in a gentle (smooth) manner. So they are 100% nominal scale in one spot, while almost disappearing in another area.

PF could be used as a guiding mask to determine these regions... But not as a function alone as it terribly glitches out the stones. Even without displacement.

So how would you define a scale function to get this result?

EDIT: I believe the "constant colour" could be used in some way as any of its values would accordingly enlarge or shrink the stones. I'm just not sure how I could "randomize" its influence (because "constant colour" alone is a global effect of course.)
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Tangled-Universe

As far as I know you can't do this yet and the input only accepts numerical input, either through a constant colour constant scalar.

So for now the only way I see is the idea you proposed already, to mix the stone sizes by a mask.

cyphyr

something like this?
www.richardfraser.co.uk
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 3900X @3.79Ghz, 64Gb (TG4 benchmark 6:20)
i7 5930K @3.5Ghz, 32Gb (TG4 benchmark 13.44)

cyphyr

Quote from: N-drju on August 26, 2019, 04:57:13 am...
But not as a function alone as it terribly glitches out the stones. Even without displacement.
...
Ahh do you mean the warping effect the PF has on the stines?
Yeah that's quite odd and I think it's inevitable because each "stone" covers an area that has different scale values in it. One side of the stone is effected by one value of the PF and the other side of the same stone is effected by a different value from the PF. Hence warped stone.
If you made very small stones and had a very large PF you might just not notice the warp ...
www.richardfraser.co.uk
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 3900X @3.79Ghz, 64Gb (TG4 benchmark 6:20)
i7 5930K @3.5Ghz, 32Gb (TG4 benchmark 13.44)

N-drju

I see. Well, my idea was to randomly scale the stones, like you would scale objects... Each stone (area) having a slightly different size, calculated from their nominal value in the "stone scale" parameter.

It is a terrain feature though... so I understand it might not be possible, just like Tangled says it might.

Besides, I'd prefer the size to randomly vary instead of having to define size areas by hand with the use of SSS.
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Dune

So, what if you displace by PF with larger max size than the stone? It would displace stones by the patchiness of the stones, especially after a transform to world shader. You could also mask a surface shader by PF, thus creating random patches and use the offset function to displace the stones' offset, thus blowing them up by this pf.
I have (ages ago) enlarged stones this way by an altitude restriction.

N-drju

Quote from: Dune on August 26, 2019, 10:54:20 amSo, what if you displace by PF with larger max size than the stone? It would displace stones by the patchiness of the stones, especially after a transform to world shader. You could also mask a surface shader by PF, thus creating random patches and use the offset function to displace the stones' offset, thus blowing them up by this pf.
I have (ages ago) enlarged stones this way by an altitude restriction.

I'm afraid I don't quite follow the first idea... I have a screenshot attached. It looks terrible... Unless it is the "scale function" fault. Maybe I should use some other input?

example 1.png
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Tangled-Universe

Quote from: cyphyr on August 26, 2019, 08:45:36 amsomething like this?
Intriguing.
I seem to recall from the release note discussion in the alpha forum that the input only accepted single value inputs.
Your example seems to show that the gradient from the simple shape shader decrease stone size towards the edge, suggesting you can drive this with a more complex input.

This should mean that a PF should work as well, but as you say in your reply below there may be issues with value transitions at fake stone seed positions (as fake stone shader is basically a single octave voronoi noise with seed input).

Dune

I recall that the scale factor works by exponential values or something like that, so it's hard to control. I never use it.

What I meant in my post is not the scale factor but a normal displacement addition into the surface input, or after the stone shader. But it's a bit fickle, and I haven't used it for a while, so am not sure.

N-drju

Quote from: Dune on August 28, 2019, 06:55:25 amI recall that the scale factor works by exponential values or something like that, so it's hard to control. I never use it.

What I meant in my post is not the scale factor but a normal displacement addition into the surface input, or after the stone shader. But it's a bit fickle, and I haven't used it for a while, so am not sure.
Ok, I understand. Well, it does work as a proof of concept. Additional displacement does indeed inflate some stones making the same layer vary in size depending on whites / blacks but... as you can see it also creates a full-bloom of artifacts in the remaining areas. :(
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Dune