Skip to main content
gamedev.net
🔒 Locked

Sky Gradient

Started by nPawn 1 reply 850+ views
Original Post
nPawn
nPawn
How is a sky gradient done? Is a texture procedurally made that is mixed with other textures on the sky plane, or are the diffuse colors of each vertex in the skyplane adjusted or what? And does anyone have a link to a tutorial on this subject?
bishop_pass
bishop_pass
If you're using a skydome, turn lighting off, and set your vertex colors each to different colors, depending on the color of the sky at that point. Set your shading mode to SMOOTH.

You're better off computing a hemishpere that has a finer tesselation near its base than at its pole. Assuming your hemisphere arcs 100 degrees from pole to base, your latitude tesselations should become increasingly more dense towards the base. You do this to capture more shading detail where the sky has a higher rate of change per surface area.

A simple way to do this would be to scale your latitude step by the previous step as you walk down the hemisphere during tesselation. For example, if you start with a step of 30 degrees, and a scalar of 66%, you'll get latitudes which step about like this:

30
20
13
9
6
4
3

But, as you can see, that doesn't add up enough, so you might want to increase the scalar a little bit, or increase the initial stepsize a little bit.

[edited by - bishop_pass on January 27, 2003 2:43:30 PM]
_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in
Yann L
Yann L
There was some talk about sky gradients and anisotropic sphere tesselation in the sky thread.

Also, take a look at vterrain's atmosphere page.


[edited by - Yann L on January 27, 2003 2:54:28 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.