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

FS2004 Rendering a Circle in FS2004 XML format

Messages
10,163
Country
us-arizona
Hey all,

If this is how to render a triangle;

Code:
    <Element Name="Gray Rectangles">  
      <Position X="-167" Y="-74"/>
      <Element Name="Altitude Strip">  
              <Position X="167" Y="72"/>
              <Rectangle Width="74" Height="284" LineWidth="1" Color="Black" FillColor="Black" Bright="Yes" Fixed="Yes"

Transparency="0.7"/>
           </Element>

Then how do you render a circle?

When I write 'Circle' in where Rectangle is, the circle is solid black instead of gray. :S
 
Last edited:
You used <Circle Width="74" Height="284" instead of <Circle Radius="XX", and it worked? I'm always amazed at XML

Anyway, maybe Transparency does not work for circle objects, only rectangles.

Bob
 
Roger that Bob.

It does appear to be the case. This also creates a pure black circle even though transparency is dialed in. :(
 
Perhaps you could create a rectangle with Transparency="0.7" and then cover that with a circle .bmp mask. Not elegant, might work, but I'm not sure .... mask on top of a Tranparency. Hmm, who knows?
 
The alternative is to have 2 different polygons with one just ever so slightly behind the other. The background one gets the background scene, and the foreground one has material blend settings to SrcColor/InvSrcColor and you render the other shapes with no transparency on it. That way pure black will be transparent and increasing values will darken/blend with the background. At least....that's all I can think of without going the GDI+/D2D/D3D routes.
 
When I write 'Circle' in where Rectangle is, the circle is solid black instead of gray. :S
Try again and leave out the FillColor="Black" flag. According to the SDK, "If no fill color is set, only the outline of the circle will be drawn."
 
Perhaps you could create a rectangle with Transparency="0.7" and then cover that with a circle .bmp mask. Not elegant, might work, but I'm not sure .... mask on top of a Tranparency. Hmm, who knows?

You are the man!! Thanks Bob. Goodness, why didnt I think of masks... arrgh..
 
Rats... That doesnt work either. I get a hair like, faint circle line. The rectangle is over the Mask, as usual.

The bad part is that I 'need' the transparent disc over (or under that is) the Compass rose.

But even with the rose hidden (commented out) the masked circle / rectangle refuses to show up. :(

This is a screenshot of the 'real' Skyview with said 'darkened, transparent disc area'.
 

Attachments

  • SkyviewFaceBazel.jpg
    SkyviewFaceBazel.jpg
    807.9 KB · Views: 499
Yeah, I understand the effect you're trying to model. Too bad about the mask idea but I really had doubts it would work.

Jan (phjvh) is contributing to this thread. If he doesn't know of an XML solution to your semi-transparency issue, no one does.

Bob
 
Back
Top