Jump to content
Sign in to follow this  
Guest

Partial Transparency......

Recommended Posts

Guest

Hi allI apologise for requiring assistance with this matter and have searched this forumI have sucessfully created Transparent bitmaps using DXT1 and DXT3 using a mask saved to a alpha channel and these turn out fine, but contain either Transparent or non Transparent detail.What do I have to do, other than pull my hair out, to create a semi-transparent imageI have tried 256*256 (256 col's) image with and without a 0,0,0 background and saved as a *.tga file with a mask saved to alpha, I have just run out of ideas!!!! Even made sure I used DXT3(A).My code is straight forward, Point()'s and Texpoly() commands, wondered about Bitmapmode() command which tells FS about transparency, I think, allthough this is an old command, now!I should explain that I am trying to create a semi-Transparent Texture for a ground polygon, not that this would affect the semi transparency, I would have thought.Sorry for yet another request of support on this subject as I know it recieves alot of attention, but I'm stuck!!!!RegardsDave

Share this post


Link to post
Share on other sites
Guest luissa

Hi Dave,I assume you use PSP. I see that you know how to add an alpha channel to a bitmap. And that after adding the alpha channel you save the image in the TGA format which preserves the information on the alpha channel. And that you open the TGA image with ImageTool and convert it either to DXT1 or DXT3.The level of transparency depends on the alpha channel. The alpha channel is an image of the same size of the original one. If your alpha channel image is totally black, your final image will be totally transparent. If your alpha channel image is totally white, your final image will be totally topaque. For semi-transparency use a grey value between 0 and 255.Take notice that in DXT1 the alpha channel has 1 bit per pixel. Therefore, with DXT1, a pixel is either opaque or transparent. With DXT3 you can have an 8-bit alpha channel (256 levels of transparency).I do not know much about the conversion from TGA to DXT1 or from TGA to DXT3 but if you start with an 8-bit alpha channel in the TGA with 256 different levels of transparency:a) if you convert to DXT1, you end up with a "false semi-transparency". That is: you end up with only ON/OFF transparent pixels but they are spatially dispersed in regions of semi-transparency that you get this false transparency effect.:( if you convert to DXT3, you get "real sem-transparency" but not the all 256 levels that your alpha channel may have. I think that due to the compression algorithm in DXT3 you end up with only 16 (or 32? or else?) levels of transparency. So if you have a fine detail in your transparency map you will probably lost it.Kind Regards, Luis

Share this post


Link to post
Share on other sites
Guest

Hi LuisThanks for your replyYes, you are right about psp which seems a standard for Fs Graphic creation, unless things are changing!!I have so far used the DXTBmp program to create the DXT3(A) image. If you look at the jpeg below, with white representing transparency, I wonder whether their wasn't enough definition between the transparency and the opaque part of the image. I have decided to turn my attention to try and create a Transparent bitmap, which I know I can create, to replace the Polygon which currently has a 256*256 bitmap assigned to it. In trying to create a good Grass texture I have run into a problem where I have a tiled effect from the Bitmap edges. It was this Semi-Transparent Texture I was trying to create to reduce this Tiled effect. Although I was using the Texxpoly() command with the 'ATS' flags to sub-devide the polygon, I stil can't get rid of the the tiled texture effect.I am willing to experiment with the Transparent Bitmap, to replace the Polygon for the Grass ground cover, at my airfield, because I understand that I could replace all 'Ground cover Polygons' with this technique, although I don't know what the name for this technique is, I can reconise the advantages it can bring and the flexibility in texturing and realism !!! See second Picture below......Thanks for your help Luis, I guess I will still need some assistance from people in trying to apply this transparent texture, but it will be worth it!!!!RegardsDave

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