Jump to content
Sign in to follow this  
Guest zip

IMAGE_USE_LUMINOUS_PARTIAL Flag

Recommended Posts

Guest HC001ST - Stick

It would seem that you can create a gauge bitmap with an alpha channel and use the IMAGE_USE_LUMINOUS_PARTIAL flag to determine which parts of the gauge are luminous.Is this true? I've not been able to find a format for a gauge background with an alpha channel that will load. I've tried DXT1, DXT3, & A8R8G8B8. But it seems that bitmaps must be 8 or 24 bit to work. What bitmap format will allow this in FS9?I have DXTBmp, Imagetool, & Photoshop.Thanks.Edited: to subscribe.

Share this post


Link to post
Share on other sites

As far as the IMAGE_USE_ALPHA flag is concerned, the bitmap has to be in 4-4-4 format (w/ 4 bit alpha channel if memory serves me).So in DXTBMP save your image as a 4-4-4 bitmap. Afterwards you might want to x-check in Imagetool (-> View Alpha Channel) to check if the alpha has made it into the file.If you need more information, let me know. However, I have only tried to use the IMAGE_USE_ALPHA flag for now with partial success (lots of ugly color bleeding, but this is most certainly my inability to handle image editing programs...). :-smoochOtherwise, if you get it working right away, let us know too! :-hahGood luck man,Etienne :-wave

Share this post


Link to post
Share on other sites
Guest zip

I've played this week with backlighting on gauges, and I've found thus far that it's next to impossible to create the proper effect without using the FS98 style of two bitmaps, and as usual screaming "what were they thinking!" at least once.My attempts to date are:1) use a "FS"ized 4x4x4 bitmap (with alpha) - proper highlighting was observed, but the rest of the bitmap was still affected by the "coloring". Severe banding can be observed because of the 4 bits used for alpha.2) Mix match the USE_ALPHA, IMAGE_BRIGHT and USE_LUMINOUS / USE_LUMINOUS_PARTIAL and still very disappointed with the final effects. I end up getting one part to look as I want, but it systematically trashes another part in the process.3) Revert to the GDI+ method, and render images with a full alpha channel, for the proper effects (watch out, the scaling and interpolation modes can create a lot of artifacts making the image quality rather poor). However, the proper effect is applied. An 8 bit alpha channel provides the best effect (glow, smooth), but then you hit the problem of 32 bit image files in your resource file (the normal BMP format doesn't support alpha channels as TGA would for example).4) Use 2 (or more) bitmaps, as in FS98. One for night lighting with lights on, the other for day lighting. You can duplicate the "shading" effect by computing the ambient lighting (there's a formula posted somewhere to use to determine luminosity based on the internal time of day and sun position somewhere), and use GDI+ to apply a color matrix to the bitmap and shade accordingly. The problem is that your gauge may look completely different from the other gauges in the panel, unless you write all of them, and if you stack images in layers, all of them need to use that shading algorithm or the final result will look strange. I end up with a gauge that's three times the size, just to get a nice night light effect.Regardless, it's a lot of work to get the right effect, much harder than it needs to be. I'm still working on it, and will post some more info once (a) I lost all my hair in the process (what's left of it) or (:( found a suitable method.

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