Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 10-29-2012, 08:02 PM
nilbog
Hill Giant
 
Join Date: Nov 2007
Posts: 198
Default Fix for transparency/black splotches

NOTE: It is reported this is not compatible with texture upgrade (discussed here). If you use these updated textures, experiment at your own risk.

NOTE: I have only tried this on EQ Titanium, so I am unsure how/if it will work on other clients.

I haven't time to work on this in months, so instead of it stagnating, I'm releasing the executable and relevant .bat for the community as a whole. Hopefully something good will come of it!

--------------------------------------------------------------------------

Ever notice half elf visors are sealed shut? Eye of Zomm is black?

These issues and many more can be fixed.

Original credit goes to Ropethunder for creating the transpfx.exe file.



Examples of fixed textures:




Other notable fixes:
  • Plate chest pieces having black spots - half elves, dark elves, etc.
  • Certain player models having black spots in hair or faces - high elf female, dark elf male.
  • Many, many models having black feet.
  • Black spots on sand giants, snow orcs, dragon wings, qeynos hills buildings.
  • Transparency issues for pegasus wings, trakanon wings, felguard visors.
  • many more


To use:
  • Download http://www.project1999.com/files/tra...ncypatcher.zip
    • If you're worried something might break, back up your files, or work on a different eq install.
  • Extract patch_s3d_textures.bat and transpfx.exe into your \Everquest folder
  • Run patch_s3d_textures.bat file
  • Wait for it to finish
  • Restart your Everquest client
  • Enjoy

Known problem:

The female human plate helm shares the same texture as the male human plate helm but does not use transparency. As a result of enabling transparency for the male plate visor a small porthole has appeared in the back of the female plate helm.



Part 2:

For modifying the .bat file, creating your own fixes, or knowing wth is going on:

Identifying the offending texture:

Launch S3DSpy. In the left pane, there's a list of all of the texture packs in the directory. Player race textures are generally in global_chr.s3d. There's a common nomenclature for player race texture naming:

2 char. race abbrev. + 1 char. gender abbrev. + 2 char. body part abbrev. + 2 digit armor type + 2 digit texture index

An example: I want to find the texture for an ogre male chain chest piece.
Race = Ogre (og)
Gender = Male (m)
Body Part = Chest (ch)
Armor Type = Chain (02)

So all textures named ogmch02##.bmp are going to make up the chain chest appearance on an ogre male. You can highlight them in the right pane and click the view button to see if you're looking at the right texture.

Code:
Abbreviations that I know so far:

(ba) - Barbarian 
(clk) - Robes
(da) - Dark Elf
(dw) - Dwarf
(el) - Wood Elf
(ele) - Elemental
(er) - Erudite
(gn) - Gnome
(ha) - Half Elf
(hi) - High Elf
(ho) - Halfling
(hu) - Human
(og) - Ogre
(ske) - Skeleton
(wer) - Werewolf
(woe) - Wolf
(tr) - Troll
(ik) - Iksar (global4_chr.s3d)

(ch) - Chest
(fa) - Forearm
(ft) - Foot
(he) - Head
(hn) - Hand
(lg) - Leg
(ua) - Upper arm

(00) - Naked armor type
(01) - Leather armor type
(02) - Chain armor type
(03) - Plate armor type
For non-player textures, they're going to be found scattered in individual zones' texture packs. zonename.s3d contains world geometry textures. zonename_chr.s3d contains animated model textures. zonename_obj.s3d contains static object textures. The naming in these files don't really follow a sensible guideline most of the time, so put yourself in the mind of an artist (*shiver*), and hop around viewing textures until you find the right one.


Fixing the texture:

Now that you have the texture name and texture pack name, it's time to actually fix the problem. The most common issue is that there is a certain RGB value in the color palette (almost always the RGB value at the very top-left of the texture) that is getting mapped to straight black. In the case of some textures that utilize a single-color palette (most often on the feet), the entire texture will end up black. Most of the time though, there will just be random black spots on the model where they shouldn't be.




In all of these cases, it's a non-transparent palette entry that is now black. So what we want to do is use the -rt option of transpfx.exe to completely remove the transparency for that texture. More on setting up the script below.

The other known case is where black splotches appear in the place of pixels that are actually supposed to be transparent (represented by magic pink in the texture). This was the case with Trakanon:


To fix these cases, we want to use the -mp option of transpfx.exe to enable transparency for magic pink pixels.

Appending to the batch script:

Open the .bat up in a text editor.

If you're fixing a texture in a pack/option combo that already exists, then you can just add the texture name to the end of the texture list that's being modified in that pack. For example, let's say I want to remove transparency from "elmhe0062.bmp" in global_chr.s3d. The texture list "rt_global_chr" is already being processed through transpfx.exe with the -rt option on the global_chr.s3d pack. So all I need to do is append my texture name to the list like so:

Code:
set rt_global_chr=%rt_global_chr%,elmhe0062.bmp
If the texture you're fixing is in a pack file that isn't already being processed by the script, or isn't using the executable option you need, then you need to create a new texture list, and then set up the code block to actually process that list. Let's say I want to remove transparency from funch0001.bmp in sebilis_chr.s3d:

Code:
set rt_sebilis_chr=funch0001.bmp
Now that my texture list is set up, I need to process it. I'd add this to the part of the script where similar calls exist (remember, you don't need to do this step if the texture list already existed):

Code:
echo.
call :PatchS3D "sebilis_chr.s3d" "-rt %rt_sebilis_chr%"
if %ErrorLevel%==1 exit /b
Now you can run the script from your Titanium install directory. Restart EQ, and check to see if you got the result you wanted.

Instructions courtesy of kanras.

Enjoy!
__________________
https://www.project1999.com

Last edited by demonstar55; 03-17-2016 at 02:25 PM.. Reason: Update download link
Reply With Quote
  #2  
Old 10-30-2012, 02:42 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

That is some interesting information. Thanks for sharing, Nilbog!

I haven't done much testing on that, but I am certain I have seen that issue in a few places (specifically the evil eye for sure). Do you know if that is just an issue with the specific client that is Titanium? If the issue is purely client-side, then I would assume it would have been fixed at some point, so it may not exist in the newer SoF+ clients, though I would need to test to verify. If it isn't client specific, and doesn't happen on Live as well, then it seems like it could possibly be an unknown field in the spawn struct for toggling transparencies or something. Again, I haven't done any research on this, so I may be completely off, but I can definitely imagine a field like Helm Texture that is used for turning transparencies on or off. I recall seeing a post some time in the past year about setting models in newer clients to be all black, but I don't recall the details, though it sounds like it could be related. Let me see if I can find it.

Edit - Found it:
http://www.peqtgc.com/phpBB2/viewtop...ighlight=black

Not quite the same thing being referred to there, but it is still stuff that could possibly be related to unknowns in the spawn struct.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 10-30-2012, 07:40 AM
nilbog
Hill Giant
 
Join Date: Nov 2007
Posts: 198
Default

Quote:
Originally Posted by trevius View Post
Do you know if that is just an issue with the specific client that is Titanium? If the issue is purely client-side, then I would assume it would have been fixed at some point, so it may not exist in the newer SoF+ clients, though I would need to test to verify.
It existed on live until like last month, afaik. They just started fixing these themselves. Whether problems still exist for both types of transparencies, (black/magic pink), I am uncertain.

Quote:
9/11/12 patch
soe test patch
- Corrected an issue where pre-Luclin human and half elf helmets no longer had transparencies on their visors.
- Corrected an issue where a number of pre-Luclin character models were incorrectly displaying black textures or splotches of black on their otherwise working textures. This was most noticeable on dark elf and halfling breastplates, and on nearly every model's boots.
- Corrected an issue where the Eye of Zomm had been changed from white to black.
Here is a quote from Ropethunder discussing the original issue and is a bit of a history lesson in graphics.

Quote:
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.

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.
One thing I was curious to try was to run -rt and -mp versus the entire client's s3ds. This problem likely expanded to individual .bmp files that I have grown accustomed to seeing since Luclin. That's when all of these were broken.
__________________
https://www.project1999.com
Reply With Quote
  #4  
Old 10-08-2013, 12:09 PM
knowom's Avatar
knowom
Discordant
 
Join Date: Jun 2006
Posts: 371
Default

Nilbog sorry to necro a old thread though this thread probably should have received a sticky this was nice work sir, but can the .bat file that tells transpfx.exe what to patch be configured to replace any .s3d textures? Like can this be used for patching texture in more ways than transparency fixing glitches say customizing zone textures.

For example you could in theory have a .bat that would replace Oasis textures for Great Divide textures inverting their overall look and feel.

Now a great use for it would be to retool the textures for zone_points say you want to put the entrance to guk over in qeynos where black burrow is and black burrow over in innothule you could now do that and actually make the textures match right.

Can this be done by configuring the .bat file the right way in theory? Sorry that was a quickie attempt could look far better, but you get the idea Unrest with a couple of Nexus textures replacing some of the defaults.
__________________
"We are all on the same team, and I think not enough people realize this."
- Leetsauce
Reply With Quote
  #5  
Old 03-17-2016, 02:26 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

Main post updated with new download link.
Reply With Quote
  #6  
Old 03-21-2016, 04:38 PM
zerjz3
Banned
 
Join Date: Aug 2010
Location: Sanctuary
Posts: 269
Default

Still hoping for a version of this tool that fixes the textures for newer clients. RoF2 doesn't actually use bmp textures anymore, but you would think it does just looking at the s3d files because they didn't bother to remove .bmp from the filenames when everything was transferred over to DDS file type. As is, this tool will only work with Titanium and RoF2 texture transparencies are still broken
Reply With Quote
  #7  
Old 05-23-2016, 05:14 PM
Ropethunder
Fire Beetle
 
Join Date: Apr 2007
Posts: 16
Default

Quote:
Originally Posted by zerjz3 View Post
Still hoping for a version of this tool that fixes the textures for newer clients. RoF2 doesn't actually use bmp textures anymore, but you would think it does just looking at the s3d files because they didn't bother to remove .bmp from the filenames when everything was transferred over to DDS file type. As is, this tool will only work with Titanium and RoF2 texture transparencies are still broken
Hello. Ropethunder here. Can you provide a .s3d file which the offending DDS textures so I can see them? Please also include a screenshot of the faulty rendering.

I don't know what RoF2 is so I'll need very specific details about which client to use, which race/armor and or world zone/coordinates to look into this.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:35 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3