- Joined
- Nov 11, 2006
- Messages
- 7,591
BLP1 and Mac Computers:
Testing:
Conclusions:
New Rule:
After a lot of testing, I found a rule that seems to be consistent with my results.
For testing, I used BLP Lab, BLPaletter, ButtonManager, and three skins:
http://www.hiveworkshop.com/forums/skins-552/sorceress-blp-230570/?prev=search=sorceress&d=list&r=20
http://www.hiveworkshop.com/forums/...al-blp-125990/?prev=search=knight&d=list&r=20
http://www.hiveworkshop.com/forums/...ht-blp-152087/?prev=search=knight&d=list&r=20
I'll first explain how mip maps seem to work. The default count of mip maps
will depend on the dimensions of the BLP. That is why I chose the skins above;
the first is 256x256, the second is 512x256, and the third is 512x512.
Now, when you open up a BLP in BLP Lab, the mipmap count will be displayed:
As you can see, there are 9 for this 256x256 texture. Each mip map has its
own dimensions. BLP Lab organizes it in descending order. The first (#0) has
dimensions of 256x256, the second (#1) is 128x128, the third (#2) is 64x64,
the fourth is 32x32, fifth 16x16, sixth 8x8, seventh 4x4, eighth 2x2, ninth 1x1.
When you decrease the mip map count, a number of "fake" mip maps will be created.
They will point to the same offset and size as the previous mip map, and have the same dimensions:
As you can see, mipmap #7 and #8 have the same values as #6. Those are the
two "fake" mip maps.
---
Well, that explains mip maps a little bit. Now for the new rule. It seems that
with JPEG compression, there must be a mip map with a dimension of 1,
either for height or width. This seemed to be consistent with my results.
At first I thought you had to reach 1x1 or have the max mip map count for that size,
but the knight/garithos skin worked with 9 mip maps -> lowest dimension is 2x1.
The quality control and the sub-options for JPEG compression have no effect
on whether the texture crashes.
However, paletted textures work with any mip map count. They will not crash,
and the options (colors/encoding) will not cause the map to crash.
So how did Weep come to his conclusion? He tested it for icons, and he found
out what worked. Thank goodness too, because this would've taken
even longer otherwise. The reason why the magic number "7" works for icons
is that icons are 64x64, which means the mip map count is 7. This follows my
rule that the final mip map must contain a dimension of 1.
For regular (a x a) dimension textures, you must have the max mip map
count if you use JPEG compression. To calculate this, 2n-1 = dimension.
For example, 2n-1 = 64, ... ln(64)/ln(2) + 1 = n = 7
For irregular ( a x b) dimension textures, you would use the same equation, but
you would plug in the smaller dimension for the equation. For example, for garithos:
2n-1 = 256, ... ln(256)/ln(2) + 1 = 9.
Tools:
------
Thanks to Weep for the preliminary information, Shadow Daemon for BLP Lab
and ButtonManager, Cohadar for requesting whether his tool works (I ended up testing this afterward),
PitzerMike for BLPaletter.
Table of Contents
No one has formally written what crashes and what doesn't.
I am willing to test a variety of things, so if you have any requests you can
make a request here. The current established rule is the 7-mipmap rule:
This seems to work so far. However, for developers who want to support
mac players, some extra information may be needed. I'll provide some based
on whatever tests I have been running.
I am willing to test a variety of things, so if you have any requests you can
make a request here. The current established rule is the 7-mipmap rule:
Weep said:I downloaded Button Manager and played around with it in
WINE, and finally got it to produce compatible icons. In the end, it didn't have
anything to do with JPEG vs. paletted, or quality %.
You need to change the Mipmap count to 7. Then, change whatever settings
you like; compressed, paletted, any % or number of colors. Then, press the
button "For all borders". That is critical: without pressing that, it won't use
the same settings when it automatically creates a disabled button.
Source: Mac + certain map = crash on selection
This seems to work so far. However, for developers who want to support
mac players, some extra information may be needed. I'll provide some based
on whatever tests I have been running.
Testing:
- I converted an icon using Button Manager (by Spec).
Spec's Button Manager is on a default setting of automatic quality definition.
To find the mipmap count, I used BLP Lab. This is how it is displayed:
As you can see, it has Mipmap count: 7 (5 fake). From playing with the
settings, it seems that BLP Lab and Button Manager will maintain this count
of 7, and supplement some "fake" mipmaps which preserve the size of the last mipmap.
You can get how many mipmaps were used when saved by doing 7 - 5 = 2.
The odd thing is that this worked for one icon, but not for another. Both were
png files of 256x256 size. The cartman icon did not work. The other did.
EDIT: I realized the cartman one was under JPEG compression. The other one
was under paletted.
. - Upon testing, the cartman icon seemed to only cause the crash when I first saw it.
I assigned it to the holy light ability. When I learned the skill (the research icon was unchanged)
it crashed (which was immediately before the cartman icon would be displayed).
. - When I saved the cartman icon with a mipmap count of 7 (using BLP Lab),
it worked on my mac without any crashes or issues.
. - I downloaded a sorceress skin and set its mipmap count to 1. I imported it
into a test map (one that works on mac) and I tested it on Windows. No crashes. (albeit the texture was messed up)
When I transferred the map to my mac, it crashed on the loading screen.
. - Using that sorceress skin (default mm count of 9), I changed its count
to 7 with the paletted option. It worked just fine on my mac. With JPEG compression
at 100% quality, and mipmap count of 7, it crashed. It worked, however, with a mipmap
count of 9.
. - Using that sorceress skin, I changed its mm count to 6 with the paletted
option checked, as well as its sub-options. It worked without any crashes.
Same for count of 5, with paletted. And 4. It worked for 1 as well without
any crashes, despite the model being horribly disfigured even more than on
my Windows computer. Tested the same for another skin, which was for Lord
Garithos. It has a default mipmap count of 12, and I used 4 with paletted, and it
worked without any crashes!
. - Next the Lord Garithos skin (512x256); it is under JPEG compression. I compressed it
with a mipmap count of 11, 10, and 9. They all worked
without any crashes. A mipmap count of 8 crashed.
. - Next a fel guard skin (hq 512x512); it is also under JPEG compression. With the
settings it had as I downloaded it, it had 12 mipmaps (2 fake), therefore 10 real.
It worked without any crashes. I dropped it to 9, and shizam it crashed.
. - I tried that fel guard skin with 5 mipmaps and paletted under 128 colors. Worked.
Same for 16.
. - Using the fel guard skin, I adjusted the quality to 50%, 25%, and 1%. They all worked
without crashing. Both with and without the JPEG sub-options enabled.
. - Sure enough, the cartman icon worked once I changed it to paletted.
Conclusions:
- First, this crash does not apply only to icons. It applies to both regular textures
and, most likely, any BLP for that matter. (confirmed only for skins and icons)
. -
The "fake" mipmaps that are generated by BLP lab/Button manager do not
seem to fix the crash in most cases. On default settings, button manager can
potentially cause the map to crash on a mac.
On default settings, button manager will use the paletted option. It will not
cause a crash on a Mac.
Button Manager may choose settings that crash on a Mac.
. - The magic number isn't necessarily 7. Skins will work at other mip map values even under JPEG compression.
. - You can fix BLP1 files that were already converted by increasing its mip
map count to the appropriate value.
New Rule:
After a lot of testing, I found a rule that seems to be consistent with my results.
For testing, I used BLP Lab, BLPaletter, ButtonManager, and three skins:
http://www.hiveworkshop.com/forums/skins-552/sorceress-blp-230570/?prev=search=sorceress&d=list&r=20
http://www.hiveworkshop.com/forums/...al-blp-125990/?prev=search=knight&d=list&r=20
http://www.hiveworkshop.com/forums/...ht-blp-152087/?prev=search=knight&d=list&r=20
I'll first explain how mip maps seem to work. The default count of mip maps
will depend on the dimensions of the BLP. That is why I chose the skins above;
the first is 256x256, the second is 512x256, and the third is 512x512.
Now, when you open up a BLP in BLP Lab, the mipmap count will be displayed:
As you can see, there are 9 for this 256x256 texture. Each mip map has its
own dimensions. BLP Lab organizes it in descending order. The first (#0) has
dimensions of 256x256, the second (#1) is 128x128, the third (#2) is 64x64,
the fourth is 32x32, fifth 16x16, sixth 8x8, seventh 4x4, eighth 2x2, ninth 1x1.
When you decrease the mip map count, a number of "fake" mip maps will be created.
They will point to the same offset and size as the previous mip map, and have the same dimensions:
As you can see, mipmap #7 and #8 have the same values as #6. Those are the
two "fake" mip maps.
---
Well, that explains mip maps a little bit. Now for the new rule. It seems that
with JPEG compression, there must be a mip map with a dimension of 1,
either for height or width. This seemed to be consistent with my results.
At first I thought you had to reach 1x1 or have the max mip map count for that size,
but the knight/garithos skin worked with 9 mip maps -> lowest dimension is 2x1.
The quality control and the sub-options for JPEG compression have no effect
on whether the texture crashes.
However, paletted textures work with any mip map count. They will not crash,
and the options (colors/encoding) will not cause the map to crash.
So how did Weep come to his conclusion? He tested it for icons, and he found
out what worked. Thank goodness too, because this would've taken
even longer otherwise. The reason why the magic number "7" works for icons
is that icons are 64x64, which means the mip map count is 7. This follows my
rule that the final mip map must contain a dimension of 1.
For regular (a x a) dimension textures, you must have the max mip map
count if you use JPEG compression. To calculate this, 2n-1 = dimension.
For example, 2n-1 = 64, ... ln(64)/ln(2) + 1 = n = 7
For irregular ( a x b) dimension textures, you would use the same equation, but
you would plug in the smaller dimension for the equation. For example, for garithos:
2n-1 = 256, ... ln(256)/ln(2) + 1 = 9.
Tools:
- BLP Lab - Will allow you to set the mip map count of a BLP.
- ButtonManager - Can work if the settings are adjusted properly.
If you use JPEG compression, it will work so long as you adjust the settings as Weep described (see the quote above).
For good measure, always open up the icon in BLP lab and check the mipmap count. - Wc3Borderizer Online - Appears to produce the appropriate icons with 7 mm count.
- BLPaletter - Confirmed that this works. Use the paletted option. Note that this does not
work on BLP's and PNG files; those formats are not supported by the tool.
------
Thanks to Weep for the preliminary information, Shadow Daemon for BLP Lab
and ButtonManager, Cohadar for requesting whether his tool works (I ended up testing this afterward),
PitzerMike for BLPaletter.
Last edited: