Page 1 of 1

howto(?): planet aura

Posted: 17.02.2003, 04:09
by wyv
hi guys! i was playing with celestia, and i really like how earth has a slight aura around it when you zoom in - and how it goes from blue->red->black depending on the angle/light. i downloaded the source code to look for how this effect is done, but was pretty overwhelmed by the amount of source files, and the fact that i don't know the keyword used for this effect (to search for it effectively in the source.)

so my question is: can anyone point me to the locations in the source (file/line) where this effect is used/created? or can anyone explain the gfx theory behind it? thanks!

Posted: 17.02.2003, 05:29
by Guest
it is the atmosphere. if you check solarsys.ssc you will see the basics of how to get it to a certaint colour through trial and error or first time if you know your micrsoft paint colours

Posted: 17.02.2003, 06:50
by wyv
thanks, i'll do a search for atmosphere - but i was wondering about how it's actually rendered/drawn (but any info helps :))

Posted: 17.02.2003, 07:17
by chris
The relevant code is in src/celengine/render.cpp. The function you want to look at is renderAtmosphere()

This function calculates a set of rays from the camera position that are tangent to the planet surface. Quads normal to the surface extend upward from the tangent points to produce the halo effect.

--Chris