- Messages
- 1,451
- Country

Hello everyone
I've been struggling to find a simpler way to tackle what follows:
I thought it was "smart" to map each and every single annunciator, push buttons, radio LEDS and much more in two textures: in general and when applies, one for any "OFF" state and the other corresponding to "ON".
Here are both textures:
Approach # 1
The idea behind this, is that I wanted to have just two textures for all instances where a 3D annunciator, 3D push button, LED or anything else sharing the same shape could be "illuminated" or "not illuminated".
In this way, I can "play" with visibility conditions inside the makemdl.parts.xml file to show/or hide the pertinent 3D parts. Actually, I made that decision to mantain consistency with the technique I've learned from Bill Leaming to have beautiful night illumination in the cockpit gauges. Furthermore, I wouldn't have a ton of small images snapped into a single polygon face of each component mentioned before.
The main goal here was to only have two [Vcockpit] entries in the panel.cfg and that way, make the model work faster (if and only if my intuition is right).
Edit 1:
Disadvantages
a) All 3D parts featuring this visual effect, will double the amount of polygons; one for the illuminated and the other non lited.
b) It will drastically increase the number of entries in the makemdl.parts.xml file;
c) Also, the amount of code required to make any of this 3d objects, seems to be astronomically bigger than the one proposed on "Approach # 2".
d) What I assumed to be saving in "real estate" -regarding on textures-, I loose it due everything else described above.
"Advantages"
Maybe none... but the effect looks awesome!!!
Approach # 2
This other technique, would be to map the required polygon faces using same UVs layed out in the two textures shown above and work with them in the same way as any MDF or PFD screen and treat them as a 2D gauge. This second approach, could be simpler but won't deliver the same visual effect. I never managed to make them to work with proper illumination at dawn or night (hence Bill's technique I been using during years).
Drawing flags "Bright" and "Luminous" described in FS9's Panels SDK Overview, are not fully understood by me; perhaps I need to do more tests in this regard... What a conundrum


As an example, is a simple push button with two different lights which will be illuminated depending on 4 possible states. The Inverter 1 push button with 2 annunciators:
a) The upper 3d part have two possible states "ON" (not illuminated") and "OFF" (illuminated in yellow). This indicator lamp will work when a FAILURE in the Inverter 1 occurs.
b) The lower 3d part, has the same properties: "ON" (not illuminated") and "OFF" (illuminated in white). This indicator lamp will tell the pilot if Inverter 1 is connected or disconnected.
As a side note, this annunciator follows the Airbus philosophy: If some annunciator, illuminating push button or something similar is NORMALLY LEFT "ON" - “LIGHTS ARE OUT” AND ITS FUNCTION WILL BE ENABLED, CLOSED, ENGAGED OR ACTIVE.
This might not be relevant to you, but very good for me to know...
Perhaps, an image will have more credit explaining than I did. I move two pertinent 3d component parts of the entire push button to the right just to show what I meant:
To even further make my point clear, another image where a single set of 3D parts are share exactly the same shape and properties:
See? Alternator 1, Alternator 2, TRU1 and TRU2 (Transformer Rectifier Units) are identical.
With no further ado, here is the code required in the makemdl.parts.xml file and actually works fine:
From this image, you will see why I used Bill teachings about night enviroments...
The problem I haven't contemplated when "I decided" to use Approach # 1, is the huuuuuggggeeeee code required to make the darn push button to work and... I HAVE a millon of those to go.
Another cute thing, is that sooner or later I will be running out of the number of possible animations I might include in the makemdl.parts.xml file (which I belive, it is 200 max).
This is remotely harder to achieve compared with a much simpler code using the "2D gauge" philosopy described on Approach # 2.
Summarizing:
Sergio Kauffman.
I've been struggling to find a simpler way to tackle what follows:
I thought it was "smart" to map each and every single annunciator, push buttons, radio LEDS and much more in two textures: in general and when applies, one for any "OFF" state and the other corresponding to "ON".
Here are both textures:
Approach # 1
The idea behind this, is that I wanted to have just two textures for all instances where a 3D annunciator, 3D push button, LED or anything else sharing the same shape could be "illuminated" or "not illuminated".
In this way, I can "play" with visibility conditions inside the makemdl.parts.xml file to show/or hide the pertinent 3D parts. Actually, I made that decision to mantain consistency with the technique I've learned from Bill Leaming to have beautiful night illumination in the cockpit gauges. Furthermore, I wouldn't have a ton of small images snapped into a single polygon face of each component mentioned before.
The main goal here was to only have two [Vcockpit] entries in the panel.cfg and that way, make the model work faster (if and only if my intuition is right).
Edit 1:
Disadvantages
a) All 3D parts featuring this visual effect, will double the amount of polygons; one for the illuminated and the other non lited.
b) It will drastically increase the number of entries in the makemdl.parts.xml file;
c) Also, the amount of code required to make any of this 3d objects, seems to be astronomically bigger than the one proposed on "Approach # 2".
d) What I assumed to be saving in "real estate" -regarding on textures-, I loose it due everything else described above.
"Advantages"
Maybe none... but the effect looks awesome!!!
Approach # 2
This other technique, would be to map the required polygon faces using same UVs layed out in the two textures shown above and work with them in the same way as any MDF or PFD screen and treat them as a 2D gauge. This second approach, could be simpler but won't deliver the same visual effect. I never managed to make them to work with proper illumination at dawn or night (hence Bill's technique I been using during years).
Drawing flags "Bright" and "Luminous" described in FS9's Panels SDK Overview, are not fully understood by me; perhaps I need to do more tests in this regard... What a conundrum



As an example, is a simple push button with two different lights which will be illuminated depending on 4 possible states. The Inverter 1 push button with 2 annunciators:
a) The upper 3d part have two possible states "ON" (not illuminated") and "OFF" (illuminated in yellow). This indicator lamp will work when a FAILURE in the Inverter 1 occurs.
b) The lower 3d part, has the same properties: "ON" (not illuminated") and "OFF" (illuminated in white). This indicator lamp will tell the pilot if Inverter 1 is connected or disconnected.
As a side note, this annunciator follows the Airbus philosophy: If some annunciator, illuminating push button or something similar is NORMALLY LEFT "ON" - “LIGHTS ARE OUT” AND ITS FUNCTION WILL BE ENABLED, CLOSED, ENGAGED OR ACTIVE.
This might not be relevant to you, but very good for me to know...
Perhaps, an image will have more credit explaining than I did. I move two pertinent 3d component parts of the entire push button to the right just to show what I meant:
To even further make my point clear, another image where a single set of 3D parts are share exactly the same shape and properties:
See? Alternator 1, Alternator 2, TRU1 and TRU2 (Transformer Rectifier Units) are identical.
With no further ado, here is the code required in the makemdl.parts.xml file and actually works fine:
HTML:
<!-- AVCS FWD (Inverter1) Switch Guard -->
<part>
<name>H225_Inverter1_Guard</name>
<animation>
<parameter>
<code>
(L:H225_Inverter1_Guard,bool) 50 *
</code>
<lag>300</lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<tooltip_text>AVCS FWD Switch Guard</tooltip_text>
<callback_code>
(L:H225_Inverter1_Guard,bool) ! (>L:H225_Inverter1_Guard,bool)
<!-- Sound Effect -->
(L:H225_Inverter1_Guard,bool) !
if{ 1 (>L:H225_Guard_Click2,number) }
(L:H225_Inverter1_Guard,bool)
if{ 1 (>L:H225_Guard_Click,number) }
</callback_code>
</mouserect>
</part>
<!-- AVCS FWD (Inverter1) (push button action)
NOTE:No need to have a MouseRect section for H225_Inverter1 object, since it's covered either in the H225_Inv1_annun_ON or H225_Inv1_annun_OFF part's MouseRect.
The H225_Inverter1 object was animated as follows: from key:0 to key25 (pushed in action) and from key:25 to key:50 (back action)
-->
<part>
<name>H225_Inverter1</name>
<animation>
<parameter>
<code>
(L:H225_Inverter1,bool) 50 *
</code>
<lag>300</lag>
</parameter>
</animation>
</part>
<!-- AVCS FWD (Inverter1) annunciator ON (illuminated) -->
<part>
<name>H225_Inv1_annun_ON</name>
<animation>
<parameter>
<code>
(L:H225_Inverter1,bool) 50 *
</code>
<lag>300</lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<tooltip_text>%((L:H225_Inverter1,bool) !)%{if}%('AVCS FWD: OFF')%!s!%{end}%((L:H225_Inverter1,bool))%{if}%('AVCS FWD: ON')%!s!%{end}</tooltip_text>
<callback_code>
(L:H225_Inverter1,bool) ! (>L:H225_Inverter1,bool)
(L:H225_Inverter1,bool) ! (L:H225_Inverter1_Guard,bool) and
if{
0 (>L:Inverter1,bool)
<!-- Push Button Sound Effect -->
1 (>L:H225_Big_Push_button,number)
}
(L:H225_Inverter1,bool) (L:H225_Inverter1_Guard,bool) and
if{
1 (>L:Inverter1,bool)
<!-- Push Button Sound Effect -->
1 (>L:H225_Big_Push_button,number)
}
</callback_code>
</mouserect>
<visible_in_range>
<parameter>
<code>
(L:H225_Inverter1,bool) !
if{ 1 } els{ 0 }
</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
<!-- AVCS FWD (Inverter1) annunciator OFF (Not illuminated)-->
<part>
<name>H225_Inv1_annun_OFF</name>
<animation>
<parameter>
<code>
(L:H225_Inverter1,bool) 50 *
</code>
<lag>300</lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<tooltip_text>%((L:H225_Inverter1,bool) !)%{if}%('AVCS FWD: OFF')%!s!%{end}%((L:H225_Inverter1,bool))%{if}%('AVCS FWD: ON')%!s!%{end}</tooltip_text>
<callback_code>
(L:H225_Inverter1,bool) ! (>L:H225_Inverter1,bool)
(L:H225_Inverter1,bool) ! (L:H225_Inverter1_Guard,bool) and
if{
0 (>L:Inverter1,bool)
<!-- Push Button Sound Effect -->
1 (>L:H225_Big_Push_button,number)
}
(L:H225_Inverter1,bool) (L:H225_Inverter1_Guard,bool) and
if{
1 (>L:Inverter1,bool)
<!-- Push Button Sound Effect -->
1 (>L:H225_Big_Push_button,number)
}
</callback_code>
</mouserect>
<visible_in_range>
<parameter>
<code>
(L:H225_Inverter1,bool) !
if{ 0 } els{ 1 }
</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
From this image, you will see why I used Bill teachings about night enviroments...
The problem I haven't contemplated when "I decided" to use Approach # 1, is the huuuuuggggeeeee code required to make the darn push button to work and... I HAVE a millon of those to go.
Another cute thing, is that sooner or later I will be running out of the number of possible animations I might include in the makemdl.parts.xml file (which I belive, it is 200 max).
This is remotely harder to achieve compared with a much simpler code using the "2D gauge" philosopy described on Approach # 2.
Summarizing:
- I need your thoughts on how to make this whole set of annunciators, push buttons and everything else requiring the illumination effects in the more efficent way possible (from simulator's speed and resource perspective).
- If I may, how would you do this?
Sergio Kauffman.
Last edited:

