howto(?): planet aura

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
wyv
Posts: 2
Joined: 17.02.2003
With us: 21 years 9 months

howto(?): planet aura

Post #1by wyv » 17.02.2003, 04:09

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!

Guest

Post #2by Guest » 17.02.2003, 05:29

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

Topic author
wyv
Posts: 2
Joined: 17.02.2003
With us: 21 years 9 months

Post #3by wyv » 17.02.2003, 06:50

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

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #4by chris » 17.02.2003, 07:17

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


Return to “Development”