![]() |
Transparency patcher for legacy textures
1 Attachment(s)
The transparency bug we experience now as either black splotches or missing transparencies is the result of inherited cludge from earlier versions of EQ where new requirements did not update old specifications. You can see this problem inconsistently across as black swirls, spots, or swaths of color missing or transparency (see stumps in Swamp of No Hope). This is also the cause of many shoes appearing completely black.
I've written a tool which extracts bitmaps from a .s3d pak file and patches them to correct this error. The legacy issue is the result of the method of evaluating transparent pixels being changed over and over until the first (and very old, at which point) version no longer functions. The first release of EverQuest was based off of a OpenGL/Glide engine and most likely did not use any form of texture clamping. This would be the basis for how textures and their transparent color would be handled. http://i.imgur.com/UULvWUC.png All legacy .bmp textures used the first index in their 8-bit color palette to denote the transparent color within the texture. This color also matches a large portion of the texture which suggests that the original engine would bleed neighboring pixels into the visible area. This is most likely why no single color was chosen to be transparent across all textures. By the time Kunark was released, the EverQuest engine had transitioned from OpenGL to DirectX and advances in rendering technology had solved the texture clamping problem. Magic pink (0xff00ff) now become a common theme to denote transparent pixels. I don't know if texture transparency broke when the engine was transitioned to DirectX or later when .dds become the new format of choice. Regardless, I hope you enjoyed learning a little bit about EQ's history and why things are the way they are. Textures which should have transparency but do not (such as some helmets, stumps in Swamp of No Hope, and various other things) can be fixed by setting the first index in the palette to magic pink. http://i.imgur.com/U4szL8k.png At some point all of the textures which should not have transparency began to take the first palette texture and attempt to use it as a transparent pixel. The result was that color drawing as black on the surface of the model. This can be seen most prominently on shoes which utilize only one color. Textures with a full 8-bit palette will have their first index matched with the nearest color in the palette and will be blended with it at 50% opacity. The old color pixels will then be mapped to the new one, eliminating any pixels being mapped to palette index 0. Textures with a partial palette like shoes which may have two colors (brown and black, for example), would not be suitable candidates for this solution. Instead, their palettes will be expanded to encompass mapping the old palette color to a new index and all pixels will then be updated accordingly. The tool provided, "transpfx.exe" provides several command line parameters to customize how the patching will proceed and which files will be affected: Code:
Usage: transpfx file [options] Don't ask me why "some" legacy textures work, such as trees and some helmet textures (high elf male ear pieces). I have no idea. There is probably something being evaluated in the .wld files that I don't know about yet. No textures, pixels, or diffs are included with this tool so it is 100% free from Sony's copyrights. Feel free to download, link, or mirror it wherever you like. Textures fixed in this release: Quote:
http://i.imgur.com/786TWvT.png |
Will this work on the updated Velious released textures as well as the classic files?
|
Wow, nice work :):)
|
|
Ropethunder is totally legit. I downloaded his first transparency patch and it fixed all the half elf/human helms perfectly. I don't wear a helm but I like to see people's eyes when I look at them.
|
I'm looking forward to trying this out when I get home!
|
Quote:
|
I downloaded this and extracted to my EQ directory. I then clicked on the batch file and a dos window popped for a sec then closed. My game now crashed upon character select have to do a reinstall... did i do something wrong ?
|
Quote:
To fix your EverQuest installation, search the directory for *.old. Your old .s3d files should still be there. The patcher is supposed to roll back the changes if a problem occurs and display a diagnostic error. Instead of double clicking on the batch file, open a command prompt in that directory and then run it. That will make sure that you will see all of the information as it appears without the window closing by itself. You will probably have to rename the .old files to .s3d files first. |
Updated the link in the first post with some bug fixes. Now with superior error handling. :)
If you have any errors, please paste the output you get from the command line. |
All times are GMT -4. The time now is 12:31 PM. |
Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.