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.
Check out my Terragen Discord: https://discord.gg/Vy5FRTE

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

July 20, 2019, 12:50:13 pm #5 Last Edit: July 20, 2019, 01:08:21 pm by WASasquatch
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.
Check out my Terragen Discord: https://discord.gg/Vy5FRTE

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.
Check out my Terragen Discord: https://discord.gg/Vy5FRTE

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

July 21, 2019, 08:51:26 pm #10 Last Edit: July 21, 2019, 09:57:37 pm by WASasquatch
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.
Check out my Terragen Discord: https://discord.gg/Vy5FRTE

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

July 23, 2019, 12:24:13 pm #12 Last Edit: July 23, 2019, 12:29:07 pm by WASasquatch
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.
Check out my Terragen Discord: https://discord.gg/Vy5FRTE

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.
Check out my Terragen Discord: https://discord.gg/Vy5FRTE