Sign in to follow this  
Guest zip

Environmental "light" value

Recommended Posts

The SDK discusses a byte value (0..255) that represents the current environment lighting (adjusted for time of day, sun elevation, moonlight). This value is used to colorize or tint the panels as a scale factor.Does anybody have any idea as to where this value can be found?

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

The only entries that I'm aware of that will affect the panels in this manner are these from the panel.cfg:Day=255,255,255 <= affects 2d panel color, brightness (daytime)Night=32,32,32 <= affects 2d panel color, brightness (dusk/night/dawn)Luminous=190,190,190 <= affects gauge color, brightnessIf there's anything else, I'm don't know of it... ???

Share this post


Link to post
Share on other sites

Good point.The section in the panel.cfg determines what color is used for the highlight, but I wanted to get the scale factor FS currently applies to the non_luminous parts.From the SDK, tint = night + (day

Share this post


Link to post
Share on other sites

Arne's post re: sun, was to compute the angle of the sun at any given lat/lon/time/date, and was used as part of an algorithim to calculate the dawn/day/dusk/night transition points, since the returned value from the stock variable is either inaccessible for XML folks, or wholly unreliable for C gauges.I'm not aware of any accessible variable for the "sunlight" that you seek, nor of a way to modify what appears to be an protected internal function of one of the .dll files. It may be possible, but if so, it most certainly won't be easy... :(

Share this post


Link to post
Share on other sites

I was thinking perhaps of painting a bitmap, having FS modify it for night color, and grabbing it back to find out what FS did with it. Ideally, if you use a white pixel, you can deduce from the new value what the scale factor was. But, the problem is getting that image back - and the handle in the PELEMENT tree only gives me my image back - probably because DirectX actually does the rendering and FS just specifies a color matrix transformation.Argh.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this