Author Topic: Masking Fake Stones with Scale Function  (Read 255 times)

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Masking Fake Stones with Scale Function
« on: November 07, 2018, 04:48:32 AM »
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.
« Last Edit: November 07, 2018, 05:02:43 AM by WASasquatch »
Art can be a window into the soul

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Re: Masking Fake Stones with Scale Function
« Reply #1 on: November 07, 2018, 09:02:57 AM »
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
« Last Edit: November 07, 2018, 09:05:23 AM by WASasquatch »
Art can be a window into the soul

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3392
  • I'm the crazy one
Re: Masking Fake Stones with Scale Function
« Reply #2 on: November 07, 2018, 09: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.
Just because milk is white doesn't mean that clouds are made of milk.

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Re: Masking Fake Stones with Scale Function
« Reply #3 on: November 07, 2018, 08:05:11 PM »
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.
« Last Edit: November 07, 2018, 08:11:04 PM by WASasquatch »
Art can be a window into the soul

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3392
  • I'm the crazy one
Re: Masking Fake Stones with Scale Function
« Reply #4 on: November 07, 2018, 08: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.
Just because milk is white doesn't mean that clouds are made of milk.

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Re: Masking Fake Stones with Scale Function
« Reply #5 on: November 07, 2018, 10:55:18 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.
« Last Edit: November 07, 2018, 10:58:52 PM by WASasquatch »
Art can be a window into the soul

Offline Dune

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 14444
    • www.ulco-art.nl
Re: Masking Fake Stones with Scale Function
« Reply #6 on: November 08, 2018, 05: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.

Offline Hannes

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 4226
Re: Masking Fake Stones with Scale Function
« Reply #7 on: November 09, 2018, 12:37:20 PM »
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.

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3392
  • I'm the crazy one
Re: Masking Fake Stones with Scale Function
« Reply #8 on: November 09, 2018, 01:55:35 PM »
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.

Offline Hannes

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 4226
Re: Masking Fake Stones with Scale Function
« Reply #9 on: November 09, 2018, 02:40:26 PM »
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.

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Re: Masking Fake Stones with Scale Function
« Reply #10 on: November 10, 2018, 12:09:33 AM »
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.
Art can be a window into the soul

 

anything