Planetside Software Forums

General => Terragen Discussion => Topic started by: Primalace on February 09, 2010, 09:17:19 AM

Title: How do you adjust the scale of a planet non-uniformly?
Post by: Primalace on February 09, 2010, 09:17:19 AM
I'd like to be able to scale a planet so that it becomes stretched in one direction so its more elliptical than spherical. Is this possible and if so could someone tell me how? Thanks.
-Mike
Title: Re: How do you adjust the scale of a planet non-uniformly?
Post by: Goms on February 09, 2010, 09:58:53 AM
Yep, possible and "easy".
Just use the Y-value (slightly variated) as input for a displacement shader.
Heres an example for a planet with the coordinates 0;0;0. :)

ps: if the planet is not in 0;0;0, you might need to add a vector with the coordinates.
Title: Re: How do you adjust the scale of a planet non-uniformly?
Post by: cyphyr on February 09, 2010, 10:13:19 AM
Or you could use an image sheder, but the technique is the same.
:)

ps, I'm fairly sure this wont re-scale the atmosphere.
Title: Re: How do you adjust the scale of a planet non-uniformly?
Post by: Goms on February 09, 2010, 10:54:14 AM
at this scales i would suggest to use an internal solution; an image with limited color range _could_ cause steps in the displacement at high detail.
and cyphyr is right, this wont change the atmosphere. but you could use a cloud as atmosphere, this should work somehow. but i'm sure thats not as easy as the displacement for the planet...
Title: Re: How do you adjust the scale of a planet non-uniformly?
Post by: Primalace on February 09, 2010, 01:00:05 PM
Goms, could you go into more detail about how to set up the functions taking into account the fact my planets aren't at 0,0,0 for me please?
Title: Re: How do you adjust the scale of a planet non-uniformly?
Post by: Goms on February 09, 2010, 04:41:53 PM
I was slightly wrong, you actually have to subtract a vector with the values as the coordinates from the planet.
attached there's one image without the vector attached, and one with the vector subtracted directly from the get position.
the get position gives you values for x y z from the point 0 0 0 and then gets bigger the more the point you "look at" is away from this point.
So, if you subtract a vector with x y z values from this, the 0 0 0 point will be replaced. :)
Also, there's my file now as attachment. ;)
Title: Re: How do you adjust the scale of a planet non-uniformly?
Post by: Primalace on February 10, 2010, 09:05:01 AM
Thank you very much, I'll have a look at this tonight and see if I can get it working ;)
-Mike