## Preserve normalized noise for displacement/functions

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

#### WAS

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

#### Dune

##### July 20, 2019, 02:02:38 am #1
I've never understood what normalizing does, can anyone explain? Is it calculating a new normal based on the current displacement/vector?

#### Hetzen

##### July 20, 2019, 06:43:17 am #2
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

##### July 20, 2019, 06:47:31 am #3
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

##### July 20, 2019, 08:40:01 am #4
Thanks for chiming in, Jon. Good to know that.

#### 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

##### July 21, 2019, 01:42:17 am #6
Yes, I stumbled on that one a while ago too, and tinkered about it (and even posted I remember).

#### WAS

##### July 21, 2019, 02:32:59 am #7
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

##### July 21, 2019, 05:18:33 am #8
I can't remember actually. It was years ago, I think. Might be able to find the thread.

#### Matt

##### July 21, 2019, 06:36:29 pm #9
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

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

##### July 23, 2019, 05:48:02 am #11
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

##### July 23, 2019, 01:10:24 pm #13
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

##### July 23, 2019, 01:35:08 pm #14
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