Preserve normalized noise for displacement/functions

Started by WAS, July 20, 2019, 12:27:06 AM

Previous topic - Next topic

WAS

Is this possible? How would one go about it? Displacement shader doesn't read normalized colour, clamping removes it, colour to grayscale removes it.

When it comes to making rock displacement and such, normalized noise could really come in handy. It's a shame it's only in colour shading.

Dune

I've never understood what normalizing does, can anyone explain? Is it calculating a new normal based on the current displacement/vector?

Hetzen

Normalizing a vector will return the direction (in terms of -1 to 1) of a point from the origin. It basically strips out the distance from 0,0,0 and just expresses the heading.

Hetzen

Quote from: WASasquatch on July 20, 2019, 12:27:06 AM
Is this possible? How would one go about it? Displacement shader doesn't read normalized colour, clamping removes it, colour to grayscale removes it.

When it comes to making rock displacement and such, normalized noise could really come in handy. It's a shame it's only in colour shading.

All blue node noise functions are normalised. The PFs use combinations of scales multiplied and added which can make their ranges exceed -1 to 1.

Dune


WAS

#5
Quote from: Hetzen on July 20, 2019, 06:47:31 AM
Quote from: WASasquatch on July 20, 2019, 12:27:06 AM
Is this possible? How would one go about it? Displacement shader doesn't read normalized colour, clamping removes it, colour to grayscale removes it.

When it comes to making rock displacement and such, normalized noise could really come in handy. It's a shame it's only in colour shading.

All blue node noise functions are normalised. The PFs use combinations of scales multiplied and added which can make their ranges exceed -1 to 1.

I think distort by normal colour is a bit different, at least, it's no preserved outside the PF or colour shading anywhere, especially functions. You may have a hard white noise map due to displacement but as soon as you pipe into a function, displacement, etc it only reads the base noise, no augmentation.

Dune

Yes, I stumbled on that one a while ago too, and tinkered about it (and even posted I remember).

WAS

Was there any examinations given in your posts? I wonder why it's not possible to capture the effect.

Dune

I can't remember actually. It was years ago, I think. Might be able to find the thread.

Matt

I didn't understand your terminology at first, but I think we're talking about the "Distort by normal" feature in the Power Fractal Shader. If so, this effect emerges when you apply the shader to a surface with some relief that causes the surface normal to change, as it does on any typical terrain. Passing the shader through other function nodes should be OK. If you want to preview the shader, bear in mind that the shader responds to the context in which it's being previewed. If you preview the shader directly without any terrain input, it would just preview a plane so you won't see the effect. But if you plug it into a shader that is applied to your planetary surface, you can preview it as long as the preview has all your terrain displacements upstream.
Just because milk is white doesn't mean that clouds are made of milk.

WAS

#10
Quote from: Matt on July 21, 2019, 06:36:29 PM
I didn't understand your terminology at first, but I think we're talking about the "Distort by normal" feature in the Power Fractal Shader. If so, this effect emerges when you apply the shader to a surface with some relief that causes the surface normal to change, as it does on any typical terrain. Passing the shader through other function nodes should be OK. If you want to preview the shader, bear in mind that the shader responds to the context in which it's being previewed. If you preview the shader directly without any terrain input, it would just preview a plane so you won't see the effect. But if you plug it into a shader that is applied to your planetary surface, you can preview it as long as the preview has all your terrain displacements upstream.

Hmm from testing, the colour effect isn't applied, even from originating from displacement, or being applied to displacement via the surface shaders (while still originating from displacement such as the terrain fed into the fractals) colour function or using it as a mask, etc.

It also can't be used for displacement which would be the best scenario as it can help produce the best unique noise based on underlying displacement.

Matt

It can if the displacement (or whatever you are trying to mask) is after the Compute Terrain. It just needs normals to have been generated upstream of where it comes into the mainstream.
Just because milk is white doesn't mean that clouds are made of milk.

WAS

#12
Quote from: Matt on July 23, 2019, 05:48:02 AM
It can if the displacement (or whatever you are trying to mask) is after the Compute Terrain. It just needs normals to have been generated upstream of where it comes into the mainstream.

Oh so it can't normalize off of shaders with their own displacement like it does for colouring? I'll give it a shot.

Edit; Hmm, no, it doesn't work in the shader network after Compute Terrain an doesn't work if you use a shader with a compute normal. Disabling Distort to Normal and enabling makes no changes to displacement shader. It uses base noise with no augmentation in both instances. Same for piping that feed into colour functions, which because they strip displacement, don't capture the distorted noise.

Matt

Quote from: WASasquatch on July 23, 2019, 12:24:13 PM
Oh so it can't normalize off of shaders with their own displacement like it does for colouring? I'll give it a shot.

"Normalize" has a very different meaning and shouldn't be used to describe this feature.

I've attached a TGD which shows that "distory by normal" works on a side branch as long as it's used to affect something in the main branch after the Compute Terrain. In this example I'm using it for both colour and displacement effects.
Just because milk is white doesn't mean that clouds are made of milk.

WAS

Quote from: Matt on July 23, 2019, 01:10:24 PM
Quote from: WASasquatch on July 23, 2019, 12:24:13 PM
Oh so it can't normalize off of shaders with their own displacement like it does for colouring? I'll give it a shot.

"Normalize" has a very different meaning and shouldn't be used to describe this feature.

I've attached a TGD which shows that "distory by normal" works on a side branch as long as it's used to affect something in the main branch after the Compute Terrain. In this example I'm using it for both colour and displacement effects.

Ah, so useless for what I want.

Should be able to work with any compute normal/terrain FED into the shaders in question.

Similar to the Contour issue.

Thanks for demonstrating it's use and limitations.