Jump to content

Archived

This topic is now archived and is closed to further replies.

Engjell Berisha

FS9 XML Bitmap Transparency

Recommended Posts

I have yet to get the hang of this and I am exhausted searching through forum after forum only to find really open ended and broad answers. Can someone please provide a clear and concise tutorial or procedure on how to create a bitmap using lets say photoshop that will be transparent when used in a gauge. To be clear as to what I mean take a look at this MFD - I am trying to make a window like the Airspeed and Altitude tapes that will be transparent like the ones in that image. I hope someone has the patiences to teach me this incredibly frustrating skill.


Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

Share this post


Link to post
Share on other sites

Hi, Not sure if i understand you correct, but all bitmaps with color black, 0,0,0 are transparant.If you want to change the transparancy, use <Element><Rectangle Width="xxx" Height="yyy" FillColor="yours" Transparency="0.0 to 1.0" /></Element> Jan


Jan

 

 

 

"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

In Photoshop, simply click "New", choose the size you need for width and heights, then fill the entire space with pure black (0,0,0) color. That will make the entire bitmap "transparent" when used as the base (background) image for your gauge. Alternatively, you can simply use the technique Jan suggests where you don't even need a "bitmap" at all, but simply tell the sim to create a transparent area for you.


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556

Interests: Gauge Programming - 3d Modeling for Milviz

Many Thanks to All That Donated To Our Server Drive!

Share this post


Link to post
Share on other sites

I believe the term he meant to use was translucent... as in the rectangular backgrounds for the speed tape and altitude tape.


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites

Ed, in that case it's as simple as setting the Transparency="0.6" (60%) or thereabouts. One could still use a either a bitmap or an XML vector drawn image. In the case of a bitmap, that isn't something that would be done in Photoshop at all.


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556

Interests: Gauge Programming - 3d Modeling for Milviz

Many Thanks to All That Donated To Our Server Drive!

Share this post


Link to post
Share on other sites

Just to add my 2cents - XML only. For some reason best known to Microsoft there's no Alpha channel when working in C, unless you look at using GDI (I think....). -Dai

Share this post


Link to post
Share on other sites

Alright guys let me try to explain this a little better I suppose. I did indeed mean transparent - not sure what the difference between that and translucent is - but I meant transparent. For example when in xml you can create a rectangle and define a transparency like Bill said and then the rectangle will be see through to a certain degree depending on the transparency value. Now here is my problem; while you can do this with rectangles my trouble is that my windows aren't rectangular and I'm am left with two options either to create a polygon of the windows or to create a bitmap. I tried creating the polygon but the trouble is the transparency tag does not work with anything but a rectangle. Now I've created a bitmap of the windows but I need them to be transparent. As far as I know adding the transparency tag does not do anything to a bitmap. I gave it a go just in case and nothing. Here is the code I used for the bitmap:

<Element><Position X="0" Y="0"/><Image Name="PFD-WND.bmp" Transparency="0.5"/></Element>

Sifting through default aircraft I came across UseTransparency="Yes" and I add this to the above code but also did nothing. Now what I am wondering is what is the graphical method - as in using PhotoShop and Alpha channels - to make my bitmap lets say 50% transparent. I know this can be done as may gauges have overlays of glass or highlights that can be put right over the image but will display 50% or so transparent. I wish I code use the transparency tag for this as it would make it much easier. I've tried for months to learn the trick to this alpha highlight and stuff but no luck. Oh and I'm aware of the fact that #000000 displays as completely transparent - I guess that's what translucent means - but I was hoping for nothing completely transparent as then there is no point to my bitmap really.


Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

Share this post


Link to post
Share on other sites

Translucent means semi-transparent. Transparent means you can see right through it, completely and unobstructed.


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites

Hi, If i remember well, something is written about alpha and shadow in the old fs9-sdk under artwork.Maybe helpful. Jan


Jan

 

 

 

"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

I "stickied" a post made by Susan Ashlock about six years ago. Unfortunately, the image links are no longer viable, but the text at least is durable... http://www.flightsim.com/vbfs/showthread.php?152226-Creating-alpha-gauge-images


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556

Interests: Gauge Programming - 3d Modeling for Milviz

Many Thanks to All That Donated To Our Server Drive!

Share this post


Link to post
Share on other sites

And that just goes to prove I should engage brain before opening mouth - especially as I devoted a whole section in sd2gau on how to create alpha channels in gauges...... Silly.gif -Dai

Share this post


Link to post
Share on other sites

×
×
  • Create New...