How do you adjust the scale of a planet non-uniformly?

Started by Primalace, February 09, 2010, 09:17:19 AM

Previous topic - Next topic

Primalace

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

Goms

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.
Quote from: FrankB
you're never going to finish this image ;-)

cyphyr

Or you could use an image sheder, but the technique is the same.
:)

ps, I'm fairly sure this wont re-scale the atmosphere.
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Goms

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...
Quote from: FrankB
you're never going to finish this image ;-)

Primalace

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?

Goms

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. ;)
Quote from: FrankB
you're never going to finish this image ;-)

Primalace

Thank you very much, I'll have a look at this tonight and see if I can get it working ;)
-Mike