D
Deleted member 1281
Guest
Let's assume we have a panel light switch in our VC and we want to create convincing gauge lighting for the usual dusk, dawn, and night scenarios - and perhaps for special daytime situations, too.
Consider the following pics: #1 shows a largely illegible daylight panel caused by adverse ambient light; pic #2 shows the identical situation with low-intensity self-illumination, and pic #3 shows the panel at dusk (dawn and night looking pretty much identical). The general idea is to create a good balance between all combinations of interior and exterior lighting conditions.
Naturally, our main point of departure is Bill Leaming's Emissive Texture Tutorial, available here: https://www.flightsim.com/vbfs/wiki_index.php?title=FSX-Emissive-Textures
Let's follow Bill's tutorial up to the point where in your panel material you put the $-texture in the diffuse slot and an "instance" of it into the self-illumination slot.
For blend mode set "additive user-controlled". Now, because the resulting effect will be far too bright, we will use a much simplified version of Anthony31's dimming code as introduced in a thread here at FSDevelopers: https://www.fsdeveloper.com/forum/threads/a-gauge-to-compensate-for-light-levels.436422/
Edit --
Belatedly, I now realize that the 'innovative' process I am introducing here has already been discussed at quite some length in this thread:
https://www.fsdeveloper.com/forum/threads/dimmable-night-lighting.429475/post-666012
Carrying on regardless...
end edit
This is what we will do. For each visible gauge we will add an element to the gauge's already existing elements:
Replace XXX and YYY by the actual width and height used by the gauge. Depending on how many gauges you need to modify in this manner this may turn out to be quite a bit of work. However, at the end of the day, it is a very simple and mechanical process.
Note, if your gauge uses the more verbose FSX-specific xml scheme, you may have to use the terms <Element id="paneldimmer"> and <Visibility>(A:LIGHT PANEL,bool)</Visibility>
You can of course tweak FillColor and Transparency to your own preference. Color #140400 as used here puts a slight reddish tint on the gauges; 39% Transparency yields the very subdued lighting seen in the pics. Naturally, increasing the Transparency value will make the gauges brighter.
Note that the orangey ambient shine in pic #3 is produced by a vclight fx, which seems to support this type of self-illumination well.
If desired or needed, some sophistication is easily added. For instance, we could create a dimmer knob that the pilot can twiddle from OFF to LOW to BRIGHT, which, I understand, in one form or another is a feature in many cockpits. All that we need for this is an Lvar that defines two vis conditions and a second <Element> that uses a higher Transparency value for showing the brighter illumination.
FWIW ....
--Manfred
Consider the following pics: #1 shows a largely illegible daylight panel caused by adverse ambient light; pic #2 shows the identical situation with low-intensity self-illumination, and pic #3 shows the panel at dusk (dawn and night looking pretty much identical). The general idea is to create a good balance between all combinations of interior and exterior lighting conditions.
Naturally, our main point of departure is Bill Leaming's Emissive Texture Tutorial, available here: https://www.flightsim.com/vbfs/wiki_index.php?title=FSX-Emissive-Textures
Let's follow Bill's tutorial up to the point where in your panel material you put the $-texture in the diffuse slot and an "instance" of it into the self-illumination slot.
For blend mode set "additive user-controlled". Now, because the resulting effect will be far too bright, we will use a much simplified version of Anthony31's dimming code as introduced in a thread here at FSDevelopers: https://www.fsdeveloper.com/forum/threads/a-gauge-to-compensate-for-light-levels.436422/
Edit --
Belatedly, I now realize that the 'innovative' process I am introducing here has already been discussed at quite some length in this thread:
https://www.fsdeveloper.com/forum/threads/dimmable-night-lighting.429475/post-666012
Carrying on regardless...
end edit
This is what we will do. For each visible gauge we will add an element to the gauge's already existing elements:
Code:
<Element Name="paneldimmer">
<Visible>(A:LIGHT PANEL,bool)</Visible>
<Rectangle Width="XXX" Height="YYY" FillColor="#140400" Transparency="0.39"/>
</Element>
Replace XXX and YYY by the actual width and height used by the gauge. Depending on how many gauges you need to modify in this manner this may turn out to be quite a bit of work. However, at the end of the day, it is a very simple and mechanical process.
Note, if your gauge uses the more verbose FSX-specific xml scheme, you may have to use the terms <Element id="paneldimmer"> and <Visibility>(A:LIGHT PANEL,bool)</Visibility>
You can of course tweak FillColor and Transparency to your own preference. Color #140400 as used here puts a slight reddish tint on the gauges; 39% Transparency yields the very subdued lighting seen in the pics. Naturally, increasing the Transparency value will make the gauges brighter.
Note that the orangey ambient shine in pic #3 is produced by a vclight fx, which seems to support this type of self-illumination well.
If desired or needed, some sophistication is easily added. For instance, we could create a dimmer knob that the pilot can twiddle from OFF to LOW to BRIGHT, which, I understand, in one form or another is a feature in many cockpits. All that we need for this is an Lvar that defines two vis conditions and a second <Element> that uses a higher Transparency value for showing the brighter illumination.
FWIW ....
--Manfred
Last edited by a moderator: