Converting DDS textures to DXT3 for use in FS9
Posted: 10 Apr 2020, 08:35
OK recently there have been a few posts about FSX/P3D paints being made available for FS9.
This is a tutorial to allow you to do it yourself if the painter is unable to do it.
Firstly, unlike a lot of processes it is quite simple. I have said many times that if somebody who is as inept at using a paint package like me can do this then anybody can.
Secondly, whilst only need two programs to do this process you will gain an understanding of each step which may help you to find other ways of achieving what you want.
EXPLANATIONS
Firstly, you can't increase the quality of a graphic. When it is compressed you will lose some details so always use the best quality graphic (1.e. the biggest sized one).
Secondly be aware that in quite a few cases alpha channels for FSX/P3D models are different to their FS9 counterparts so get into the habit of assuming that there are different and always work using saved FS9 alphas.
PRE-REQUISITES
The two programs you need are DXTBmp and MS Paint, which is part of the Windows OS since 7 (I believe).
In case you don't already have it DXTBmp you can get from http://www.mwgfx.co.uk/ and you also need to install the mwgfx.dll package which you can get from the same site.
If you don't use Paint, you can simply use the windows tool bar search. The newer Paint 3D can't be used for this, only the original.
PREPARATION
1. Find a suitable package.
For this example I will be using jetrange's 'JYAI C-130H 169th AS USAF.zip' downloadable from the Hangar. Download your package and unzip it wherever you like, either a temp location or a final resting place.
2. Make sure that DXTBmp has the following items under 'Prefs' ticked :-
Display Toolbars
Display Alpha Cahnnel
3. In MS Paint hit the resize option and ensure that the 'Maintain aspect ratio' option is ticked and that 'Percentage' is selected.
4. Finally create a folder somewhere safe where you can keep alphas. The reason will become apparent.
STAGE 1
1. Looking at your package identify how many different aircraft you are converting. Use the fltsim entry text file in the package to be sure which ones you are using. It maybe that there are several compatible models in the same folder that all use the bmp name, for example aircraft using the C-130H_closed and C-130H_open models all use the same bmp name - JYAI_C-130J_t.bmp.
2. For each different aircraft type you need to load any FS9 paint of that type into DXTBmp. In this specific case any paint you have installed that uses the JYAI C-130H_closed model so load any JYAI_C-130J_t.bmp from the appropriate folder you have installed.
3. You can see in the Alpha Channel window that there is a small grey square in the upper left corner. Export the Alpha, either using the 'Alpha>Export Alpha Channel' menu item or corresponding button in the Alpha Channel window.
4. Save it to the folder you created before with any relevant name you like and can remember. I chose 'JYAI_C-139H_alpha.bmp'
*TIP* You will start to build up a library of alphas so that in future steps 2 and 3 of this stage can be skipped.
STAGE 2
1. Load the dds scheme you want to convert.
*TIP* DXTBmp supports drag and drop so use it as it remembers the path. Useful when saving.
2. There are 3 things that are immediately obvious as to why you can't use the texture at the moment. The saved format, the size is too big for FS9 and the fact that it is upside down. This process corrects all 3.
3. Using either the menu (Image>Flip Image And Alpha) or the button at the bottom of the main window, flip the image. You will now see that the grey square in the Alpha Channel window has moved from bottom left to top left.
4. Save the image as a 32bit image (File>Save As>Extended Bitmap and set type to Extended 32 Bit 888-8)
*TIP* The file will be the same folder as the original dds file and is over 21mb in size, if you have include mipmaps set. As said before the quality does not increase to 32 bit but you guarantee that you do not lose quality. 32 bit is 24 bit texture with an 8 bit alpha.
5. *TIP* Copy your saved file to your desktop (Purely to save time as MS Paint doesn't remember folders that graphics are loaded from.)
STAGE 3
1. You should now have an open Paint window with the scheme loaded and the right way up.
2. Hit the resize option and set either the Horizontal or Vertical percentage to 50, the aspect ratio option automatically alters the other one. Now size is fixed.
3. In paint 'File>Save_as>BMP Picture' and save to desktop to replace the unaltered copy.
*Note* that the type is a 24 bit BMP as Paint doesn't handle Alphas. It will be 3 mb in size.
STAGE 4
1. Copy the amended texture back to the folder with the dds texture and replace the 21mb file with the 3mb one.
2. Load the 3mb file into DXTBmp.
*TIP* Notice that the Alpha Channel window is completely white to prove that Paint loses the alpha channel.
3. Either by using the 'Alpha>Import Alpha Channel' menu or the appropriate button in the Alpha Channel window select the correct FS9 saved alpha bmp to be added to the scheme.
4. (LEARNING STEP) You will now see that the grey square has returned in the alpha channel and if you save now as a 32 bit bmp you will either find that it is 5.3 MB if you are saving with bitmaps or 4 mb if not.
5. Save in your final format. Quite often people use DXT3 with bitmaps (File>Save As>Extended Bitmap> DXT3) and overwriting what you have already got saved there and it will be 1.3 mb in size.
USEFUL TIPS FOR A COMPLETE PACK
If you are converting the entire sqn at the same time. Some time/key stroke saving can be achieved by loading and doing all the aircraft stage by stage. This is because DXTBmp remembers the folder a graphic was loaded from and also the last save setting, so converting all to 32 bit and saving all finally to DXT3 is quicker. Also it remembers the last folder that an alpha was saved to also the last alpha loaded.
Hopefully, you can now happily convert textures and have learned a bit about the process at the same time.
This is a tutorial to allow you to do it yourself if the painter is unable to do it.
Firstly, unlike a lot of processes it is quite simple. I have said many times that if somebody who is as inept at using a paint package like me can do this then anybody can.
Secondly, whilst only need two programs to do this process you will gain an understanding of each step which may help you to find other ways of achieving what you want.
EXPLANATIONS
Firstly, you can't increase the quality of a graphic. When it is compressed you will lose some details so always use the best quality graphic (1.e. the biggest sized one).
Secondly be aware that in quite a few cases alpha channels for FSX/P3D models are different to their FS9 counterparts so get into the habit of assuming that there are different and always work using saved FS9 alphas.
PRE-REQUISITES
The two programs you need are DXTBmp and MS Paint, which is part of the Windows OS since 7 (I believe).
In case you don't already have it DXTBmp you can get from http://www.mwgfx.co.uk/ and you also need to install the mwgfx.dll package which you can get from the same site.
If you don't use Paint, you can simply use the windows tool bar search. The newer Paint 3D can't be used for this, only the original.
PREPARATION
1. Find a suitable package.
For this example I will be using jetrange's 'JYAI C-130H 169th AS USAF.zip' downloadable from the Hangar. Download your package and unzip it wherever you like, either a temp location or a final resting place.
2. Make sure that DXTBmp has the following items under 'Prefs' ticked :-
Display Toolbars
Display Alpha Cahnnel
3. In MS Paint hit the resize option and ensure that the 'Maintain aspect ratio' option is ticked and that 'Percentage' is selected.
4. Finally create a folder somewhere safe where you can keep alphas. The reason will become apparent.
STAGE 1
1. Looking at your package identify how many different aircraft you are converting. Use the fltsim entry text file in the package to be sure which ones you are using. It maybe that there are several compatible models in the same folder that all use the bmp name, for example aircraft using the C-130H_closed and C-130H_open models all use the same bmp name - JYAI_C-130J_t.bmp.
2. For each different aircraft type you need to load any FS9 paint of that type into DXTBmp. In this specific case any paint you have installed that uses the JYAI C-130H_closed model so load any JYAI_C-130J_t.bmp from the appropriate folder you have installed.
3. You can see in the Alpha Channel window that there is a small grey square in the upper left corner. Export the Alpha, either using the 'Alpha>Export Alpha Channel' menu item or corresponding button in the Alpha Channel window.
4. Save it to the folder you created before with any relevant name you like and can remember. I chose 'JYAI_C-139H_alpha.bmp'
*TIP* You will start to build up a library of alphas so that in future steps 2 and 3 of this stage can be skipped.
STAGE 2
1. Load the dds scheme you want to convert.
*TIP* DXTBmp supports drag and drop so use it as it remembers the path. Useful when saving.
2. There are 3 things that are immediately obvious as to why you can't use the texture at the moment. The saved format, the size is too big for FS9 and the fact that it is upside down. This process corrects all 3.
3. Using either the menu (Image>Flip Image And Alpha) or the button at the bottom of the main window, flip the image. You will now see that the grey square in the Alpha Channel window has moved from bottom left to top left.
4. Save the image as a 32bit image (File>Save As>Extended Bitmap and set type to Extended 32 Bit 888-8)
*TIP* The file will be the same folder as the original dds file and is over 21mb in size, if you have include mipmaps set. As said before the quality does not increase to 32 bit but you guarantee that you do not lose quality. 32 bit is 24 bit texture with an 8 bit alpha.
5. *TIP* Copy your saved file to your desktop (Purely to save time as MS Paint doesn't remember folders that graphics are loaded from.)
STAGE 3
1. You should now have an open Paint window with the scheme loaded and the right way up.
2. Hit the resize option and set either the Horizontal or Vertical percentage to 50, the aspect ratio option automatically alters the other one. Now size is fixed.
3. In paint 'File>Save_as>BMP Picture' and save to desktop to replace the unaltered copy.
*Note* that the type is a 24 bit BMP as Paint doesn't handle Alphas. It will be 3 mb in size.
STAGE 4
1. Copy the amended texture back to the folder with the dds texture and replace the 21mb file with the 3mb one.
2. Load the 3mb file into DXTBmp.
*TIP* Notice that the Alpha Channel window is completely white to prove that Paint loses the alpha channel.
3. Either by using the 'Alpha>Import Alpha Channel' menu or the appropriate button in the Alpha Channel window select the correct FS9 saved alpha bmp to be added to the scheme.
4. (LEARNING STEP) You will now see that the grey square has returned in the alpha channel and if you save now as a 32 bit bmp you will either find that it is 5.3 MB if you are saving with bitmaps or 4 mb if not.
5. Save in your final format. Quite often people use DXT3 with bitmaps (File>Save As>Extended Bitmap> DXT3) and overwriting what you have already got saved there and it will be 1.3 mb in size.
USEFUL TIPS FOR A COMPLETE PACK
If you are converting the entire sqn at the same time. Some time/key stroke saving can be achieved by loading and doing all the aircraft stage by stage. This is because DXTBmp remembers the folder a graphic was loaded from and also the last save setting, so converting all to 32 bit and saving all finally to DXT3 is quicker. Also it remembers the last folder that an alpha was saved to also the last alpha loaded.
Hopefully, you can now happily convert textures and have learned a bit about the process at the same time.