Title: **Sinus Unwarpable? **

Post by:**WAS** on **November 14, 2018, 03:35:41 pm**

Post by:

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.

Title: **Re: Sinus Unwarpable? **

Post by:**Tangled-Universe** on **November 14, 2018, 03:54:46 pm**

Post by:

Can you post a screenshot?

Title: **Re: Sinus Unwarpable? **

Post by:**WAS** on **November 14, 2018, 03:55:10 pm**

Post by:

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

Title: **Re: Sinus Unwarpable? **

Post by:**Tangled-Universe** on **November 14, 2018, 03:59:46 pm**

Post by:

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.

Title: **Re: Sinus Unwarpable? **

Post by:**WAS** on **November 14, 2018, 03:59:51 pm**

Post by:

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

Just found that out haha

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

Title: **Re: Sinus Unwarpable? **

Post by:**WAS** on **November 14, 2018, 04:07:12 pm**

Post by:

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

Title: **Re: Sinus Unwarpable? **

Post by:**Tangled-Universe** on **November 14, 2018, 04:09:21 pm**

Post by:

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.

Title: **Re: Sinus Unwarpable? **

Post by:**WAS** on **November 14, 2018, 04:13:45 pm**

Post by:

Quote from: Tangled-Universe on November 14, 2018, 04:09:21 pmQuote 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.

Title: **Re: Sinus Unwarpable? **

Post by:**Hetzen** on **November 14, 2018, 04:24:36 pm**

Post by:

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.

Title: **Re: Sinus Unwarpable? **

Post by:**WAS** on **November 14, 2018, 05:45:23 pm**

Post by:

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

Title: **Re: Sinus Unwarpable? **

Post by:**Hetzen** on **November 14, 2018, 06:24:52 pm**

Post by:

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.

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

Title: **Re: Sinus Unwarpable? **

Post by:**WAS** on **November 14, 2018, 06:59:07 pm**

Post by:

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.

Title: **Re: Sinus Unwarpable? **

Post by:**Hetzen** on **November 14, 2018, 07:42:06 pm**

Post by:

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.

Title: **Re: Sinus Unwarpable? **

Post by:**WAS** on **November 14, 2018, 08:12:47 pm**

Post by:

Quote from: Hetzen on November 14, 2018, 07:42:06 pmQuote 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?