Sinus Unwarpable?

Started by WAS, November 14, 2018, 03:35:41 pm

Previous topic - Next topic

WAS

November 14, 2018, 03:35:41 pm Last Edit: November 14, 2018, 03:54:56 pm by WASasquatch
Sinus setups seems to be unwarpable both itself and as a mask. Anyway to overcome this? The origin is position form texture, with x converted to scalar.

Tangled-Universe


WAS

Just posted a TGD, TU. :) Kind of a mess trying things.

Tangled-Universe

The fractal you are using as input for the displacement shader (which feeds into the redirect and warp input) has a mask activated, but there's no mask. Uncheck it and it works.

WAS

Well I sure do feel silly. My displacement driver was masked. :P

Quote from: Tangled-Universe on November 14, 2018, 03:59:46 pm
The fractal you are using as input for the displacement shader (which feeds into the redirect and warp input) has a mask activated, but there's no mask. Uncheck it and it works.


Just found that out haha

WAS

Not sure a Sinus will even be really appropriate considering it's hard falloff.

Tangled-Universe

Quote from: WASasquatch on November 14, 2018, 04:07:12 pm
Not sure a Sinus will even be really appropriate considering it's hard falloff.


That's not due to the sinus, that's due to the modulo.

WAS

Quote from: Tangled-Universe on November 14, 2018, 04:09:21 pm
Quote from: WASasquatch on November 14, 2018, 04:07:12 pm
Not sure a Sinus will even be really appropriate considering it's hard falloff.


That's not due to the sinus, that's due to the modulo.


:) Thank you! Much appreciated.

Hetzen

With the Modulo into the Sin node, you need to multiply by 2 x pi to get a full phase out of a range of 0 to 1 ( which is what you've done by dividing the modulo output by its input 2). To just get the positive bump of the sin curve, you don't need the second part of the phase, so just multiply by pi.

WAS

Quote from: Hetzen on November 14, 2018, 04:24:36 pm
With the Modulo into the Sin node, you need to multiply by 2 x pi to get a full phase out of a range of 0 to 1 ( which is what you've done by dividing the modulo output by its input 2). To just get the positive bump of the sin curve, you don't need the second part of the phase, so just multiply by pi.


Thanks Hetzen! I need to remember this.

But to somewhat clarify on your first point you mean multiply the sin node by another multiply, which is 2 x pi?

I'm extremely visual so when I read this in text form I'm literally imagining nodes. >.<

Hetzen

November 14, 2018, 06:24:52 pm #10 Last Edit: November 14, 2018, 06:27:17 pm by Hetzen
modulo - divide by modulo input 2 - multiply pi - Sin

The advantage of doing it this way, is that your modulo input2 will be how wide your sine function is in meters.

WAS

Quote from: Hetzen on November 14, 2018, 06:24:52 pm
modulo - divide by modulo input 2 - multiply pi - Sin

The advantage of doing it this way, is that your modulo input2 will be how wide your sine function is in meters.


Oh, OK, I get it now. This gives you nice tight smooth lines, where as just dividing (no modular) puts some distance between the lines.

Hetzen

Quote from: WASasquatch on November 14, 2018, 06:59:07 pm
Oh, OK, I get it now. This gives you nice tight smooth lines, where as just dividing (no modular) puts some distance between the lines.


Not really. Your gaps you're seeing, are the negative parts of the curve.

What's happening is the sine function will repeat forever if you just feed it say the x from get position, you will get the bump and dip of the curve (-1 to 1) and your pattern will repeat approximately every 6.28 (2 x Pi) meters. You can multiply or divide the get position to expand the wavelength, but it's not a very intuitive way.

Using the modulo is more precise and you can isolate any part of the sine wave, so 2 x Pi gives the full phase of the curve and just x Pi gives you half. 0.5 x Pi a quarter of the curve, and so on.

WAS

Quote from: Hetzen on November 14, 2018, 07:42:06 pm
Quote from: WASasquatch on November 14, 2018, 06:59:07 pm
Oh, OK, I get it now. This gives you nice tight smooth lines, where as just dividing (no modular) puts some distance between the lines.


Not really. Your gaps you're seeing, are the negative parts of the curve.

What's happening is the sine function will repeat forever if you just feed it say the x from get position, you will get the bump and dip of the curve (-1 to 1) and your pattern will repeat approximately every 6.28 (2 x Pi) meters. You can multiply or divide the get position to expand the wavelength, but it's not a very intuitive way.

Using the modulo is more precise and you can isolate any part of the sine wave, so 2 x Pi gives the full phase of the curve and just x Pi gives you half. 0.5 x Pi a quarter of the curve, and so on.


So, calculation wise and logically it's probably best to use a sine instead of a divide on X?