Author Topic: Sinus Unwarpable?  (Read 222 times)

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Sinus Unwarpable?
« on: November 14, 2018, 07:35:41 PM »
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.
« Last Edit: November 14, 2018, 07:54:56 PM by WASasquatch »
Art can be a window into the soul

Offline Tangled-Universe

  • Terrevangelist
  • *
  • Posts: 6183
    • CGScenery.com - Terragen Tutorials!
Re: Sinus Unwarpable?
« Reply #1 on: November 14, 2018, 07:54:46 PM »
Can you post a screenshot?

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Re: Sinus Unwarpable?
« Reply #2 on: November 14, 2018, 07:55:10 PM »
Just posted a TGD, TU. :) Kind of a mess trying things.
Art can be a window into the soul

Offline Tangled-Universe

  • Terrevangelist
  • *
  • Posts: 6183
    • CGScenery.com - Terragen Tutorials!
Re: Sinus Unwarpable?
« Reply #3 on: November 14, 2018, 07: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.

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Re: Sinus Unwarpable?
« Reply #4 on: November 14, 2018, 07:59:51 PM »
Well I sure do feel silly. My displacement driver was masked. :P

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
Art can be a window into the soul

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Re: Sinus Unwarpable?
« Reply #5 on: November 14, 2018, 08:07:12 PM »
Not sure a Sinus will even be really appropriate considering it's hard falloff.
Art can be a window into the soul

Offline Tangled-Universe

  • Terrevangelist
  • *
  • Posts: 6183
    • CGScenery.com - Terragen Tutorials!
Re: Sinus Unwarpable?
« Reply #6 on: November 14, 2018, 08:09:21 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.

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Re: Sinus Unwarpable?
« Reply #7 on: November 14, 2018, 08:13:45 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.
Art can be a window into the soul

Offline Hetzen

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 1646
Re: Sinus Unwarpable?
« Reply #8 on: November 14, 2018, 08: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.

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Re: Sinus Unwarpable?
« Reply #9 on: November 14, 2018, 09:45:23 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. >.<
Art can be a window into the soul

Offline Hetzen

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 1646
Re: Sinus Unwarpable?
« Reply #10 on: November 14, 2018, 10: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.
« Last Edit: November 14, 2018, 10:27:17 PM by Hetzen »

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Re: Sinus Unwarpable?
« Reply #11 on: November 14, 2018, 10:59:07 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.
Art can be a window into the soul

Offline Hetzen

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 1646
Re: Sinus Unwarpable?
« Reply #12 on: November 14, 2018, 11:42:06 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.

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Re: Sinus Unwarpable?
« Reply #13 on: November 15, 2018, 12:12:47 AM »
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?
Art can be a window into the soul