This forum is in read-only mode for archive purposes, please use our new forum at https://community.justflight.com
Forum Home Forum Home > Just Flight Products > Traffic 360
  New Posts New Posts RSS Feed - AI aircraft textures
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

AI aircraft textures

 Post Reply Post Reply Page  12>
Author
Message Reverse Sort Order
pomak249 View Drop Down
Check-In Staff
Check-In Staff
Avatar

Joined: 15 Sep 2014
Location: Cambs UK
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote pomak249 Quote  Post ReplyReply Direct Link To This Post Topic: AI aircraft textures
    Posted: 24 Jul 2017 at 11:00am
Isnt this something the guys at JF could provide for us as a 'patch'???? They seem to have abandoned this product completely??
Back to Top
freddy View Drop Down
Chief Pilot
Chief Pilot
Avatar

Joined: 29 Nov 2008
Location: Melbourne, Aust
Points: 1339
Post Options Post Options   Thanks (0) Thanks(0)   Quote freddy Quote  Post ReplyReply Direct Link To This Post Posted: 08 Jun 2017 at 6:38am
Originally posted by Soaranden Soaranden wrote:

... Just remember that all of the BMP files that came with the aircraft will be deleted. This would include any non-texture bitmaps that may have been included with the aircraft.

... of which I have many.

I've done plenty of repaints, and I store the repaint's .BMP file that I created, along with the subsequent "compiled" textures, in the same folder with the aircraft (and also in a backup folder elsewhere too).  So, yes, I'd be mindful that any modified batch file which recurses folders to delete the .BMP's would systematically delete those (wanted to be kept) .BMP's as well.

Nevertheless, it's good you've mentioned that here, in case others who may be planning to do this task may not have thought of it ...

Back to Top
Soaranden View Drop Down
P1
P1
Avatar

Joined: 14 Feb 2009
Points: 627
Post Options Post Options   Thanks (0) Thanks(0)   Quote Soaranden Quote  Post ReplyReply Direct Link To This Post Posted: 08 Jun 2017 at 5:10am
Originally posted by freddy freddy wrote:

... that's what backups are for.

I'd first take a backup copy of the entire "\SimObjects\TrafficX" folder.

Then I'd give it a go.  No fear.  I've worked in IT long enough to know that it should be OK; it should work as published, using that -r switch (along with the others).  But, that said, if it should fail, then I will of course have that backed up folder. Restoring that back in place before subsequently reverting to doing one aircraft type at a time.




freddy,

As long as a person is being safe by running the batch file on a backup folder (or by, as you suggest, running the batch file on the original after having made a backup of the original), there is an easy way to modify the batch file so that it deletes all remaining post-conversion BMP textures from all sub folders. This can be done easily be adding the /s switch to the del command. The /s switch makes the del command recursive, and the switch has been available to use with the del command since Windows 7. Here is my modified batch file:

     @echo Convert all textures to .dds
     imagetool -batch -nogui -dxt5 -dds -nodither -r *.bmp
     del /s *.bmp

I ran a test of the batch file by doing the following:

1. Since I don't have any aircraft in my SimObjects folder that contain bmp textures, I downloaded a freeware aircraft that contains bmp textures.

2. I unzipped the downloaded aircraft, and I copied the aircraft's folder (which contained all of its sub folders) into my "Convert BMP Textures to DDS" working folder.

3. I modified the original batch file to enable recursion of the delete command (as shown above), and I named the modified batch file "Convert BMP to DDS with Recursive BMP Delete"

4. With my "Convert BMP Textures to DDS" working folder now containing the original (and now unnecessary) batch file, the modified batch file, ImageTool (which I still haven't added to my path), and the aircraft's folder, I ran the modified batch file.

Inspection of all of the aircraft's folders showed that all BMP textures had been converted to DDS, and the recursive del switch had caused the batch file to delete the BMP files from all of the aircraft's sub folders. Just remember that all of the BMP files that came with the aircraft will be deleted. This would include any non-texture bitmaps that may have been included with the aircraft.

Incidental Note
:

Since the batch file converts the BMP textures to DXT5-type DDS textures, ImageTool, by default, creates MIPS within the DDS textures. MIPS are desirable for the slight performance boost that they provide.

Dan
Back to Top
freddy View Drop Down
Chief Pilot
Chief Pilot
Avatar

Joined: 29 Nov 2008
Location: Melbourne, Aust
Points: 1339
Post Options Post Options   Thanks (0) Thanks(0)   Quote freddy Quote  Post ReplyReply Direct Link To This Post Posted: 07 Jun 2017 at 12:22am
... that's what backups are for.

I'd first take a backup copy of the entire "\SimObjects\TrafficX" folder.

Then I'd give it a go.  No fear.  I've worked in IT long enough to know that it should be OK; it should work as published, using that -r switch (along with the others).  But, that said, if it should fail, then I will of course have that backed up folder. Restoring that back in place before subsequently reverting to doing one aircraft type at a time.


Back to Top
RayM View Drop Down
First Officer
First Officer
Avatar

Joined: 15 Nov 2012
Location: Luton, England
Points: 384
Post Options Post Options   Thanks (0) Thanks(0)   Quote RayM Quote  Post ReplyReply Direct Link To This Post Posted: 06 Jun 2017 at 8:29am
Originally posted by freddy freddy wrote:


So, it looks like Ray's test was a success. .... to make a backup copy of the appropriate Traffic X or Traffic 360 aircraft folders, before then running the batch file over them.  It will modify all the texture files, in all the folders; and all in one sweep....

You would be a braver man than me if you did the whole set of folders in one sweep of the batch file - I think I would do one aircraft type at a time? I did a count of types that needed attention which came to 54 different aircraft types that have .bmp textures but I would prefer to go a bit steady on this conversion.
A long time FSXA and Traffic X user
Back to Top
freddy View Drop Down
Chief Pilot
Chief Pilot
Avatar

Joined: 29 Nov 2008
Location: Melbourne, Aust
Points: 1339
Post Options Post Options   Thanks (0) Thanks(0)   Quote freddy Quote  Post ReplyReply Direct Link To This Post Posted: 06 Jun 2017 at 12:04am
So, it looks like Ray's test was a success.  The batch file, with all the switches, will recurse through the folders and make the change to all the textures.
 
So, it seems that it would not be all that hard to make a backup copy of the appropriate Traffic X or Traffic 360 aircraft folders, before then running the batch file over them.  It will modify all the texture files, in all the folders; and all in one sweep.  The final step would then be to simply remove the (now redundant) .BMP files ... which, can be done pretty easily (if you're savvy enough, or have the right tools, you can remove all of those with one command).

I do expect that this will indeed have some impact on frames in built-up, dense areas.  As for how much, it is important to remember with Flight Sim that mileage does vary on different machines. What's good on one machine, may not necessarily be as good on another.  But, anything like this which should help the sim to run better, in any way, is something that's worth looking in to and doing.

I think I will be trying to find time to make this change ... and soon.
 
---------------------------------
 
Wow, we haven't had a 2-page thread in this forum in a long long time ... and it turns out to be a really good one with some excellent advice and tips.  Thanks go to electric man for raising this topic.  Although, after seeing the direction this thread took, it's a bummer that you did it all manually, electric man, one texture at a time.
 

Back to Top
freddy View Drop Down
Chief Pilot
Chief Pilot
Avatar

Joined: 29 Nov 2008
Location: Melbourne, Aust
Points: 1339
Post Options Post Options   Thanks (0) Thanks(0)   Quote freddy Quote  Post ReplyReply Direct Link To This Post Posted: 05 Jun 2017 at 11:40pm
Originally posted by Soaranden Soaranden wrote:

Running Imagetool with the -r switch alone, would not be the same as running Imagetool with the switches in my batch file (which I know you understand, freddy, but I just wanted to make this clear to other forum members).

Ahh yes, a good point.
Back to Top
Soaranden View Drop Down
P1
P1
Avatar

Joined: 14 Feb 2009
Points: 627
Post Options Post Options   Thanks (0) Thanks(0)   Quote Soaranden Quote  Post ReplyReply Direct Link To This Post Posted: 05 Jun 2017 at 8:08pm
Originally posted by RayM RayM wrote:

The .bmp file does not get removed as the batch file instruction "del *.bmp" does not form part of the recursive action of the 'imagetool' program...


That's an important point. The batch file would only delete each and every .bmp file if the batch file and the .bmp files resided in the same folder. When the batch file is run with the intention of affecting multiple folders, some people may find it reassuring to know that .bmp files remain for manual removal (even when "del *.bmp" has been left in the batch file).
Back to Top
Soaranden View Drop Down
P1
P1
Avatar

Joined: 14 Feb 2009
Points: 627
Post Options Post Options   Thanks (0) Thanks(0)   Quote Soaranden Quote  Post ReplyReply Direct Link To This Post Posted: 05 Jun 2017 at 12:44pm
Originally posted by freddy freddy wrote:

If I read the HELP file correctly ... and after doing some Googling ... it appears that provided Imagetool is in the path, you can run it from anywhere (there's probably no need to create a TEMP folder to do the work) ... AND ... using the -r switch, it should be able to go through the input folders, one by one, and do the conversion (no need to copy the files and use a text editor etc to work out where to copy them back to later).  But, I could be wrong ... let's see what Ray's tests reveal.
 



Hi, freddy,

Running Imagetool with the -r switch alone, would not be the same as running Imagetool with the switches in my batch file (which I know you understand, freddy, but I just wanted to make this clear to other forum members). I suggest putting the batch file in the path. Just make sure that you constrain the path so that the batch file affects only the aircraft textures that you want to convert.

Dan
Back to Top
RayM View Drop Down
First Officer
First Officer
Avatar

Joined: 15 Nov 2012
Location: Luton, England
Points: 384
Post Options Post Options   Thanks (0) Thanks(0)   Quote RayM Quote  Post ReplyReply Direct Link To This Post Posted: 05 Jun 2017 at 9:15am
OK, so I have done a small test using the Batch file as supplied by Dan.

From Traffic X, there is a C152 which has 2 texture FOLDERS (texture and texture.2). I copied these FOLDERS to my new conversion folder which contains "imagetool.exe" and the batch file. Each of these folders contains a file "JFAIC152_t.bmp" which are, of course, NOT the same file - each has a different image.

Double-clicked on the batch file which finished 'in a flash'.

Inspection of the 2 copied folders shows that each one now contains a file "JFAIC152_t.dds". The .bmp file does not get removed as the batch file instruction "del *.bmp" does not form part of the recursive action of the 'imagetool' program but this is no problem.

Copied the new .dds files over the the original folders in FSX and deleted the .bmp files therein also. So the C152 now only has DDS textures.

Created flightplans using AIFP to show C152 AI flights. Both aircraft show up and seem to look as before.

Obviously, I cannot comment on whether I have got a 'speeding up' effect but this conversion technique seems to work - I DO NOT GIVE ANY GUARANTEES SO BACKUPS SHOULD BE MADE BEFORE STARTING.

It looks as if this technique can be used to convert one aircraft at a time so I will try to do this later on and report.

Thanks to Dan for his assistance.
A long time FSXA and Traffic X user
Back to Top
RayM View Drop Down
First Officer
First Officer
Avatar

Joined: 15 Nov 2012
Location: Luton, England
Points: 384
Post Options Post Options   Thanks (0) Thanks(0)   Quote RayM Quote  Post ReplyReply Direct Link To This Post Posted: 05 Jun 2017 at 7:09am
Originally posted by freddy freddy wrote:


... let's see what Ray's tests reveal.
 


No pressure there then!   
A long time FSXA and Traffic X user
Back to Top
freddy View Drop Down
Chief Pilot
Chief Pilot
Avatar

Joined: 29 Nov 2008
Location: Melbourne, Aust
Points: 1339
Post Options Post Options   Thanks (0) Thanks(0)   Quote freddy Quote  Post ReplyReply Direct Link To This Post Posted: 05 Jun 2017 at 2:57am
If I read the HELP file correctly ... and after doing some Googling ... it appears that provided Imagetool is in the path, you can run it from anywhere (there's probably no need to create a TEMP folder to do the work) ... AND ... using the -r switch, it should be able to go through the input folders, one by one, and do the conversion (no need to copy the files and use a text editor etc to work out where to copy them back to later).  But, I could be wrong ... let's see what Ray's tests reveal.
 

Back to Top
RayM View Drop Down
First Officer
First Officer
Avatar

Joined: 15 Nov 2012
Location: Luton, England
Points: 384
Post Options Post Options   Thanks (0) Thanks(0)   Quote RayM Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jun 2017 at 4:06pm
Thanks for your response.

I will do some tests based upon my current thinking but making backups before I start.
A long time FSXA and Traffic X user
Back to Top
Soaranden View Drop Down
P1
P1
Avatar

Joined: 14 Feb 2009
Points: 627
Post Options Post Options   Thanks (0) Thanks(0)   Quote Soaranden Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jun 2017 at 2:22pm
Originally posted by RayM RayM wrote:

When I look thru the texture folders for a particular aircraft, each the textures which go with the aircraft variants all have the same file name, e.g. JFAIBNI_t.bmp, so it looked to me that it was not possible to do a batch conversion on all texture files for one aircraft. (If they all have the same name, you will end up with only one file in the folder when copying the .bmp files into the folder.)

Does having the "-r" function in the batch file mean that you can copy the "texture.x" folder, (each of which contains an identically named .bmp), into the "Conversion ..." folder, and 'imagetool' will then look into each folder, do the conversion and replace the .bmp with a DXT5 + MIPS / .dds file? And it will do this in each of the "texture.x" folders?

Otherwise I cannot 'see' how this very potentially useful batch file will work.


Hi, Ray,

I copy only a group of uniquely-named BMP texture files into the folder that contains the batch file. I don't put sub folders into the conversion folder. As you point out, aircraft variants usually contain file names that are identical. When putting textures into the folder containing the batch file, it is important to copy (rather than move) the texture files from their original location. After the batch file has been run, you can use a good text editor to find all instances of a particular BMP file and automatically replace each instance with its newly-created DDS file. The alternative would be to do the finding and replacing manually. Whether doing the replacing with a text editor or doing the replacing manually, you will need to remember the location of the folder or locations of the folders (to constrain the searching) that contain the BMP files that you will be replacing.

Although I decided to use files only, you can experiment using sub folders, if you like. Be sure to create backups before you do so. I still have the -r switch in my own batch file.

If you want to make modifications to the batch file, or if you want to write your own batch file for image processing, below are the Imagetool switches, as shown in the FSX SDK.



Dan

Back to Top
RayM View Drop Down
First Officer
First Officer
Avatar

Joined: 15 Nov 2012
Location: Luton, England
Points: 384
Post Options Post Options   Thanks (0) Thanks(0)   Quote RayM Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jun 2017 at 7:53am
When I look thru the texture folders for a particular aircraft, each the textures which go with the aircraft variants all have the same file name, e.g. JFAIBNI_t.bmp, so it looked to me that it was not possible to do a batch conversion on all texture files for one aircraft. (If they all have the same name, you will end up with only one file in the folder when copying the .bmp files into the folder.)

Does having the "-r" function in the batch file mean that you can copy the "texture.x" folder, (each of which contains an identically named .bmp), into the "Conversion ..." folder, and 'imagetool' will then look into each folder, do the conversion and replace the .bmp with a DXT5 + MIPS / .dds file? And it will do this in each of the "texture.x" folders?

Otherwise I cannot 'see' how this very potentially useful batch file will work.
A long time FSXA and Traffic X user
Back to Top
freddy View Drop Down
Chief Pilot
Chief Pilot
Avatar

Joined: 29 Nov 2008
Location: Melbourne, Aust
Points: 1339
Post Options Post Options   Thanks (0) Thanks(0)   Quote freddy Quote  Post ReplyReply Direct Link To This Post Posted: 02 Jun 2017 at 11:29pm

Soaranden lives! It's good to see a post from you.

Now that is a cool idea ... the batch file idea will make light work of the task. I like it.
Back to Top
Soaranden View Drop Down
P1
P1
Avatar

Joined: 14 Feb 2009
Points: 627
Post Options Post Options   Thanks (0) Thanks(0)   Quote Soaranden Quote  Post ReplyReply Direct Link To This Post Posted: 02 Jun 2017 at 10:27am
A year or so ago, I found a great way to quickly convert a group of bmp textures to dds textures.

Here's what I do:

1. I created a folder that I maintain for temporarily holding the bmp textures that I want to convert.

2. I copy the bmp textures to the folder that I maintain for converting bmp textures to DDS.

3. I put a copy of imagetool.exe in the same folder.

4. I created a batch file, which I named "Convert BMP to DDS.bat" (without the quotes, of course). I saved the batch file to the same folder.

    Here are the contents of the batch file (which can be created with any plain text editor):

    @echo Convert all textures to .dds
    imagetool -batch -nogui -dxt5 -dds -nodither -r *.bmp
    del *.bmp

    Note that the batch file will delete all of the bmp textures from the folder after converting the
    textures to DDS.

5. I double-click on the Convert BMP to DDS.bat file to run the file.

Now the folder contains only DDS textures, imagetool.exe, and the batch file.
Back to Top
RayM View Drop Down
First Officer
First Officer
Avatar

Joined: 15 Nov 2012
Location: Luton, England
Points: 384
Post Options Post Options   Thanks (0) Thanks(0)   Quote RayM Quote  Post ReplyReply Direct Link To This Post Posted: 30 May 2017 at 8:24am
Originally posted by electric man electric man wrote:

First convert to DXT5 and then create mip maps, then "save as" DDS
Most of the textures are already DDS so then just click the save button. I don't think it makes a difference wether you first convert to DXT5 or wether you create mip maps, the outcome will be the same.
Herman


That sounds clear enough - will see what happens. Thanks.
A long time FSXA and Traffic X user
Back to Top
electric man View Drop Down
Check-In Staff
Check-In Staff
Avatar

Joined: 05 Jun 2016
Location: Belgium
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote electric man Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2017 at 4:16pm
First convert to DXT5 and then create mip maps, then "save as" DDS
Most of the textures are already DDS so then just click the save button. I don't think it makes a difference wether you first convert to DXT5 or wether you create mip maps, the outcome will be the same.
Herman
Back to Top
RayM View Drop Down
First Officer
First Officer
Avatar

Joined: 15 Nov 2012
Location: Luton, England
Points: 384
Post Options Post Options   Thanks (0) Thanks(0)   Quote RayM Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2017 at 4:10pm
Herman,

sorry to sound a bit stupid but what is the conversion order?

First, convert to DDS then use 'imagetool' to make DXT5 and Mip Maps.

Or, make DXT5 and MIP MAPS then convert to DDS?
A long time FSXA and Traffic X user
Back to Top
 Post Reply Post Reply Page  12>
  Share Topic   

Forum Jump Forum Permissions View Drop Down