Planetside Software Forums

General => Terragen Discussion => Topic started by: Dune on June 07, 2011, 02:44:48 AM

Title: twist and shear base altitude ?
Post by: Dune on June 07, 2011, 02:44:48 AM
Can anyone enlighten me on what the base altitude in the twist and shear shader exactly does? And how it gets its data? If added to a testspike it only shifts the spike from left to right...
Title: Re: twist and shear base altitude ?
Post by: Tangled-Universe on June 07, 2011, 03:10:10 AM
...from left to right...?
That doesn't make sense to me?
Title: Re: twist and shear base altitude ?
Post by: Dune on June 07, 2011, 07:44:29 AM
The whole spike, not the top. Like the basis is well below the ground... It tilts the same way though.
Title: Re: twist and shear base altitude ?
Post by: Henry Blewer on June 07, 2011, 07:56:04 AM
I have been linking the twist and shear through/by a distribution shader to control the altitude and slope. It's not a good solution.

From the WIKI. http://www.planetside.co.uk/wiki/index.php/Twist_and_Shear_Shader
Title: Re: twist and shear base altitude ?
Post by: Dune on June 07, 2011, 08:05:16 AM
Yeah, that's what I do too (works fine for me), but I just wondered what the base altitude is/does...
Title: Re: twist and shear base altitude ?
Post by: Henry Blewer on June 07, 2011, 08:43:31 AM
From what I understand for the explanation, it is an adjustment of the beginning (lowest) altitude  the effect begins to alter the terrain.
Title: Re: twist and shear base altitude ?
Post by: Matt on June 09, 2011, 12:08:57 PM
The shear effect displaces the terrain horizontally. To create the shear effect, the amount of displacement varies with altitude. There must be some altitude where the displacement is 0, and this is the base altitude. Above base altitude the displacement is positive in some direction; below base altitude the displacement is negative.

Maybe one day we'll add the "twist" feature to the Twist and Shear Shader, but right now it only does "shear".
Title: Re: twist and shear base altitude ?
Post by: Henry Blewer on June 09, 2011, 01:14:08 PM
Then everything above the base altitude gets transposed by the effect? Say I set the base altitude to 50 m. Below 50 m there is not an effect?
Title: Re: twist and shear base altitude ?
Post by: Matt on June 09, 2011, 06:05:10 PM
The effect continues below the base altitude. Imagine a vertical line. Put a pivot somewhere along the line - this is the base altitude. At the pivot, nothing moves. If I rotate the line so that the top moves to the right, if the line is still a straight line then below the pivot it moves to the left.

The shear effect isn't a rotation, it's just a horizontal displacement, but the principle is the same. The base altitude is the altitude where you want the pivot to be. The effect continues below the pivot.

Matt
Title: Re: twist and shear base altitude ?
Post by: Henry Blewer on June 09, 2011, 09:23:48 PM
That is a very good explanation Matt. Thank you.
Title: Re: twist and shear base altitude ?
Post by: Dune on June 10, 2011, 03:41:53 AM
Thanks very much, Matt. That explains a lot.