• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX How to create BMP files for masking purposes ?

Messages
52
Country
hongkong
Hi,

I have some Saitek's Flight Instrument Panels (FIPs) and I am trying to modify some of the default gauges and create my own.

However, I found the bmp files created for masking purposes by PhotoShop are not recognized by the gauges.

For example, I have created one named AirSpeed_mask.bmp with PS

<MaskImage Name="AirSpeed_mask.bmp" ImageSizes="64,20,64,20">

It just blocks the space I want them to work as masks.

I've tried resizing mask images from other existed gauges with PS or Paint. These mask images work originally. When they are modified, they sometimes work, and sometimes don't.

I am quite frustrating.

Wonder if anyone could tell me how to create this type of bmp files for masking purposes for Saitek's FIP properly in the first place? I'd appreciate it very much.
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Mask images for gauges must be either 8bit or 24bit BMP files.
 
Messages
52
Country
hongkong
Thanks for the note, Bill.

I have saved different bit versions (1, 8, 24 etc) and none of them successful. I know the color of the file cannot be 000000. So I am using 010101. But still, not successful. Don't know if I have missed something.

Have asked Saitek for help. Their answer is:

We are unable to offer this information as it is privileged and confidential. We are unable to provide instruction on creating gauges to customers.

Really can't understand the point of confidentiality for the format of these masking files !

Are they afraid that we are making gauges to compete with them? :mad::mad:
 

tgibson

Resource contributor
Messages
11,338
Country
us-california
As I remember, the part of the image that should be the "window" should be 1,1,1 (RGB). The rest of the image (if any) should be 0,0,0.

Hope this helps,
 
Messages
52
Country
hongkong
Thanks Tom. RGB 1,1,1 equals to 010101.
Do you mean the margin (or part) of the image should be in 1,1,1 and the remaining part in 0,0,0 ?
I'll give a try and it's not successful.
Did I miss your point?
 
Last edited:

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Only the area of the displayed bitmap you want to be seen should be 1,1,1. The rest of the area must be 0,0,0.

The simple way of picturing this is this: you have a "wall" to paint transparent. Only the "window" in that wall should be painted 1,1,1. :D
 

tgibson

Resource contributor
Messages
11,338
Country
us-california
Hi,

In my gauges I have an Axis statement as well, but I don't know if that is required or not.

Code:
   <MaskImage Name="elev_trim_mask.bmp" ImageSizes="24,25">
         <Axis X="0" Y="0"/>
      </MaskImage>
 
Messages
1,468
Country
italy
Tom,
I have a Spill Gauge with four elements.
A background
A Semi circular disk
A mask with a quadrant cutout
An overlay with a white bar also with a quadrant cutout.

The semi circular disk indicates by how much the valve is open and is controlled by a joystick switch function.
The overlay with the white bar indicates whether the valve is crosslined ie. closed or open.
Both have axes.
vololiberista
Code:
<Gauge Name="Left Spill Indicator" Version="1.0">
   <Image Name="spillmask.bmp" Luminous="1"/>

   <Element>
      <Position X="200" Y="206"/>
      <Image Name="L_SPILL_IND.bmp" PointsTo="North" Luminous="1">
         <Axis X="146" Y="146"/>
      </Image>
      <Rotate>
          <Value Minimum="0" Maximum="100">(L:spill_segment,enum)</Value>
 
         <Nonlinearity>
            <Item Value="0" X="200" Y="344"/>
            <Item Value="25" X="146" Y="339"/>
            <Item Value="100" X="60" Y="240"/>
         </Nonlinearity>
         <Delay DegreesPerSecond="30"/>
      </Rotate>
   </Element>

<Element>
      <Position X="0" Y="0"/>
      <Image Name="L_Spill Indicator.bmp"/>
   </Element>

   <Element>
      <Position X="188" Y="188"/>
      <Image Name="bar_1.bmp" PointsTo="North" Luminous="1">
         <Axis X="188" Y="188"/>
      </Image>
      <Rotate>
         <Value>(L:spill_segment,enum) 0 &gt;
if{ 1 } els{ 0 }</Value> 
         <Nonlinearity>
            <Item Value="0" X="17" Y="188"/>
            <Item Value="1" X="171" Y="33"/>           
         </Nonlinearity>
         <Delay DegreesPerSecond="160"/>
      </Rotate>
   </Element>

   <Mouse>
      <Tooltip>Left Spill Indicator-%( (L:spill_segment,enum) )%{if}In-Line%{else}Cross_Lined%{end}</Tooltip>
   </Mouse>
</Gauge>
 

Attachments

  • spill.jpg
    spill.jpg
    67.6 KB · Views: 446
Last edited:
Messages
52
Country
hongkong
Thank you Bill, Tom and Vololiberista. :)

I have figured out how to create such *.bmp files for masking purpose with the help from you all. It's simple and I just need to:

1) Fill an image file (to be used as mask) with RGB color=1,1,1 or web color=010101; then

2) Save the file in 1, 24, or 32-bit mode.

That's it!

It's so disgusting that the Saitek EU technical guy, Gabriel Constantinescu, replied and claimed such information as "privileged and confidential to the company" and cannot release it to a customer who asks for support.

Either he is totally ignorance about it or the company has rotten by bureaucracy. :( I wish I didn't write to the company for support so that I wouldn't have to be upset as such.

You can see the post in my blog here.

Thanks again for you guys' help.

_____________
Tom Tsui
FSX Times
http://fsxtimes.wordpress.com
 
Last edited:
Messages
1,468
Country
italy
From the colours point of view it's even easier than you have said.
All you need to do in fact is to overlay images one on top of the other. And where you need a "window" to see the image below then that part of the overlay is 0,0,0.

In my example overlay 2 is a rotating disc covered by a static mask with a window. The top overlay also has a window that correspondswith the static mask except that that the top overlay rotates as well. The effect being that both windows are aligned only when the valve is open.
vololiberista
 

Attachments

  • spillmask.jpg
    spillmask.jpg
    17.9 KB · Views: 429
  • L_SPILL_IND.jpg
    L_SPILL_IND.jpg
    4.5 KB · Views: 338
  • L_Spill Indicator.jpg
    L_Spill Indicator.jpg
    14.5 KB · Views: 390
  • bar_1.jpg
    bar_1.jpg
    12.5 KB · Views: 407
Last edited:
Messages
52
Country
hongkong
Noted and thanks for the tips.

Basically, I don't have problem with transparency and overlay. Just the mask part. But your example is a good reference indeed.

Tom
 
Top