![]() |
#1
|
||||
|
![]() 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. [You must be logged in to view images. Log in or Register.] 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. [You must be logged in to view images. Log in or Register.] 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] Options: --help Display this information. -all Removes transparency from all supported texture files. -mp <file[,..]> Update the specified entires to use magic pink for transparency in their color palette. -rt <file[,..]> Remove transparency for the specified entires. -skip <file[,..]> Skip the specified entries. -o <file/path> Specifies the location and/or name of the new pak file to be written to disk. -q Do not display output while parsing. 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:
[You must be logged in to view images. Log in or Register.] | |||
Last edited by Ropethunder; 01-09-2025 at 01:57 AM..
|
|
|