Masking Fake Stones with Scale Function

Started by WAS, November 07, 2018, 12:48:32 AM

Previous topic - Next topic

WAS

When you setup beautiful fake stones with the Scale Function to have a nice mix of some smaller and larger stones that aren't too stretched works fine, but once you apply a mask to the surface layer that controls your fake stones, the Scale Function seems to go on the fritz and create stretched rocks, and there is no way to balance the issue from lowering roughness of the mask to zero, planing with clamped and unclamped colours, negatives or offsets, or adjusting the Scale Function after masking. Sorry for resolution, this was a "full scene" render that took awhile just to find these little slithering rocks.

:\ Unfortunate.


Edit: Actually it seems these are appearing randomly with different seeds despite the preview not showing any at higher altitudes. No mask.

WAS

#1
I'm wondering if this feature is working correctly or if I'm just not using it right at all.

What I did it start off with a Perlin 3D Noise, and apply a Smooth Step Scalar, and played with negative and postive values, such as -8 and 0.5 for example which I thought was nice. I even went extreme with a pure white smooth stepped scalar at  -15, 1 or 0.5, and by the 2D preview, there will be no changed enabled, or disabled, but when I render, again, some rows of stretched rocks.

But I keep finding creeping stretched stones in rows like when you apply hard scalar noise to the scale function.

I'm also wondering if the scale function is really an appropriate name considering it act's like a noise-fed warper, even being able to obtain similar effects as using a Warp Shader

Matt

The scale function needs to have a constant value. It scales the texture space, so if you have variations in the scale it will cause warping. It is a convenience feature for globally changing the scale of many shaders at the same time, but it needs to be used carefully.
Just because milk is white doesn't mean that clouds are made of milk.

WAS

#3
Quote from: Matt on November 07, 2018, 05:58:35 AM
The scale function needs to have a constant value. It scales the texture space, so if you have variations in the scale it will cause warping. It is a convenience feature for globally changing the scale of many shaders at the same time, but it needs to be used carefully.

Oh I see. So strange we'd have this feature for some stones and not many other things that seem of more prominence such as location inputs.

Unfortunate too, because it seems like a feature to actually create scale variation; Scale "Function". Being a constant, it should just be the "Scale Scalar" or "Scale Input". The Functionality part inherently implies a serious level of control, not a constant "function" which really isn't a function but a constant value, just in the functions menu. Considering the names of other inputs "Modulator" etc, it lead me to assume a definition of function, not the shaders location in menus.

And it sad because in the 2D preview with extremely soft scalar with negative black values, you get beautifully scaled stones of large and small from a single Fake Stone Shader, it's just in the final render it doesn't match the 2D and some of the stones get stretched.

Trying to find some sort of balance if I can because that really seems like where the feature should be going considering the hassles of actually mixing many stones and working with their scales, whether by a scalar or not.

I also guess you could assume these are flat stones on their sides, and probably what anyone that doesn't know what going on would assume, but as the author it's an immediate "What?" lol

All the stones in this preview are using a 3D Perlin Noise to scale their sizes. Works great except the random anomalies in stretching, and really seems like it should be the feature Scale Function implies.

Matt

Naming these features is always a struggle for me, but I see what you mean.

Despite what I wrote, technically there are ways to vary the scale function in practical ways, but it's difficult to set up. For example, if you have a function (it could be an image map) that has areas of constant value, each area could have a different value as long as you use a mask to hide the places where the value changes.
Just because milk is white doesn't mean that clouds are made of milk.

WAS

#5
Quote from: Matt on November 07, 2018, 04:54:04 PM
Naming these features is always a struggle for me, but I see what you mean.

Despite what I wrote, technically there are ways to vary the scale function in practical ways, but it's difficult to set up. For example, if you have a function (it could be an image map) that has areas of constant value, each area could have a different value as long as you use a mask to hide the places where the value changes.

Oh that's a great idea, Matt thank you. I can imagine how that would be setup. Could go further with RGB maps like Ulco does and others do. Thank you.

Also I do notice a couple of the random elonged stones are just from the initial voronoi noise that you can see by just creating some voronoi diff scalar where there are some tiny elongated voronoi shapes occasionally. They almost seem like the corner of a voronoi shape being cut off by another.

Dune

I've always struggled with the scale function, but I don't think some stretched stones are that bad, as along as they don't stretch unnaturally. In nature one finds flintlike stones as well.

Hannes

Quote from: Dune on November 08, 2018, 01:04:46 AM
I've always struggled with the scale function, but I don't think some stretched stones are that bad, as along as they don't stretch unnaturally. In nature one finds flintlike stones as well.

That's exactly what I thought, when I saw your last image, Jordan. Makes it look even more natural.

Matt

They might look OK close to the origin, but they become more of a problem as you get further afield. Scaling is done by scaling the texture space, and the scaling is centred on the origin. A change of 10% at 5 metres from origin will distort features by up to 0.5 metres, but at 5 Km it will distort by up to 500m. You will really notice that.

However, you can avoid this by transforming the whole setup to where the camera is.
Just because milk is white doesn't mean that clouds are made of milk.

Hannes

Quote from: Matt on November 09, 2018, 09:55:35 AM
However, you can avoid this by transforming the whole setup to where the camera is.

Exactly this is incredibly difficult as long as there is no grouping/linking feature in TG.

WAS

Apparently, I'm just a little too OCD when it comes to critiquing my own stuff. When you know where it comes from, and is not intended, I guess you might have a bias to it.

Thanks for the input guys.