Jump to content
Sign in to follow this  
Guest Patrick_Waugh

anyone get alpha highlights to work in C gauges?

Recommended Posts

Guest Patrick_Waugh

I am able to create shadows (just as in the SDK XML example for the compass), but not highlights in C gauges.For shadows, I use an RGB of pure Black (the shadow layer, part of which the alpha will expose), and I create an Alpha channel with a White to Black gradient with Black Alpha being the maximum shadow.That works fine, and shows up excellent with the IMAGE_USE_ALPHA flag set on a MAKE_STATIC element above those I wish to shadow. Further, I use a layer mask on the RGB to allow an outer area that allows for transparency for those areas I do not want shadowed.Then, I attempt to add a highlight on a MAKE_STATIC element above the shadow, again much like the XML example in the SDK.For the RGB, I use pure White (parts of which the Black Alpha will expose), and create an Alpha channel with a spray gradient of Black to White that looks similar to the compass example.However, this looks greatly overexposed, so I attempted to adjust the transparency and/or fill of first the Black before pasting it on the Alpha channel, then later on the White RGB layer itself.I not found a combination that works. Anyone have any suggestions?

Share this post


Link to post
Share on other sites

Hi Patrick,I don't know about C gauges, but in XML the alpha channel needs to be an exact pixel for pixel match of the RGB, only inverted. Sounds like your shadow works the same way as in XML, so based on that I assume the highlight should as well.Try making your highlight solely on the RGB as if the image didn't even have an alpha channel. When you get it how you like it, flatten the entire image and simply copy and paste it onto the alpha channel. You can either invert the alpha in PhotoShop or Imagetool, it doesn't matter but it seems to me that Imagetool gives a better end result somehow. Convert to 8 bit and it should work I think.Jim

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

Thanks Jim, for something to try.I'm not sure that this really is the problem though, as really the alpha channel just tells FS what is blended on the RGB channel, and really the RGB has nothing to do with what is going on except that it is the color that shows through. Black for shadow, White for highlight.Further, the reason that you had to invert your Alpha channel was you had begun with the opposite background (I start with the right one), and this helped you because for your reflections, the negative works better. So, it is easier for you to invert the whole thing.In the SDK, they are very clear that the RGB channel is pure white, which is because the Black of the Alpha is the transparent areas which allow the White through to become the highlight.So, I guess you are saying that what I need to do is create a "spray" of the specular highlight on the RGB channel in White, then copy it and invert it and put that in the Alpha channel.Just on the off chance that having the image on the RGB will fix it, I'll give it a try.To be honest, I posted this as my testing indicates that highlights can't be done using this method. How do I know? Well I put your known good highlight bmp into the gauge, and it was still messed up.So, I'm thinking that I have to do highlights with GDI+ or other methods.

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

Hahahha. Ok, I'll stop twist'in.Actually, I slept for a little bit, and realized that I may have tested the wrong file. I pulled the .bmp out of your .cab, and used that, and it does show up "correctly", although as a reflection, when what I'm trying to achieve is highlight like the compass example.But this gives me hope that it can be done now, so I am more carefully studying it.Interestingly, I noticed that my Imagetool would not open your bmp! Luckily, I have an older version that does open it. So, now I'm wondering if part of my problem has been the newer Imagetool!So, back to the drawing board as all previous tests are now invalid.I already spent about 12 hours trying to get this right!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...