Simple Shape Shader Clamped

Started by WAS, December 22, 2019, 02:43:52 PM

Previous topic - Next topic

WAS

Is it possible to get the Simple Shape Shader to have the ability to use a unclamped floor? So you could backup the blackpoint right to the edge of the SSS zone without turning the BG gray/white and ruining masking. Sometimes with further alterations we can't use the white point without getting hard solid whites in noises/masks where you want smoothness.

Perhaps the calculation between the clamped 0 and whatever input you have for colour is part of the continuity issue with hard falloffs. Even going to 200 percent can't get a clean gradient falloff, and then your center (or point of origin) is no longer 1.

Dune

Might be handy indeed. But did you try using the bias and gain nodes?

Matt

1. If the Simple Shape Shader uses a linear falloff (i.e. Edge Profile = "Bevel"), changing the blackpoint is equivalent to changing the size of the shape. A negative blackpoint on an unclamped input would give the same result as a larger shape. So the way to do this is to enlarge the shape so that you don't need a negative blackpoint.

I realise that the reason you're trying it this way is to get a falloff that's more to your liking, but an "unclamped" version of the simple shape shader won't make any helpful difference to the math, for the above reason.

2. If the Simple Shape Shader uses Edge Profile = Smooth Step, this is clamped by definition. The gradient becomes 0 at the edge so there isn't a clear definition of what an unclamped version of Smooth Step would be.

3. The other edge profiles have similar limitations.

I recommend enlarging the shape to encompass an area large than you need, perhaps using Smooth Step mode, and then experiment further with Bias and Gain nodes as Ulco suggests. And reducing Gamma in the Colour Adjust Shader is often useful for me.
Just because milk is white doesn't mean that clouds are made of milk.

WAS

#3
I don't think that's the case Matt... or maybe misunderstood the need. Shape is a defined radius... So if I backed up the Blackpoint it would only lighten to the border of the shape leaving bg hard black or negative.

You can see this happening in the screenshot or do it yourself. The issue is the BG lightens cause it is clamped and thus becomes a infinite part of the shape by lightening...... If it was unclamped backing up black point would only effect to the edge of the shape just like it is now, except not effecting BG.

I did try bias and gain but because of the terrible gradient calculation you can't have it both ways and a smooth gradient from 1 to 0. It's falloff isn't a smooth linear progression and similar to low channel gradient in PS the way it transitions tones (minus banding lines).

This is also not really about smooth ends of the gradient, but the simple fact you cannot do blackpoint adjustments to SSS for simple fact the BG is clamped (which realistically shouldn't be a part of the shape, similar to making one out of blue nodes and having a unclamped shape)

Hetzen

I'm not really understanding the problem. You can make your floor any value.

Capture.JPG

WAS

That's the edge... disable it, or zoom out. That won't work as a mask. Lol You'd have to add more simple shapes, surface layers, and when already using several just adds complexity. The problem can be solved at the root.

WAS

#6
OH wait, I didn't see your inpuit. That's great. Which also just means it's entirely possible and why isn't a part of the shader's default floor/bg,.

Floor could just be a slider to set the default values.

Hetzen

I'd have thought, if the Edge Colour is spatially infinite outside of the Simple Shapes bounds, then you run into problems with adding other Simple Shapes.

WAS

#8
Quote from: Hetzen on December 23, 2019, 02:32:50 PMI'd have thought, if the Edge Colour is spatially infinite outside of the Simple Shapes bounds, then you run into problems with adding other Simple Shapes.
Entirely depends on the scenario. In fact most times I use this I need overlapping shapes. I have in fact NEVER used the edge. It usually interferes with shapes and blending. In any case nothing would change if you had a input. I'm talking default floor.

You simply cannot back up the black point, apparently without a input. Which contrary to Matt's post makes it obviously possible and should probably be default behavior to just be able unclamp or have a slider for the floor.

Additionally, unclamped PFs can pileup just fine. In fact when making masks, it's usually best as you actually get a "1" for white and not a soft gray version of white which actually impacts mask intensity. Sometimes unlcamped masking can have weird effects if the levels are too out of range, but you usually get harder masks.

Matt

#9
I thought you wanted a smooth ramp from 0 to 1. But maybe I don't understand what you're trying to do. Are you saying that you want the outside areas to remain black but increase the value at the edge, e.g. 0.3? This would create a hard jump from black to 0.3. Is that what you want?

If you you want a smooth ramp but you want to expand the area, I would just enlarge the dimensions of the shape.

The only interpolation mode that could be left unclamped is "Bevel", but it's clamped for consistency with the other modes. It shouldn't be a problem in practice because there are other ways to achieve the same result as an unclamped version.
Just because milk is white doesn't mean that clouds are made of milk.

WAS

Quote from: Matt on December 23, 2019, 07:07:28 PMI thought you wanted a smooth ramp from 0 to 1. But maybe I don't understand what you're trying to do. Are you saying that you want the outside areas to remain black but increase the value at the edge, e.g. 0.3? This would create a hard jump from black to 0.3. Is that what you want?

If you you want a smooth ramp but you want to expand the area, I would just enlarge the dimensions of the shape.

The only interpolation mode that could be left unclamped is "Bevel", but it's clamped for consistency with the other modes. It shouldn't be a problem in practice because there are other ways to achieve the same result as an unclamped version.

To try to save on shaders. I often try to use as few shapes as possible and just alter them, ramping up and down for different isolation within the shape. This usually involves just the white point, but sometimes I need that soft border to be hard, which if you don't want to actually brighten the white point from center, you need to use the black point.

I'm not sure why adding such a simple switch functionality (from default to main input) is such a bad idea to give the shader more flexibility without further input, such as a constant colour floor input. I actually forgot I could even do that.

And I don't know what is so confusing... you have included a Colour Adjust Shader in Terragen, which is designed to work with white point and black point levels (similar to photoshop). This allows you to control the black point (not white) or the white point (not black). It would be nice to do this on the simple shapes out of the box without the need for a main input. Changing the shape dimensions is not a fix, and would change the entire shader setup and other colour adjusts, etc, and leave me with the same problem at the end, at a different dimension.

The problem is I simply cannot control the black point to the border of the radius without a main input to change the default clamped floor.

Dune

That's exactly what I did; add a minus constant before the masks (I think I even wrote it down).