Hello everybody,

I've been experimenting with a redone implementation of the sun in simgear.
My goal is to create a more acurate looking sun that also has more 
variability in its appearance.
I'm pretty much done and like to ask for comments and advice.

For those of you who'd like to take a look at my current results:

http://www.akermann.org/fgfs/sun_light_yellow.jpg
http://www.akermann.org/fgfs/sun_yellow.jpg
http://www.akermann.org/fgfs/sun_orange.jpg
http://www.akermann.org/fgfs/sun_white.jpg

As you can see the sun's color differs depending on weather conditions 
and time of day.
The implementation is based on the physics that actually affect the 
suncoloring.
So by figuring out the amount of Raleigh Scattering, it calculates the 
colors.

What the implementation calculates is basically the distance the light 
travels through the atmosphere (depending on sunangle and atmosphere 
thickness), the density and humidity which all influence the amount of 
scattering and uses this to determine the color.

The sun consists of three textures for the suncore, a halo directly 
surrounding the sun and an outer halo.
Each of them has a different color. The size of the halos also vary 
depending on sunangle and visibility.

Although there is more calculation done in comparision to the existing 
implementation, the effect on framerates is insignificant. At least I 
didn't notice a difference.

Now, the current glitch i'd like to ask you for advice is this:
Right now i'm doing alot of calculations in the repaint-method that 
deals with enviromental values, such as humidity, visibility and density.
This is necessary, since this kind of information currently is dealt 
with in FlightGear's Enviroment branch. Since the sun is calculated in 
Simgear, I can't access the information there.
So adding the missing calculations there wouldn't make sence and I have 
to take care of that in Simgear/the sun-code.

Any ideas how this could be done more elegantly?
What should be changed before it is commitable to cvs?


Oh, if you wan't to experiment with the implementation here's what 
you'll need:
- Textures for the halos in $FGROOT/Textures/Sky: 
http://www.akermann.org/fgfs/halos.tgz
- Patches for files in FG: http://www.akermann.org/fgfs/fgfs-diff
- Patches for files in SG: http://www.akermann.org/fgfs/simgear-diff


Mark



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to