Planetside Software Forums

General => Terragen Discussion => Topic started by: reck on May 11, 2013, 12:44:09 PM

Title: Best way to distort SSS
Post by: reck on May 11, 2013, 12:44:09 PM
Lets say I have a circle SSS that's displaced into the ground which produces a perfect circler hole. How do I distort\stretch the shape so that the shape changes into something that's not a perfect circle?
Title: Re: Best way to distort SSS
Post by: j meyer on May 11, 2013, 01:05:26 PM
You change that in the x and z slots of the SSS.
Title: Re: Best way to distort SSS
Post by: reck on May 11, 2013, 02:06:56 PM
What i'm trying to say is I want to distort the perfect circle\ellipse into an imperfect, more natural shape. Simply changing the X and Z values will only change the size of the circle\ellipse.
Title: Re: Best way to distort SSS
Post by: Hetzen on May 11, 2013, 05:12:46 PM
Sounds like a warp function with a redirect shader is what you need. Switch off final position in the SSS.
Title: Re: Best way to distort SSS
Post by: Dune on May 12, 2013, 04:17:37 AM
I once put an island tgd on the forum, doing just that. Year ago or so.
Title: Re: Best way to distort SSS
Post by: reck on May 12, 2013, 04:45:12 AM
I've started messing around with a warp and redirect and getting some results.

Quote from: Hetzen on May 11, 2013, 05:12:46 PM
Switch off final position in the SSS.

What does "final position" do? I've switched it between "Final Position" and "Position in terrain/texture" but i'm not seeing any difference. When should I use one setting over another?

I checked the help file for this node but this option has been left blank.

Dune, i'll see if I can track down your island tgd, i'm sure it will be a big help as always.
Title: Re: Best way to distort SSS
Post by: Tangled-Universe on May 12, 2013, 04:54:55 AM
That option isn't specific to that node, because it's a rather "common" thing shared by other nodes.

Final position = use coordinates of final position = coordinates of final displaced surfaces, so the "state" of the terrain before it goes into the planet node.

Texture coordinates = use texture coordinates of current position in the network, so if you haven't computed a terrain yet it will use the texture coordinates of the undisplaced planet surface.
After your first compute terrain it will use the texture coordinates provided by that compute terrain node.
If you have displaced your surface then the compute terrain will update the texture coordinates for the displaced surface.

A warp shader can only warp texture space so you need to make sure the SSS outputs it's shape in texture space, so that's why you don't use "final position".

Since it's a 2D shape, warping with a redirect shader on X and/or Z gives most predictable and easy results.
Title: Re: Best way to distort SSS
Post by: Dune on May 12, 2013, 07:33:04 AM
Here you go Reck.... http://www.planetside.co.uk/forums/index.php/topic,13505.msg133065.html#msg133065 (http://www.planetside.co.uk/forums/index.php/topic,13505.msg133065.html#msg133065)
Title: Re: Best way to distort SSS
Post by: reck on May 13, 2013, 03:32:50 PM
Thanks for that description T-U, makes a lot more sense now. Maybe that description could be copied into the official help as the final position entry is blank, at least for the SSS.

Dune, going to download your file now and take a look, thanks for sharing.