## Pinch/expand on altitude function

Started by WAS, January 01, 2019, 04:45:19 pm

#### WAS

##### January 01, 2019, 04:45:19 pmLast Edit: January 01, 2019, 04:47:14 pm by WASasquatch
I have been trying to figure out how I could take a noise and expand/contract it on X/Z by a transition through altitude?  I have tried to translate a few ideas from past projects of mine in other languages but I can never seem to Port to functions. I mean. I did figure out how to NOT to what I want by leaps and bounds.

It's no wonder though. I scored 21 (technically average but  I guessed on every answer  on only picked the most related) on Elementary Algebra on my accuplacer for college. I have to take Pre-Algebra. Heh. Least I placed well into college for reading/writing. In general it showed me my math problem is degenerative. Wasn't this bad last time round in community college.

#### Dune

##### January 02, 2019, 02:57:06 am #1
You'd need a 'transform shader by function', something I've requested a few years ago, but I guess it's pretty hard to implement. Could be possible in blue nodes, as there's one that stretches noise from 0/0/0.

#### WAS

##### January 04, 2019, 01:46:25 am #2
Quote from: Dune on January 02, 2019, 02:57:06 am
You'd need a 'transform shader by function', something I've requested a few years ago, but I guess it's pretty hard to implement. Could be possible in blue nodes, as there's one that stretches noise from 0/0/0.

Yeah I've tried a few ways from math formulas online and my own code but couldn't implement.

#### Matt

##### January 04, 2019, 07:14:33 am #3
Quote from: Dune on January 02, 2019, 02:57:06 am
You'd need a 'transform shader by function', something I've requested a few years ago, but I guess it's pretty hard to implement. Could be possible in blue nodes, as there's one that stretches noise from 0/0/0.

"Transform shader by function" can be implemented using a Vector Displacement Shader and a Warp Input Shader. Vector Displacement Shader converts a function into a displacement, and Warp Input Shader converts a displacement into a transform.
Just because milk is white doesn't mean that clouds are made of milk.

#### Dune

##### January 04, 2019, 08:02:22 am #4
Thanks Matt! I miss your impeccable logical insight

#### WAS

##### January 04, 2019, 05:59:24 pm #5
Quote from: Matt on January 04, 2019, 07:14:33 am
Quote from: Dune on January 02, 2019, 02:57:06 am
You'd need a 'transform shader by function', something I've requested a few years ago, but I guess it's pretty hard to implement. Could be possible in blue nodes, as there's one that stretches noise from 0/0/0.

"Transform shader by function" can be implemented using a Vector Displacement Shader and a Warp Input Shader. Vector Displacement Shader converts a function into a displacement, and Warp Input Shader converts a displacement into a transform.

Hmm. Thank you. With that logic I wonder I can achieve what I want via positive/negative displacement and warping.

#### WAS

##### January 09, 2019, 10:13:21 pm #6
How could I make the vector displacement actually displace 360 outwarts/inwards without going a single direction?

#### Dune

##### January 10, 2019, 02:20:49 am #7
It's the clamping of the color in this case, I suppose. Did you try a distance shader pointing up with unclamped whites/blacks?

#### WAS

##### January 11, 2019, 04:59:55 pm #8 Last Edit: January 11, 2019, 05:02:01 pm by WASasquatch
Quote from: Dune on January 10, 2019, 02:20:49 am
It's the clamping of the color in this case, I suppose. Did you try a distance shader pointing up with unclamped whites/blacks?

Hmm I did not. I used a SSS shape to mask the cloud noise (unclamped noise) and than tried to warp it with a constant fed into a vector displacement. I'd expect from 0,0,0 I'd get a X,Z expansion in 360 degrees.

The warping is than also limited by altitude to create it's "boundary" (which is where the curve comes from)

Here is a iteration from that first attempt.

#### Dune

##### January 12, 2019, 04:19:51 am #9
I'll have a go at this....

#### WAS

##### January 12, 2019, 10:15:21 pm #10
Would love to see what your mind comes up with. I realized this morning doing more tests my setup was not at 0,0,0 but that really isn't the key.

#### Dune

##### January 13, 2019, 02:01:20 am #11
I've tried using very soft (200% bevel) simple shape circles at various heights and rotations to warp, and that can give interesting effects. Nothing to show yet, though.

#### Dune

##### January 14, 2019, 12:07:48 pm #12
Not a perfect solution (and the cloud sucks), but maybe some ideas to play with...

#### WAS

##### January 16, 2019, 01:33:44 pm #13
Quote from: Dune on January 14, 2019, 12:07:48 pm
Not a perfect solution (and the cloud sucks), but maybe some ideas to play with...

Thank you, going to give it a look! Any new ideas are much appreciated.