Board index FlightGear Support

Making cockpit lighting independent of relative sun position

All general support: help on flying, installation, hardware, getting online etc. There are lots of users and developers to help you out.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- where did you download your aircraft/scenery from?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).

If you experience FlightGear crashes, please report a bug using the issue tracker (can be also used for feature requests).
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

Making cockpit lighting independent of relative sun position

Postby mgc » Fri Aug 17, 2018 1:03 am

Hi folks,

I am trying to figure out how to remove the lighting effect which results in drastically different panel lighting depending on the sun position and resulting shadows, in order to get consistent looking screenshots, even as I turn the aircraft.

That is, I'd like it to always look like this:
Image

instead of it getting dimmed to this, when I turn:
Image

What's the simplest way to accomplish removal of this effect?

Thank you,
mgc
mgc
 
Posts: 11
Joined: Mon Jun 13, 2016 10:44 pm

Re: Making cockpit lighting independent of relative sun posi

Postby Thorsten » Fri Aug 17, 2018 5:41 am

the lighting effect which results in drastically different panel lighting depending on the sun position and resulting shadows, in order to get consistent looking screenshots, even as I turn the aircraft.


The sun does that in reality with panels - lit surfaces show full daylight (25.000 lux), shaded surface show only indirect light (100-500 lux). So I'd argue that the environment system should really not do what you ask (and in fact, you can't simply flick a switch and make it happen).

Elements that can potentially appear too dark often are back-lit in reality, and the more advanced aircraft in the repository allow you to use the corresponding switch - if instrument back-lighting is done well, it'll even add right with the sunlight (though consistent cabin lighting is hard - I've done it for the Space Shuttle and there's lots of code involved computing the current amount and color of indirect light in the cabin).

As for your request:

If you're a 3d modeler, you could try to reduce ambient and diffuse material channels of the panel objects to zero using blender (or another 3d editor of your choice) and make them all emissively lit - in that way, they'll never change color.

If you know GLSL, you could write a shader which does away with the directional lighting and uses always 1 for the diffuse light factor rather than the NdotL term - and then assign that effect to the surfaces.

Otherwise I don't think there's a viable option.
Thorsten
 
Posts: 10841
Joined: Mon Nov 02, 2009 8:33 am


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests