The website and forum will be intermittently unavailable while we're making some security updates.
File uploads to the download hangar are also disabled until further notice.

Converting DDS textures to DXT3 for use in FS9

The Tutorials forum section is the place where you can learn the various techniques that go into the creation of AI traffic packages.
User avatar
Firebird
MAIW Admin
MAIW Admin
Posts: 12112
Joined: 11 Aug 2006, 21:04
Version: FS9
Location: EGLL

Converting DDS textures to DXT3 for use in FS9

Post by Firebird »

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.
Steve
_______________________________________________________
Image
Quid Si Coelum Ruat
_______________________________________________________
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: Converting DDS textures to DXT3 for use in FS9

Post by John Young »

Wouldn't it be far easier if FSX painters also saved their finished 24 bit file as a .Dxt3 texture to create the choice. Process:

- open the 24 bit paint in Dxtbmp
- add the alpha
- save as .DXT3.bmp

Takes 25 seconds (just timed it), the image is not degraded through double compression and multiple users don't need to do the work.

FS9 painters can do the same thing for FSX users so long as the image and alpha are flipped vertically before saving as Dxt5.

John
danhult
Second Lieutenant
Second Lieutenant
Posts: 34
Joined: 24 Mar 2013, 19:27
Version: FSX

Re: Converting DDS textures to DXT3 for use in FS9

Post by danhult »

John Young wrote: 10 Apr 2020, 11:36 Wouldn't it be far easier if FSX painters also saved their finished 24 bit file as a .Dxt3 texture to create the choice. Process:

- open the 24 bit paint in Dxtbmp
- add the alpha
- save as .DXT3.bmp

Takes 25 seconds (just timed it), the image is not degraded through double compression and multiple users don't need to do the work.

FS9 painters can do the same thing for FSX users so long as the image and alpha are flipped vertically before saving as Dxt5.

John
Takes less time than that if you do them both at once. Not sure everyone else's process, but I always to bmps first then convert to DDS. My process is:
1. export from GIMP to 24-bit bmp
2. move bmp to correct folder and rename as required
3. Load on Martin's AI Aircraft Editor (absolutely indispensable) and check how it looks
4. Repeat steps 1 through 3 until it looks good (usually this takes several iterations for me).
5. Open in Dxtbmp, add alpha, and save as DXT5
6. Flip image and alpha, and save as DDS.
7. When all textures are done, copy all the texture folders to your working folder for the package (into duplicate FS9 and FSX folders) then delete the bmps from the FSX folders and the DDSs from the FS9 folders.

I also do my flightplans as FS9 then convert to FSX, so it is just as easy to include both traffic files--at least for me. But I'm old school and use text files and TTools to do my flightplans. If you follow a similar process, you can make your packages FS9 compatible with more like 5 extra seconds per repaint. Just my two cents.
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: Converting DDS textures to DXT3 for use in FS9

Post by John Young »

Yes indeed, it's even quicker (about 12 seconds) if the two texture types are output by the painter from the same loaded master, one after the other.

Users doing the conversion from a texture, and accepting the degredation, can load either format straight into DxtBmp, flip the image and the alpha as necessary and save in the new format. MsPaint, or other paint program, is only needed if the alpha, on rare occasions, needs to be lighter or darker.

John
User avatar
Firebird
MAIW Admin
MAIW Admin
Posts: 12112
Joined: 11 Aug 2006, 21:04
Version: FS9
Location: EGLL

Re: Converting DDS textures to DXT3 for use in FS9

Post by Firebird »

I can see how the quickest thing for painters would be to upload a 24bit image and allow everybody to download the same pack and convert as required. The problem is that you will inevitably find some that will say 'how do you convert for xxx?'.

So what is the least amount of overall trouble? is if painters supply all the required formats in one pack,or supply just just the 24bit texture,and a standard set of follow-me instructions for each sim?

The other question is is it best to supply the alpha for each version as well?

What is the thoughts of you guys?
Steve
_______________________________________________________
Image
Quid Si Coelum Ruat
_______________________________________________________
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: Converting DDS textures to DXT3 for use in FS9

Post by John Young »

No Steve, the easiest solution is as outlined by danhult and myself. It's the very simplest of jobs for painters to output both .Dxt3 (Fs9) and Dxt5 (FSX/P3Dv4) textures from the same master - in literally just seconds. A number of painters here do that already. That's far better than have the population of users wanting to use the texture to have to convert it themselves from the 24 bit master.

Don't get hung up on alpha channels. 99.5% of the time they are the same for FS9 and FSX/P3Dv4, at least in my models. The alpha will be embedded in the paint (texture) by the painter, so no conversion is required by the user if they provide both formats.

The next best solution is for the painter to include the 24 bit master (not the layered file) in the upload along with the alpha, as you suggest. It creates more work and learning overall, but the quality of the image is retained.

The worst solution is to convert an already compressed texture and compress it again when it's saved to the new format. It's not just that some of the detail is diminished the overall texture becomes more fuzzy.

John
User avatar
Firebird
MAIW Admin
MAIW Admin
Posts: 12112
Joined: 11 Aug 2006, 21:04
Version: FS9
Location: EGLL

Re: Converting DDS textures to DXT3 for use in FS9

Post by Firebird »

OK, So is it something that all painters can implement from now on?
Steve
_______________________________________________________
Image
Quid Si Coelum Ruat
_______________________________________________________
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: Converting DDS textures to DXT3 for use in FS9

Post by John Young »

Can't force them to, but if I can spend a good few hundred hours or more making 3 versions of models and corresponding paints, then an added 10 seconds per repaint for dual format output doesn't seem unreasonable does it? What do the painters think?

John
User avatar
jimrodger
Lieutenant Colonel
Lieutenant Colonel
Posts: 1489
Joined: 22 Apr 2008, 13:34
Version: FS9
Location: EGQK (RIP)

Re: Converting DDS textures to DXT3 for use in FS9

Post by jimrodger »

John Young wrote:Can't force them to, but if I can spend a good few hundred hours or more making 3 versions of models and corresponding paints, then an added 10 seconds per repaint for dual format output doesn't seem unreasonable does it? What do the painters think?

John
Not problem for me, always try to dual format anyway


Jim

Sent from my SM-A405FN using Tapatalk

"When all else fails, and your AI doesn't show up...... check the AI slider.......DOH!!!!"
Delboy99
Captain
Captain
Posts: 216
Joined: 14 Mar 2009, 20:33
Version: FSX

Re: Converting DDS textures to DXT3 for use in FS9

Post by Delboy99 »

I can do FS9 versions of my repaints if people want them. As John says it doesn't take long to do them. I'll start by converting the Hercules repaints.

Del
User avatar
Firebird
MAIW Admin
MAIW Admin
Posts: 12112
Joined: 11 Aug 2006, 21:04
Version: FS9
Location: EGLL

Re: Converting DDS textures to DXT3 for use in FS9

Post by Firebird »

I understand that many producers may have moved on from FS9 or even joined the hobby after FS9 was supplanted.

There are many that for one reason or another haven't moved on from FS9 and if painters could easily produce DXT3 versions of their work it would be appreciated. I don't know how many convert the schemes themselves but it is obvious that many others want to enjoy the work that has been released by the community and would really, really appreciate it.
Steve
_______________________________________________________
Image
Quid Si Coelum Ruat
_______________________________________________________
User avatar
Firebird
MAIW Admin
MAIW Admin
Posts: 12112
Joined: 11 Aug 2006, 21:04
Version: FS9
Location: EGLL

Re: Converting DDS textures to DXT3 for use in FS9

Post by Firebird »

I am hoping that the tutorial will not be needed for MAIW released stuff in the future, but there are plenty of other stuff out there that people may want to convert.

Although, as John says, he doesn't use different alphas the tutorial is aimed in a general way and getting used to people not expecting it to work automatically. A very good example here is the popular range of FAIB models. Their FSX alphas are geared towards what you can do in FSX rather than compatibility.
Steve
_______________________________________________________
Image
Quid Si Coelum Ruat
_______________________________________________________
Bosshogg
First Lieutenant
First Lieutenant
Posts: 122
Joined: 14 Oct 2008, 13:57
Version: FS9
Location: Kill Devil Hills, NC

Re: Converting DDS textures to DXT3 for use in FS9

Post by Bosshogg »

Does this process include the prop textures also? I successfully converted the textures for FS9 but tried to use existing fs9 prop textures and got spinning discs. I know I can't use the DDS textures so what is the answer?

Thanks
Image
User avatar
Firebird
MAIW Admin
MAIW Admin
Posts: 12112
Joined: 11 Aug 2006, 21:04
Version: FS9
Location: EGLL

Re: Converting DDS textures to DXT3 for use in FS9

Post by Firebird »

A good question.
What I have done is look at the prop texture. What colour is it? Do you have an existing fs9 one that has the same colours.
If the answer is yes, then I suggest not re-inventing the wheel and just copy them into the new scheme folders.

OK now there are two things here. Firstly if you load the dds texture from JYs c-130 into DXTBmp and then load an FS9 prop texture you will notice that the prop seemingly moves downwards a touch. This is because the graphic is slightly off centre and it proves that you still need to flip the image and alpha in exactly the same way as the main texture.
Secondly, due to the nature of the reduced fine detail a simple flip and save as DXT3 will leave you with a BMP image that is the same size ass the DDS image.

Now I went back and looked at the specific 169th AS package. The reason that the conversion is not working is simply that the prop texture is named wrongly, at least as far as fs9 goes. The texture that the fs9 C-130H model looks for is 'C-130H_props.bmp' and not 'C-130J_props.bmp'.

So I think in your specific case simply renaming the conversions you made will solve your issue.
Steve
_______________________________________________________
Image
Quid Si Coelum Ruat
_______________________________________________________
Bosshogg
First Lieutenant
First Lieutenant
Posts: 122
Joined: 14 Oct 2008, 13:57
Version: FS9
Location: Kill Devil Hills, NC

Re: Converting DDS textures to DXT3 for use in FS9

Post by Bosshogg »

Thank you I will try that.
Image
Viper810
Second Lieutenant
Second Lieutenant
Posts: 21
Joined: 11 Apr 2021, 19:11
Version: FS9
Location: 4,6 Nm from ETUR
Contact:

Re: Converting DDS textures to DXT3 for use in FS9

Post by Viper810 »

I tried to convert a FSX repaint to FS9 with DXTBmp.

1. Load the repaint
2. Load the alpha
3. Flip both
4. Save as DXT3

It works but ingame the plane became transparent. What did i wrong?

Edit: I found the problem.
System specs

I9-9900K
MSI RTX 2080
16 GB RAM
User avatar
Firebird
MAIW Admin
MAIW Admin
Posts: 12112
Joined: 11 Aug 2006, 21:04
Version: FS9
Location: EGLL

Re: Converting DDS textures to DXT3 for use in FS9

Post by Firebird »

The alpha that you loaded, was it an FSX or an FS9 alpha?
Steve
_______________________________________________________
Image
Quid Si Coelum Ruat
_______________________________________________________
Viper810
Second Lieutenant
Second Lieutenant
Posts: 21
Joined: 11 Apr 2021, 19:11
Version: FS9
Location: 4,6 Nm from ETUR
Contact:

Re: Converting DDS textures to DXT3 for use in FS9

Post by Viper810 »

Firebird wrote: 20 Jul 2021, 06:20 The alpha that you loaded, was it an FSX or an FS9 alpha?
The simplest way to do it.

1. Load the repaint in DXTBmp
2. Press Create new Alpha Channel and press yes. (if you dont do this you will have a transparant airplane ingame)
3. Flip the repaint by click on Image -> Flip Image
4. Resize it to 1024 x 1024 if necessary in paint by double click on the repaint in DXTBmp and resize by 50.
5. Close Paint and press yes for save.
6. Save the repaint in DXTBmp by click Save as -> Extended bitmap -> and then save as DXT3. (Ofcourse don't forget to delete the DDS file)

I did some conversions this way without any problems. You have nothing to do with the Alpha.
System specs

I9-9900K
MSI RTX 2080
16 GB RAM
User avatar
Firebird
MAIW Admin
MAIW Admin
Posts: 12112
Joined: 11 Aug 2006, 21:04
Version: FS9
Location: EGLL

Re: Converting DDS textures to DXT3 for use in FS9

Post by Firebird »

You are absolutely correct in a lot of cases.
The trouble is when there are alphas that are not uniform, i.e. areas that are different from the main. There are also cases where the alphas for FS9 model textures are different from the alphas for FSX model textures. FAIB aircraft being the prime example here.

In these cases you need to be able to load an existing FS9 bmp in DXTBmp, extract the alpha, and then apply it to any converted textures from the dds format. This is the sole reason for me including the info.

Alphas are not going to cause issues a lot of the time but you need to be aware of when they do and how to get over the issue.
Steve
_______________________________________________________
Image
Quid Si Coelum Ruat
_______________________________________________________
mage
Second Lieutenant
Second Lieutenant
Posts: 50
Joined: 28 Dec 2013, 13:30
Version: FS9

Re: Converting DDS textures to DXT3 for use in FS9

Post by mage »

Sorry I missed this thread.

After installing this tool on Flightsim.com

https://www.flightsim.com/vbfs/fslib.ph ... fid=214974

You will find that converting DDS to BMP/DXT is drag & drop.

You create a desktop shortcut to the converter CMD file, drag a folder of DDS textures onto the shortcut, and every DDS in there will be converted.

You need to check that lightmaps are converting properly. There are many different ways to implement lightmaps (separate files or in the day texture) and the converter can;'t generally deal with data it can't find.

I designed it for civilian aircraft and so those models are covered by masking files in a small library held with the command file. These masks will give you FS9 style alpha channels for day textures. With FAIB, this means that aerials and domes are preserved.

The "masks" are merely FS9 alpha channels with holes poked in them where FSX alpha information is required to show through. If you don't get lightmaps coming from this accurately it is possible that there is no similar template for the lightmaps. For FAIB, TFS, etc, there are similar lightmap templates that allow windows configurations to show through. Problems here come if there is no lightmap available, in which case the windows are replaced with white bars where darkness and occasional windows ought to be.

For the aircraft with files in the "library of masks" (sounds like a book title...) these other textures will generally convert fine. But it's always worth checking. Day textures without alphas will convert fine whether or not there's a set of masks available.

People can make their own. It's extensible.

Thanks also goes to Swag, who helped make the tool easier to use.

This post might not help anybody now, but we all know how the Internet becomes a reference library.
Post Reply