Sign in to follow this  
newtie

DXTBmp question...

Recommended Posts

Hi all-I've recently discovered Martin's DXTBmp app and I have a question. If I try to open a .bmp I get a 'Drawing Failed' message. When I open the same .bmp in DXTBmp and use 'Send to editor' (PhotoShop Elements), it opens right up. What does Martin's app do to the .bmp that allows it to be opened and edited in a graphics editor? It's a mystery to me!Mark

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

That message is typical for an attempt to load a DXT3 .bmp with Windows Picture & Fax Viewer.DXTBmp actually opens the DXT3 and saves a copy of the RGB converted to 24 bit, and a copy of the alpha converted to 8 bit in a "Documents and Settings%USERPROFILE%Local SettingsTempdxt74B7" folder (the 4 character suffix to the "dxt****" folder name will vary with each .bmp opened in DXTBmp).When you click the "send to editor" button, it's actually the converted 24 or 8 bit copy that gets sent to PhotoShop Elements (depending on whether you're sending the RGB or the alpha channel). You can verify this by looking at the filename in PSE's title bar, if sending RGB the filename will be "norm.bmp", if alpha "trans.bmp".When you click "Save" in DXTBmp after editing in PSE, it compiles your edited norm.bmp and trans.bmp back into a single 32 bit .bmp, converts it back to DXT3, and overwrites the original. When you close DXTBmp, the Tempdxt**** folder and .bmps are deleted.For aircraft textures you have the option of saving as "DXT3" or "Extended 32 bit 888-8" in DXTBmp. DXT3 is easier on frame rates, 32 bit may look slightly better. Once a texture has been converted to DXT3 the loss of quality is permanent and converting back to 32 bit won't bring it back (painting over it will though).32 bit textures may be opened and edited directly with PhotoShop, PSE, or Windows P&F viewer. You can edit the alpha channel in the 32 bit with PS, but not PSE. Incidentally you can't use a 32 bit .bmp saved directly from PS or PSE as a texture, it'll crash the sim. They must first be processed through DXTBmp or Imagetool for DX compatibility. For best results uncheck "Mip maps: - include when saving" in DXTBmp. Mips will make your textures look blurry in the sim when viewed from certain angles.That's probably way more than you wanted to know, and maybe you know most of it already, but everytime I thought I was finished I'd think of something else to add. Too much coffee maybe :) .Jim

Share this post


Link to post
Share on other sites

The perfect response, Jim. Thanks.While I have you handy, when you save a .bmp as a DXT1, what accounts for the reduction in file size? With some scenery textures that I'm trying to reduce in size, I'll go in some instances from 1.3mb to 512k. I don't see a corresponding degradation while viewing in the sim...maybe its actually more apparent to some but not to me.Thanks,Mark

Share this post


Link to post
Share on other sites

Mark,Don't get too carried away converting textures until you learn a little bit more about the properties of the various extended bitmap types.I think DXT1 has no alpha channel, whereas DXT3 does. This can cause problems with the display of some textures. I am sure an expert will chime in with the correct advice! :-)

Share this post


Link to post
Share on other sites

Hi,DXT1 comes in two flavors - with a 2 bit alpha channel (black and white only) or without any alpha channel. DXT3 allows an 8 bit alpha channel for a full gray scale. If the textures you are using show reflections on the plane, stick to DXT3. Most scenery textures are DXT1.Hope this helps,--Tom GibsonCal Classic Propliner Page: http://www.calclassic.comFreeflight Design Shop: http://www.freeflightdesign.comDrop by! ___x_x_(")_x_x___

Share this post


Link to post
Share on other sites

Thanks for the responses. I'm going to do some more research into this and am also going to order the two Abacus programs that allow you to repaint/build scenery etc. For some reason, this really interests me. I've never even thought about it after all these years of simming. New territory, I guess :>)Mark

Share this post


Link to post
Share on other sites

I'm glad Tom chimed in on this because I don't fully understand the whole bits/pixel thing. I suppose then that the drastic reduction in filesize comes from also reducing the number of colors on the RGB in much the same way that the alpha channel has been limited to either black or white? My understanding is that if you start with 16 million colors and shift each color slightly to match it's nearest neighbor on a pallette of only 256(maybe less?) colors you can significantly reduce the filesize without really changing the look of the .bmp too much? I've seen it explained in great detail on these forums and always figured the technical info was there if I ever truly needed it, but in practice I've always just experimented with the different formats until I found whatever seemed to work best for whatever I was attempting to do.For scenery textures (texturing objects that I've made in Gmax) I actually prefer to use the "Extended 256 colour" option in DXTBmp. It seems to look a little better in the sim than DXT1 and apparently allows the full spectrum of grays on the alpha. It produces a .bmp of approx twice the filesize of DXT1, however still significantly reduced over 32 bit 888-8. For some reason DXTBmp seems to prefer 10 mip levels when using the Extended 256 option, whereas with DXT1 it only saves 8 for any given 512x512 .bmp, for whatever that's worth.Jim

Share this post


Link to post
Share on other sites

Hi,Yes, you have things essentially correct. I do not know the mechanics of the DXT compression process - it might be as simple as changing 2,000 bytes of information saying "make this pixel white" 2,000 times to a few bytes of information saying "make the next 2,000 pixels white". I don't think so though, since DXT files are fixed in size, no matter the complexity (unlike JPG files which vary). I do know that certain images when compressed change their colors significantly, unfortunately.The basic idea of bit/pixel is that the larger number the bit/pixel is, the more colors you can describe for that pixel. In the DXT1 alpha channel, there is only one bit available (I said 2 in error). So it can be 0 (white) or 1 (black). No other colors are possible. If you have 8 bits per pixel, then you have 256 choices (00000000 to 11111111). Each of those 8 places will hold info for 2, 4, 8, 16, 32, 64, 128, and 256 colors respectively. And so on up to millions of colors per pixel.Hope this helps,--Tom GibsonCal Classic Propliner Page: http://www.calclassic.comFreeflight Design Shop: http://www.freeflightdesign.comDrop by! ___x_x_(")_x_x___

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