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

Move a MaskImage

Messages
14
Country
germany
Dear all,
I'm quite new in 2D XML gauge building and now I'm stuck with my B733 EADI.
Main question: Is it possible to rotate a MaskImage together with the masked image? The following code does NOT work, but if it would, that's what I want:
Code:
<Element>
  <Element>
    <Position X="228" Y="130"/>
    <Image Name="EADI_cardScale.bmp">
      <Axis X="200" Y="700"/>
    </Image>
    <MaskImage Name="EADI_bankIndicator.bmp">
      <Axis X="60" Y="130"/>
    </MaskImage>
    <Shift>
      <Value>(A:ATTITUDE INDICATOR PITCH DEGREES, degrees) /-/</Value>
      <Scale Y="7.2"/>
    </Shift>
  </Element>
  <Rotate>
    <Value>(A:ATTITUDE INDICATOR BANK DEGREES, radians)</Value>
  </Rotate>
</Element>
EADI_CardScale.bmp both shifts and rotates, but EADI_bankIndicator.bmp does not move at all instead of rotating.

If this is impossible, does anybody have a hint how to solve this differently?

EADI.jpg


What you can see here is the very common standard: The surrounding is the MaskImage, the blue/brown card and the white scale are one bitmap being the masked image, and the white/transparent bank indicator triangle is on top. What I try to achieve is, that the red rectangle moves with the the bank indicator triangle and that the white scale is invisible within this rectangle. But the blue/brown card should be still visible! Of course, the rectangle will not remain, it's just to visualize my problem.

Any help is deeply appreciated.
Frank
 
Hi,

Here is the code from the default DC-3 AHI. Note it does not use two Elements, just one.

Code:
  <Element>
    <Position X="22" Y="22"/>
    <MaskImage Name="adi_horizon_window.bmp">
      <Axis X="50" Y="50"/>
    </MaskImage>
    <Image Name="adi_horizon.bmp">
      <Axis X="58.5" Y="2"/>
    </Image>
    <Shift>
      <Value Minimum="-90" Maximum="90">(A:Attitude indicator pitch degrees:1,degrees) /-/</Value>
      <Scale Y="1.37"/>   <!-- +/-48 pixels Y over +/- 35 degrees pitch -->
    </Shift>
    <Rotate>
      <Value>(A:Attitude indicator bank degrees:1,radians)</Value>
    </Rotate>
  </Element>

Hope this helps,
 
Hi Tom,
thanks for your quick reply.
However, I can't see how the DC3 AHI helps, because this is indeed the standard attitude gauge: The mask adi_horizon_window.bmp defines the visible area for the moving image adi_horizon but does not move itself.
This is what I currently have - but still not exactly what I would like to have ;)

Anyway, thanks and best regards
Frank
 
Mask images cannot be manipulated.
You would need 3 separate elements, each with their own 3 (possibly 2) mask bitmaps.
Element #1 - The brown / blue horizon (only) with the mask as shown above but with no pointer. (pitch and roll)
Element #2 - The pitch ladder with a transparent background and a special mask based on the mask used in #1 where the upper radii of the mask used in #1 is lowered to cover the upper part of the ladder. (pitch and roll, exact code as above)
Element #3 - The roll pointer. This could be done in one of two ways.
1) If you want the pointer to stay visible at greater than +/- 45*, but locked at 45*, then use a bitmap (no mask) with transparency and applying roll to it with 45 degree limits. (roll only)
2) If you want the pointer to disappear at greater than +/- 45* then use a pointer bitmap with the same mask image used in #1. (Roll Only)
For the pointer bitmap it is a good idea to have an invisible bar to it so the rotation axis matches the axis' of both the the ladder & the horizon, that way it all stays aligned.

EX.

XML:
<!-- HORIZON -->
<Element>
    <Position X="228" Y="130"/>
    <Image Name="HORIZON.bmp"> <!-- BROWN BLUE ONLY -->
        <Axis X="200" Y="700"/>
    </Image>
    <MaskImage Name="XXXX.bmp"> <!-- MAKE A PROPER MASK HERE -->
        <Axis X="60" Y="130"/>
    </MaskImage>
        <Shift>
            <Value>(A:ATTITUDE INDICATOR PITCH DEGREES, degrees) /-/</Value>
            <Scale Y="7.2"/>
        </Shift>
        <Rotate>
            <Value>(A:ATTITUDE INDICATOR BANK DEGREES, radians)</Value>
        </Rotate>
</Element>

<!-- LADDER -->
<Element>   <!-- KEEP ALL VALUES, AXIS & SCALE THE SAME AS ABOVE FOR PORPER ALIGNMENT -->
    <Position X="228" Y="130"/>
    <Image Name="LADDER.bmp"> <!-- LADDER ONLY WITH TRANSPERANCY -->
        <Axis X="200" Y="700"/>
    </Image>
    <MaskImage Name="XXXX.bmp"> <!-- MAKE A PROPER MASK HERE WITH THE UPPER RADII LOWERED AS WANTED -->
        <Axis X="60" Y="130"/>
    </MaskImage>
        <Shift>
            <Value>(A:ATTITUDE INDICATOR PITCH DEGREES, degrees) /-/</Value>
            <Scale Y="7.2"/>
        </Shift>
        <Rotate>
            <Value>(A:ATTITUDE INDICATOR BANK DEGREES, radians)</Value>
        </Rotate>
</Element>

<!-- POINTER, OPTION 2 -->
<Element>
    <Position X="228" Y="130"/>
    <Image Name="POINTER.bmp"> <!-- POINTER WITH A TRANSPARENT "HANDLE" TO MATCH THE Y AXIS BELOW IN MASK (Y="130") -->
        <Axis X="XXX" Y="YYY"/> <!-- AXIS "X" & "Y" WILL CHANGE DUE TO NEW BITMAP -->
    </Image>
    <MaskImage Name="XXXX.bmp"> <!-- USE THE SAME MASK AS USED IN #1 -->
        <Axis X="60" Y="130"/>
    </MaskImage>
        <Rotate>
            <Value>(A:ATTITUDE INDICATOR BANK DEGREES, radians)</Value>
        </Rotate>
</Element>
 
Last edited:
Thanks for your reply. Not being able to manipulate masks is highly valuable information.
This code is indeed the closest possible approach to my requirements. However, it looks not that realistic, so I decided to amend my requirements. Finally I use a roll pointer with a blue rectangle as background (masked with the horizon mask). So the upper part of the ladder is not masked but hidden under the blue rectangle.
Under normal flying conditions, this looks exactly like the original. It starts getting wrong when the nose is down >20 degrees.
But in such a situation, one might focus on something different than on a strange looking EADI. Additionally I couldn't find any image or video showing such a high pitch down, so I hereby claim, that the real instrument shows exactly the same:D
 
Back
Top