Train-Sim.Com
MSTS Route Design

Using DXT1 to compress ace files?

Notice to all visitors and members of the Train-Sim.Com message forums:
If you plan on using a signature banner in your posts, we would like to remind you that there is a maximum size for banners. That maximum is 450 pixels wide by 120 pixels high, and not to exceed 25k. Your compliance is appreciated. FORUM RULES Problems? There are two common reasons for problems with logging in and posting messages. The first is that you are running a firewall that prevents your messages from being sent to the server. The other is that you have cookies disabled; the DCForum software requires cookies to work properly.

Previous Topic | Next Topic

Printer-friendly copy Email this topic to a friend

Reading Topic #10562

Member since Jun-26-02 · 763 posts

I'm totally amazed that OldieDaddy took SV4 and reduced it to less than 50% of the size I uploaded. He has uploaded a 58MB version to the European site www.The-Train.de. Mike Simpson said that this DXT1 compression of ace files must be done manually. OldieDaddy spent about ten hours manually compressing each ace file.Two questions:1. Is this DTX1 compression something that could be used by object builders?2. Is it something that an non-technical person like myself could use in route preparation? I assume that the ace compression would be done before using Route Riter to prepare a route for uploading?Thanks,
Bill Burnett

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

RE: Using DXT1 to compress ace files?, griffinmt, Sep-25-03, 06:25 PM, (1) RE: Using DXT1 to compress ace files?, MikeSimpson, Sep-25-03, 07:55 PM, (5) RE: Using DXT1 to compress ace files?, lfriddle, Sep-25-03, 06:53 PM, (2) RE: Using DXT1 to compress ace files?, oldiedaddy, Sep-25-03, 07:37 PM, (4) RE: Using DXT1 to compress ace files?, enocell, Oct-01-03, 02:47 PM, (15) RE: Using DXT1 to compress ace files?, timken, Sep-25-03, 07:34 PM, (3) RE: Using DXT1 to compress ace files?, sniper297, Sep-25-03, 10:57 PM, (6) RE: Using DXT1 to compress ace files?, MikeSimpson, Sep-25-03, 11:30 PM, (7) RE: Using DXT1 to compress ace files?, sniper297, Sep-25-03, 11:59 PM, (8) RE: Using DXT1 to compress ace files?, oldiedaddy, Sep-26-03, 12:19 PM, (9) RE: Using DXT1 to compress ace files?, Tree Frog, Sep-26-03, 02:05 PM, (10) RE: Using DXT1 to compress ace files?, oldiedaddy, Sep-26-03, 03:42 PM, (11) RE: Using DXT1 to compress ace files?, MikeSimpson, Sep-26-03, 07:59 PM, (12) RE: Using DXT1 to compress ace files?, sniper297, Sep-26-03, 10:36 PM, (13) RE: Using DXT1 to compress ace files?, smmille1, Sep-27-03, 02:24 AM, (14) RE: Using DXT1 to compress ace files?, MartinW, Oct-02-03, 06:01 PM, (16)

Conferences | Topics | Previous Topic | Next Topic

Charter Member · 649 posts

RE: Using DXT1 to compress ace files?

For Martyn and OldieDaddy,I have been experimenting with trying to automate this, and actually have been in correspondence with Martin Wright who wrote TGATools2 with regard to a version of ACEComp which can also handle DXT1, but he can not do it at this time.I have however added an option to Route-Riter (not yet released), which can go through all the .ace files in a folder and copy all those which do not have Alpha streams to a temporary folder. It is then possible to use Martin Wright's Convim to convert from .ace to DXT1 ace files in bulk. Convim is available on the tgatools site. Using this method I have managed to delete 30 megs from the upload of the next version of my Blue-Mountains route, however it is slower doing the textures with Alpha channels.For OD - How do you convert from .ace to the DXT1 compression where there is an Alpha layer? I have tried using TGATools for this, but it does not work on my machine. I have had to send the image and alpha channel to PSP 7.4, combine them as a .tga file, then use Makeace for Windows to produce the required DXT1? Is there an easier way?
Mike

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 417 posts

RE: Using DXT1 to compress ace files?

How does it look? I understand that DXT is a very lossy compression scheme.
It is an option of makeace and makeacewin. On the plus side it is directly usable by most graphics cards without having to be decompressed by DirectX first. Thus those objects load faster than the other types of compressed objects and speed up the sim.I have used it on some of the background textures in my route and can tell a difference. After being compressed with DXT1 they look a little softer, or a little fuzzy.Larry

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 224 posts

RE: Using DXT1 to compress ace files?

Well, I work with TGATool2.DXT1 is somewhat lossy indeed, but in 98% of the textures you can't really say it's worse.
I have compacted many major routes in this way, and never got remarks for lower quality.
I also often use DXT1 for compacting Rolling Stock downloads from The-Train.de, saving lots of expensive traffic, and with no complaints from authors What DXT1 can't handle is:
1024*1024
non square, non power of 2 sizes
cabview textures
8-bit Alpha (greyscale)
ReMipped textures (because TGATool calls on WinAce)I often recheck the DXT1 textures obtained, and occasionally revert to originals if I notice degradation (sometimes area nuances, or griddy patterns damaged).
Sometimes I also use the 'sharpen' function of PSP, and obtain better sharpness in DXT1 vs. originals !And of course, good DXT1 textures come from good pics, blurry stuff will not improve !
And it's nothing new, many builders use DXT1 for objects and trains, including Kuju. Just not systematically, or by lack of understanding.Love and Peace

OldieDaddy from Alsace

Using DXT1 to compress ace files? – image 1 Visit also www.the-train.de !

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 1409 posts

RE: Using DXT1 to compress ace files?

Using DXT1 to compress ace files? – image 2

In some cases the mapping of DXT looks like shifted(?), like in one of my heavy pax cars. If the truck texture is DXT'd, there will be black areas on the truck.

Using DXT1 to compress ace files? – image 3

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 923 posts

RE: Using DXT1 to compress ace files?

Most the time they look fine, although it's a good idea to compare a before and after. DON'T EVER edit them after saving them in this format. The results are HORRIBLE!!!! I forgot to turn it off and saved a terrtex file, checked it, then did some more editing, resaved, and the colors were rather psychedelic, very vivid, and ruined.

Steve T.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 5636 posts

RE: Using DXT1 to compress ace files?

I think the ace compression with SeaView 1 took about an hour, with another two hours editing ESD files to eliminate wierd stuff like garbage cans with 8 seasonal textures. There were a lot less custom objects back then, but basically I set it up so double clicking on the ace file automatically opened in TGAtool2. If it had an alpha, I closed it and went on to the next one.http://www.train-sim.com/cgi/dcforum/dcboard.cgi?az=show_thread&om=3542&forum=DCForumID6As I recall, things like the palm tree couldn't be compressed without making them look funky. As for DXT compression, I just select export, and over on the right there are two checkboxes, "Compress ace files" and "use DXT compression". Below that is a selector for standard makeace, updated makeace, or patch #1 makeace. Patch #1 makeace comes from the official MSTS tools update, and has the best compression.
Check your \Train Simulator\UTILS\makeace.exe, file date should be September 3rd 2001.Only thing you can't use DXT on is an 8 bit alpha, which is "export, ace (alpha). The "export, ace (-trans) is the 1 bit alpha, and you can use DXT for that, will yield 43kb for a 256x256 texture, 171kb for a 512x512. Martin probably has some way to tell the difference when you open an ace file, I just send the alpha to PSP-7 and count the number of colors.Using DXT1 to compress ace files? – image 4If "count colors used" comes up with "number of unique colors 2" (black and white), then it's a one bit (-trans) alpha, otherwise (as in the example, 219 colors) it's an 8 bit alpha.There are things that can be done for 8 bit alphas too, depends on how much quality loss you're willing to live with. "decrease color depth" from 16 million colors to 32 thousand colors usually yields a smaller ace file. For Scott Miller's Remipit, the ace file can't be compressed without ruining the mipping, and for long objects like bridges and track textures (viewed from long, medium, and short distances simultaneously) the proper mipping is necessary to avoid the odd tinting effect. Here's a track texture without proper mipmapping:Using DXT1 to compress ace files? – image 5If you look at the PO&N6 track textures (available seperately as 3Dtracks.zip), I couldn't compress without destroying the remipit, so I tried an experiment. I opened a 256x256 texture, opened the 3Dtracks texture, copied and pasted to the other PSP-7, reduced to 256x256 and copied and pasted that over the other image. (Wierd way to do it, but I've found that opening any texture and reducing the size directly don't work, not sure why. Keep forgetting to ask Martin about that.)
Anyway, what I found was that a 256x256 uncompressed track texture with proper mipmapping looks better than an unremipped 512x512 texture, compressed or not, and the uncompressed 256x256 texure is 1/3rd the size in kilobytes of a compressed 512x512 texture.I'm still working on PO&N7, fattened up to 11 megs with all the custom textures even with DXT compression. I'm planning on experimenting with that tho, ten 171kb (512x512 DXT) files is 1,710kb, ten 43kb (256x256 DXT) files equals 430kb. Provided the quality loss isn't too noticeable, I could save a couple megs just by reducing some texture sizes.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 649 posts

RE: Using DXT1 to compress ace files?

LAST EDITED ON Sep-25-03 AT 11:34 PM (EDT)

Thanks for that Jim, but this is where my problem comes in, I am sure this used to work, but when I select Export with Alpha and DXT1 and compress are selected, and Patch #1 Makeace is selected. No change in the original texture occurs.Exporting with Alpha transparency works, but sometimes the DXT1 file is not too good, I will see how it goes from now on.I have checked Utils and both Makeace.exe and MakeaceWin.exe are dated 3rd Sept 2001.
Certainly Makeacewin works fine on the .tga files and produces the desired result, but this is a bit slow.The 9th character of the .ace files appears to be unique, that is how I have been able to sort out all the non-alpha textures so that I could automate their conversion to DXT1, if it is C3 in Hex then the texture does not have an alpha channel.Mike

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 5636 posts

RE: Using DXT1 to compress ace files?

"but when I select Export with Alpha and DXT1 and compress are selected, and Patch #1 Makeace is selected. No change in the original texture occurs."Lost me on that one, cobber. You mean no change in the file size? Export no alpha (flat bitmap) or export -trans (one bit alpha) will work with DXT, but export with alpha is the 8 bit alpha, which will not work with DXT. If it's "with alpha" the DXT has to be unchecked (so it uses Zlib compression instead), and the only way to reduce the file size with Zlib is to simplify the texture, usually by decreasing the color depth.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 224 posts

RE: Using DXT1 to compress ace files?

LAST EDITED ON Sep-26-03 AT 12:24 PM (EDT)


There's another way to shrink ACE's with 8-bit Alphas:
save as NoAlpha, and reapply the Alpha.
Takes 5 milliseconds at Jim's blitz work speed Mike, suggest to use the latest TGATool2, the export option Alpha(noDXT) avoids unticking DXT compression.Love and Peace

OldieDaddy from Alsace

Using DXT1 to compress ace files? – image 6 Visit also www.the-train.de !

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Jun-26-02 · 763 posts

RE: Using DXT1 to compress ace files?

So, what should a non-technical route builder like me do? Is this DXT compression something I can do myself on the next version of SV?Bill Burnett

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 224 posts

RE: Using DXT1 to compress ace files?

As you continue building, just use the compacted files.Only added non-DXT textures will then have to be reworked.
Can be done with TGATool2, or even RouteRiter by then.
The few points to consider have been well exposed in this thread.Or simply, just call on me, this time it should be faster !Love and Peace

OldieDaddy from Alsace

Using DXT1 to compress ace files? – image 7 Visit also www.the-train.de !

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 649 posts

RE: Using DXT1 to compress ace files?

Sorry Jim, I edited that post and got it all screwed up. Anyway have it working OK now, it turns out that I had somehow got the older version of makeace.exe installed along with makeacewin.exe (I did a reinstall of MSTS and forgot to reinstall the patch).By the way, I have re-done Route-Riter 'Write .bat' option. It now does a second pass through all the texture files and checks for any textures which are the same in the season folders as the ones in the main Textures folder. If so, it deletes them and adds a line to the InstallMe.bat to copy then after installation. Another option allows you to select a single Default Terrtex\Snow texture which is then renamed to all the other snow textures in the Terrtex\Snow folder, thus removing all the Terrtex\Snow textures from your uploaded archive.Should have a copy at http://members.optusnet.com.au/virtualtrains this weekend.Mike

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 5636 posts

RE: Using DXT1 to compress ace files?

I'm currently fiddling with PO&N7, using RR 4.2.19, and I still get the ref file saved as ANSI instead of unicode. Not a big deal since all that's required is to open with wordpad and resave as unicode text file, but as long as you're fiddling you might as well look at that too.One funny thing I ran across, the error checker complained that "US2maintrain.s" (one of the missing shapes, static MOW unit) was missing the snow texture. I've had that in there since PO&N5, WTF? So I open the SD file, sure enough it says;ESD_Alernative_Texture (1) Apparently if there is no ESD line the sim just treats it as ESD zero, and in this case "alternative" is misspelled, so the sim is ignoring that line!

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 644 posts

RE: Using DXT1 to compress ace files?

Click to send message via ICQ

Hmm. Dare I reveal what I've been working on? Nah. It's not quite ready for beta testing yet. (insert evil grin here - smiley not working)

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 120 posts

RE: Using DXT1 to compress ace files?

Just a general note on DXT1.it is definitely lossy. It is basically a 16 bit format so there is colour loss immediately. It is then compressed using a fixed-compression algorithm that further reduces the range of colours that can be in each 4x4 pixel block. Areas where several solid colours meet suffer particularly badly (try putting red text with a thin white outline on a blue background and see the results....)For this reason it is best restricted to Terrain textures (which is pretty much what occurs in all the default routes) and "busy" images like trees where the restrictions of the format are barely detectable. Best way is to follow the advice above - try it out and see if it is acceptable and put the original back if it isn`t. But don`t just look at the full size image. The further down the mip levels you go the worse the potential for degredation gets. what looks acceptable from reasonably close may turn into a mess when you get further away and the lower mips get displayed.
Also compare the 2 methods of creating DXT1 Ace files. MakeAce and MakeaceWin create DXT1 Ace files one way. Convim uses a completely different method based on the nVidia DDS codec. Depending on the particular image one may give better results than the other. TgaTool2 uses Makeace so it falls into the first category.

Alert | IP


[ Home | MSTS Forum | MSTS FAQ | File Library ] Copyright © 2002 by Nels Anderson. All Rights Reserved.

Restored from the Train-Sim.Com archive, captured October 23, 2003. About this archive.