Jump to content
Sign in to follow this  
Guest zip

Environmental "light" value

Recommended Posts

Guest zip

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

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... ???


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest zip

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... :(


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest zip

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...