Message Areas - "Add-On Objects - Reducing Size."
Train-Sim.Com Message Areas
"ADD-ON OBJECTS - REDUCING SIZE."
Email this topic to a friend
Printer-friendly version of this topic
Bookmark this topic (Registered users only)
Previous Topic | Next Topic Conferences MSTS Route Design (Protected) Original message
sniper297 (1468 posts)
Jan-31-02, 01:17 PM (EST) "ADD-ON OBJECTS - REDUCING SIZE." I think everyone is familiar with the problem, you download a neat object somebody made, put it in your route, then when you go to upload the route you find that ace files don't compress in the zip. So some suggestions to you 3D object making wizards;1. If at all possible, try using one or more of the default textures that are already in the game for your object. The S and SD files are very small and compress smaller, and if the S file for a new bridge calls for the rusty red texture from JPbridge7, for example, distribution would be much simplified. Obviously that's not always possible, you could skin a new station using one of many concrete or wood textures for the platform and an ace from a building about the same size for the stationhouse, but anything with signs or something highly detailed and totally new would be impossible.2. So the next best thing is to make the ace file as small as possible to begin with. Reducing the size from 512x512 to 128x128 works, but then the resolution is so poor it mucks up all your beautiful artwork.
The trick I've found to shrinking ace files without making them fuzzy is the color depth.
TGAtool2 sends the image to Paint Shop Pro 7 as a 16 million color bitmap. After editing, it's automatically saved as a 16 million color bitmap. In the above example, the coalmine head house with the operating wheels, I use the "count colors used", and find that the number of unique colors in the image is 23,855. Well, 16,000,000 - 23,855 = 15,976,145 available colors that are not used, and a bitmap image stores all that information for the number of colors whether they're used or not. So when using TGAtool2 to reload after edit, the file exports at 441k. If I reduce the color depth to 32k 24 bit, it will export at 274k with no loss of quality at all. The enginehouse for the same object is 538k, altering that with the same method results in a 311k ace file. So the two regular textures start at 977k, I reduce them to 583k, and the structure looks exactly the same.Jason's palm trees are even more dramatic, the number of unique colors in tree-tropical-03.ace is 1,873. Putting it thru the color reduction, I start with a 1,413k file and end up with a 220k file, again no loss of quality.
Try it, you'll like it. Alert Edit | Reply | Reply With Quote | Top
Table of Contents
Subject Author Message Date ID RE: ADD-ON OBJECTS - REDUCING SIZE. JohnCS Jan-31-02 1 RE: ADD-ON OBJECTS - REDUCING SIZE. Southern_Railway Jan-31-02 2 RE: ADD-ON OBJECTS - REDUCING SIZE. MartinW Jan-31-02 3 RE: ADD-ON OBJECTS - REDUCING SIZE. sniper297 Jan-31-02 4 RE: ADD-ON OBJECTS - REDUCING SIZE. JohnCS Feb-01-02 5 RE: ADD-ON OBJECTS - REDUCING SIZE. sniper297 Feb-01-02 6 RE: ADD-ON OBJECTS - REDUCING SIZE. Ranulf Feb-01-02 7 RE: ADD-ON OBJECTS - REDUCING SIZE. stevelw Feb-01-02 8 RE: ADD-ON OBJECTS - REDUCING SIZE. Hobart Feb-01-02 9
Lobby | Topics | Previous Topic | Next Topic
Messages in this topic
JohnCS (274 posts)
Jan-31-02, 02:38 PM (EST) 1. "RE: ADD-ON OBJECTS - REDUCING SIZE." Actually it doesn't quite work that way I'm afraid because 16,24,32 bit color is not paletted, but the color info is included in each pixel. The 16,777,216 colors comes from a 32 bit per pixel bitmap with 8 bits per pixel, giving a range of 0-255 each for red, green, blue & alpha. This is effectively a broader range than the eye can determine differences between intervals in.Going to 24 bit 64k colors doesn't mean you can pick any 64k colors out of the above 16M. It means you now have 5 bits per pixel, or a range of 0-31 for each color channel (one channel is often given the extra bit if not used for a mask, thus 64k instead of 32k). The eye can discern banding in the shading at this color resolution.Now granted many times this won't be apparent in the texture map, and if you're only running the sim in 16 bit color then you'll never see it anyway.Its a great tip, just wanted to get the details right and note that sometimes it *CAN* make a difference.
Remove | Alert Edit | Reply | Reply With Quote | Top
Southern_Railway (114 posts)
Jan-31-02, 02:45 PM (EST) 2. "RE: ADD-ON OBJECTS - REDUCING SIZE." Thanks Siper. My textures folder is loaded with huge *.ace files I downloaded and now I'm concerned that my route will be more difficult to distribute. I removed "Flat People" from my route because of the large *.ace file and need to remove other objects. Maybe the better solution is to reduce the color depth for each object and keep them in my route. That is going to be a little difficult since I don't have Paint Shop Pro. Remove | Alert Edit | Reply | Reply With Quote | Top
MartinW (57 posts)
Jan-31-02, 06:15 PM (EST) 3. "RE: ADD-ON OBJECTS - REDUCING SIZE." Just to clear up a few possibly confusing points..Reducing the colour depth to 32k still results in a 24 bit (16 million) image but because it is actually using less individual colours it will compress better. Effectively it is merging "almost the same" colours to single colours but each pixel is still described by 24 bits of colour data. The lowest 2 or 3 bits in each 8 bit component will be zeroesUncompressed the file will be exactly the same size as one you left at 24 bit.It can also give rise to posterisation and banding. If your original uses all 255 different shades of pure blue (using the full 8 bits of blue) then your 32k version will only have 32 possible shades of pure blue (using the full 5 bits).
For complex images using lots of colours it may be unnoticeable but for images using a lot of shades of the same colour it will be fairly obvious. Remove | Alert Edit | Reply | Reply With Quote | Top
sniper297 (1468 posts)
Jan-31-02, 07:04 PM (EST) 4. "RE: ADD-ON OBJECTS - REDUCING SIZE." John, you want to get the details right you're gonna have to explain all that in English. I think I understand some of the things you said, yes, if I have 64k colors I can't pick any 64k I want. Back in the Win 3.1 and SVGA days, a 256 color bitmap reduced to 16 colors wouldn't let you pick any 16 colors out of the 256, you were stuck with their pallette. The point I was making is that you made a new image, put a single black dot in the upper left corner, and saved it as a 256 color bitmap. You have one pure black pixel, all the rest are pure white, but given the same image area the file size for a bitmap is the same kilobytes as the equivalent sized image with a photo of the Taj Mahal. The major difference is that PKzip would compress the single black dot bitmap a lot smaller, because it's all redundant information. Makeace apparently don't do that. Given the same image, the single black pixel, it made more sense to save that as a 16 color bitmap instead of 256 colors, since it was a lot smaller.
The same applies to this, at 16 million colors it's storing information regardless of whether it needs it or not, and when you save the image in PSP 7 (again, might not apply to other graphics programs), it's saving "tgatool2.bmp", and the size of THAT file is dependent on the number of bits per pixel. TGAtool2 merely takes whatever bitmap you give it by this process and exports it to a compressed ace file, if it's a 16 million color file with only 50 unique colors in it, it's still gonna be larger than a 32k color file with 30,000 colors.I did this;
after posting the first message, cuz it suddenly occured to me this would work on trains as well as objects, and before the color reduction I used the "count colors used" thingy, and came up with something like 87,000. So it's possible using error diffusion I could have come up with two much smaller ace files using 32k, but the quality reduction (caused by the pallette limitations you mentioned) probably would have suffered. So I cloned the geep, tried the color reduction at 64k instead of 32k, and still got 964k for USGP38col 1 &2 ace files instead of the 1488k that I started with. That's an extreme example, but running MSTS at 1024x768 32 bit on a GEFORCE 2 GTS/PRO and a 17' Gateway2000 Vivitron, I can't detect any difference between the two skins at all. And I was a U.S. Navy Avionics tech, tested and passed for perfect color vision, so it ain't my eyeballs. On an object with a hell of a lot of subtle shadings you would need to make the decision to trade off quality or accept the larger size, but for something like a factory or wooden crate clutter I don't see any need for 16 million colors.Maybe you know a way to get around this, if you could translate it from programmerese, reducing to an 8 bit 256 color bitmap will make a MUCH smaller ace file, but it don't work.
The image on the left is what it looks like when reloaded, the right is what it actually exports to as an ace file. It would be useful if we could get that to work, most of the \terrtex terrain textures don't use more than 100 to 300 unique colors, and they can get rather large too. Remove | Alert Edit | Reply | Reply With Quote | Top
JohnCS (274 posts)
Feb-01-02, 00:21 AM (EST) 5. "RE: ADD-ON OBJECTS - REDUCING SIZE." hmmmm..... I'm sure I created a 256 color ace w/ tgatools. Showed up as a DK?-opaque something or other like theirs. Will have to investigate. Remove | Alert Edit | Reply | Reply With Quote | Top
sniper297 (1468 posts)
Feb-01-02, 00:45 AM (EST) 6. "RE: ADD-ON OBJECTS - REDUCING SIZE." I posted this over in the skinners forum, somebody over there was talking about the possibility of banding too, and the problem involved with many shades of a similar color. So I did this;
The B unit has the original texture from Train Artisan, the A was reskinned using 64k color reduction for both textures. TAF701.ace is the sides, TAF702.ace is the front of the cab. 701 was about 11,000 colors, but 702 was about 44,000, which is why I elected to go with 64k instead of 32k for both. But explain this one; 701 reduced from 1,071k to 335k, and 702, in spite of having four times as many colors, went from the same 1,071k down to 275k! This is using error diffusion instead of nearest color, which I think produces better results. Possibly the front texture had zillions of shades of silver-gray and blue-gray, and maybe I'm losing all the subtle shadings they put in and just not seeing it. Remove | Alert Edit | Reply | Reply With Quote | Top
Ranulf (88 posts)
Feb-01-02, 04:25 AM (EST) 7. "RE: ADD-ON OBJECTS - REDUCING SIZE." LAST EDITED ON Feb-01-02 AT 04:27 AM (EST)how does this effect the performance on large scale
Train is mine ask first
ICQ 76646150 or rangar@xtra.co.nzRanulf Remove | Alert Edit | Reply | Reply With Quote | Top
stevelw (4 posts)
Feb-01-02, 08:03 AM (EST) 8. "RE: ADD-ON OBJECTS - REDUCING SIZE." Sniper- Has the palm tree been uploaded to the file library? It would look great in my route. I have seen it in other photos in the forum. Thanks for letting me know. -Steve Remove | Alert Edit | Reply | Reply With Quote | Top
Hobart (161 posts)
Feb-01-02, 10:31 PM (EST) 9. "RE: ADD-ON OBJECTS - REDUCING SIZE." Hey All,
For ace files with no transparent areas I use MartinW's DXTbmp program. It exports your bmp/tga files to ace dxt1. A 512 x 512 bmp goes from 1.4 megs to 171k. Works like a champ and you don't have to mess with the color depth. I only wish I knew how Kuju compressed the ace files with alpha channels.Best Regards
Hobart Remove | Alert Edit | Reply | Reply With Quote | Top
Lock | Archive | Remove
Lobby | Topics | Previous Topic | Next Topic
Restored from the Train-Sim.Com archive, captured March 9, 2002. About this archive.