Menu
 

How to Make Skin Sections Invisible

Started by idrinkdrpepper, August 21, 2007, 09:14PM

Previous topic - Next topic
August 21, 2007, 09:14PM Last Edit: August 21, 2007, 09:20PM by idrinkdrpepper
Suppose you are working with a skin that has an undesirable component that you would want to erase rather than re-color.  As you may already know, coloring over part of a skin texture with black doesn't erase it, it just makes it black.  However, there is a hexadecimal value that does represent "invisible color".  This value is 00 00 00 00 00 00 00 00 C7 39 C7 39 00 00 00 00. Here are the steps to replacing a skin part with invisible color:

1. Open the .igb file in TextureFinder and set it to the offset of the largest sized texture
2. Take a snapshot of the texture and then open it up in a bitmap editor (MS paint for example)
3. Locate the texture part you wish to make invisible and color over it with a color that doesn't occur in the rest of the file (pure green, red, or blue are good choices).  When you color over the skin part, go slightly outside of the lines without running into other skin parts, making sure the entire border is colored over.
4. Then, do the RGB -->BGR conversion (if necessary), save the bitmap, and reinsert it into the .igb file using skinnerui
5. Open the .igb file in TextureFinder once more.  You should see the selected skin part colored blue (or red or green), as expected.
6. Use the TextureFinder to find an offset value somewhere in the center of the skin part and write that number down.
7. Open up the .igb file in Hex Editor and go to the offset value that you wrote down.  At that location, you should see a 32-digit repeating sequence in the hexadecimal panel.  This sequence represents the color you selected.  For blue, I think it's something like FF FF FF FF FF FF FF FF 00 F8 00 F8 00 00 00 00.
8. To replace all the blue skin parts with invisible code, simply run a search and replace:

Search: FF FF FF FF FF FF FF FF 00 F8 00 F8 00 00 00 00
Replace with: 00 00 00 00 00 00 00 00 C7 39 C7 39 00 00 00 00

9. Save the .igb and now all the skin parts that you colored blue (or red or green) will become invisible.

** I've only tested this for DXT3 textures.  I'm not sure how the method should be altered for the DXT1 format. 

August 21, 2007, 09:31PM #1 Last Edit: August 21, 2007, 10:11PM by iammingy
thanks, let me try this... :)

EDIT: I have tried it on DXT3 textures. The hex value you gave doesn't turn transparent but grey instead?

Alternatively, if you're doing DXT3 or -DXT3 you can create an alpha channel in Photoshop or GIMP (a free alternative), then save as BMP and import into MUASkinner (haven't tested PS2skinner).


I've done it with a large number of skins, but it's gotta be DXT3 or -DXT3.  So far I've had no problems doing it on any model with those settings.


Oh. I didn't realize the DXT3 came with an alpha channel.  In that case, it's probably better to modify that if you know how. 

For the MUA skins, am I correct in guessing that the alpha channel is included in those green DXT3 textures?  If that's the case, then those textures would need to be modified to make the skin parts invisible.

Actually, those "green" DXT3 textures are the "bump", or normal maps of the characters, which are really DXT5 (interloped alpha) images with information on the green channel and alpha channel.  Texture finder is good for finding the offsets (DXT3 is the same size as DXT5, so that's why DXT3 shows the image perfectly), but in order to get the alpha information, you have to manually rip it with a hex editor.  You cannot modify them to make skin parts invisible, because the alpha channel is intertwined with the green channel to produce the bump effects (one has the vertical light data, the other has the horizontal light data).
Some day, someone will best me.  But it won't be today, and it won't be you.


The artist formerly known as Burning Rage.

Has anyone been able to further refine the process of making sections invisible? Sadly I can't figure out how to do this, probably at least partially because I've been working with skins in DXT1.

Actually, I've ended up going backwards.  I used to be able to do it with certain models but lately even with the alpha channel present ( you can see it in TextureFinder ) it doesn't do anything.  I don't know what I did, or what I'm not doing now.

Quote from: Burning Rage on August 23, 2007, 03:16PM
Actually, those "green" DXT3 textures are the "bump", or normal maps of the characters, which are really DXT5 (interloped alpha) images with information on the green channel and alpha channel.  Texture finder is good for finding the offsets (DXT3 is the same size as DXT5, so that's why DXT3 shows the image perfectly), but in order to get the alpha information, you have to manually rip it with a hex editor.  You cannot modify them to make skin parts invisible, because the alpha channel is intertwined with the green channel to produce the bump effects (one has the vertical light data, the other has the horizontal light data).

I think you can still do it manually, because looking at the green texture you can distinguish between the visible and invisible parts.  So even if you can't extract the alpha channel you should still be able to replace 'visible' code by 'invisible' code, using a method similar to my first post.  I haven't tried it because it sounds like a pain.

Quote from: idrinkdrpepper on October 30, 2007, 08:56AMlooking at the green texture you can distinguish between the visible and invisible parts.
So there are models already within the game which use transparent textures? Which one(s) would that be?

Quote from: Crowley on October 30, 2007, 09:43AM
Quote from: idrinkdrpepper on October 30, 2007, 08:56AMlooking at the green texture you can distinguish between the visible and invisible parts.
So there are models already within the game which use transparent textures? Which one(s) would that be?

I think most of them.  The texture is a square image, but when the graphic that gets pasted onto the model doesn't take up the entire square, the rest of the stuff needs to be invisible.  For example, when you create icons, you can copy-and-paste square images onto your texture bitmap and then the alpha channel template of circles will block any part of the graphic that lies outside of the circles.  And when I was modifying Ghost Rider's chains to look like coils for the Omega Red mod, I had the coil graphic in the center of my texture and the rest had to be alpha-ed out.  If I didn't include an alpha channel, the coil would have shown up as a thick rectangle with a coil graphic in the center as opposed to just the coil graphic.  But, supposing you can't access the alpha channel, you would have to look at the texture in a hex editor and see what 'invisible code' looks like and then copy that over the graphics code that you would like to make invisible. 

Can someone help me with the steps to find out an alpha channel? As it is, I am not getting how to find it in DXT3 formats. Please help.

January 17, 2008, 11:17AM #14 Last Edit: January 18, 2008, 02:15PM by iammingy
I assume you are using GIMP or Photoshop. Otherwise, get Gimp, it's free!

Photoshop:

If you can't find it in the channels tab, then you can make one by creating a new channel. The new channel should be named as "Alpha 1" automatically. Plese be advised that the parts of the skin you want to show up should be white in the alpha channel. On the other hand, the parts of the skin you want hide should be black in the alpha channel. I have tried it myself and it didn't work on all skins. I found that the modified alpha channel works if the skins/models,etc. already utilize the alpha channel (<-- I mean the ones that DOESN'T have just a plain white alpha channel!). If it does have a plain white alpha channel, then it is VERY (not "totally") unlikely that nothing will be changed in the game, no matter what you do to the alpha channel.

Gimp:

Someone who uses gimp can teach you. Sorry.