Problem With Textures From TexMod

Oblivion Odyssey

Frost Gate Guardian

Join Date: Jun 2006

King Of Slaying [Leader]

W/Mo

Hopefully this is in the right place, i just figured this is where the "How to mod GW" thread was.

Anyway I'm having a serious problem, where if I try to extract to a BMP, when I modify the image and put it into my game I get a really shiny texture. I've found out this is because I'm using GIMP as my image editor. So then I try to extract the texture to a DDS (I have a plugin so GIMP can handle DDS), but the texture I get is really really transparent, to the point where I can only see little bits and pieces of it. I'm kind of stuck for ideas as to how to fix this. Any help is really appreciated.

Thanks a lot.

Chthon

Grotto Attendant

Join Date: Apr 2007

1. That is not because you are trying to use the GIMP, but because you are trying to use a bmp when you should be using a .dds.

2. The issue here is the alpha channel. Very simplified explanation: A bitmap has 3 values per pixel: Red-ness, Green-ness, and Blue-ness. More advanced image types add a fourth value, called "alpha" which most image programs (including GIMP, photoshop, etc) use for Transparent-ness. Now, here's the problem: GW does not always use the alpha channel for transparency. Sometimes they use it for shininess. And sometimes they get really tricky and use low digits for transparency and high digits for shininess.
So you get the shiny stuff when you use a bitmap because TexMod fills in the missing alpha channel entirely with the value for no-transparency, which GW then uses as shininess instead.
And you see the very transparent image while viewing a .dds because your image program sees as transparency what the game interprets as shiniess.

3. Solution:
First, goto "Layer," "Mask," "Add Layer Mask." Select "Transfer Layer's Alpha Channel."
Second goto "Layer," "Mask," "Show Layer Mask."
Third, select all, copy, make a new file, paste to the new file, save the new file, close the new file.
Fourth, goto "Layer," "Mask," "Delete Layer Mask." You now should have an image with no transparency.
Fifth, edit the image to your liking.
Sixth, open the file where you saved the original alpha, select all, and copy.
Seventh, on your edited image, goto "Layer," "Mask," "Add Layer Mask." It does not matter which mode you choose.
Eighth, goto "Layer," "Mask," "Show Layer Mask."
Ninth, paste into the layer mask. Press ctrl+H to anchor your paste.
Tenth, goto "Layer," "Mask," "Apply Layer Mask." The image should look very transparent again.
Now save as DXT5 .dds and use in your mod.

(If you made very substantial changes to the image, you may have to change the alpha data to make the shininess match up with your new image.)

Oblivion Odyssey

Frost Gate Guardian

Join Date: Jun 2006

King Of Slaying [Leader]

W/Mo

Thanks so much for the very detailed reply, im trying it now

That worked really well, thanks so much!

Only one more question, is there any way to make a texture transparent? Thanks again.

rohara

rohara

Krytan Explorer

Join Date: Nov 2006

Rt/

in yr alpha channel, white = completely solid and black = completely transparent. if you make the whole alpha channel black, the texture (in theory) will be transparent.

Chthon

Grotto Attendant

Join Date: Apr 2007

Quote:
Originally Posted by Oblivion Odyssey
Thanks so much for the very detailed reply, im trying it now

That worked really well, thanks so much!

Only one more question, is there any way to make a texture transparent? Thanks again.
You can set the alpha values in your image any way you like, but you can't change the way GW chooses to interpret them for a given texture. That means:
  • For textures that use the alpha for transparency only (example: most UI elements), you can get transparency.
  • For textures that use the alpha for shininess only (example: most segments of most armor), you can't get transparency.
  • For textures that use the alpha for both transparency and shininess (example guild capes), you can get transparency, but it may take several tries to get what you want. AFAIK, no one's really sat down and figured out exactly how these blended alpha uses work. I suspect that they are using the high byte for shininess and the low byte for transparency, but I haven't verified that.

One more thing of note, since you're working on armors: The way GW interprets the alpha channel can vary from patch to patch within the same file! For example, Rurick's texture is all in one file; most of the file gets interpreted as "alpha = shiny," but the patch that represents his cape gets interpreted as "alpha = blended."

Maybe one other useful note: Generally, you can tell how the alpha on a given file is going to get read by looking at it. If it's close to white, the alpha probably gets read as transparency. If it's close to black, it probably gets read as shininess. If it's grey-ish, it probably gets read as blended.

Final, final note (then I'll shut up): The DXT5 .dds format supports alpha channel; the DXT1 .dds format does not. Make sure to save anything with transparency and/or shininess as DXT5. Also, you can sometimes take a file that's originally DXT1 and introduce transparency by saving it as a DXT5 (example:the "menu" button).

Oblivion Odyssey

Frost Gate Guardian

Join Date: Jun 2006

King Of Slaying [Leader]

W/Mo

Thanks again, although I'm having a bit of trouble, im not quite sure how to edit the alpha channel, I could really use some of your step by step instructions for dummies again for example, how do i get a part of this texture transparent? thanks a lot

Code=007

Code=007

Academy Page

Join Date: Feb 2007

Tomorrow Never [dies]

A/

Im not sure how to do it on Gimp, on photoshop you have a tab named Channels, there are four R,G,B and alpha. maybe they are on Gimp, just look around :3

Chthon

Grotto Attendant

Join Date: Apr 2007

Quote:
Originally Posted by Oblivion Odyssey
Thanks again, although I'm having a bit of trouble, im not quite sure how to edit the alpha channel, I could really use some of your step by step instructions for dummies again for example, how do i get a part of this texture transparent? thanks a lot

This time, you're not asking so much for how to do one specific thing that I can give step-by-step instructions for. GIMP has numerous features that allow you to edit alpha/transparencies:
  • Under "Dialogs" --> "Channels" you can highlight the alpha channel. Then you can draw on it. Unselect it (or select another channel or layer from the layers menu) to cease editing it. (If the image has no alpha channel to start with, you must first add one using "Layer" --> "Transparency" --> "Add Alpha Channel" or by adding and applying a layer mask (see previous post).
  • You can add a layer mask, then show it, then draw on it. When you apply it, your edits will be applied to the alpha layer.
  • You can do various layer-related transparency edits via the "Layer" --> "Transparency" menu. Read the related manual pages for details.
  • If I recall correctly, you can also do various selection-related transparency edits. Check the manual.

So now, WHAT color to draw?
You're going to want to be drawing in black, white, and shades of "perfect" grey. There's a button to set the current colors to black and white. To get perfect greys, double click either current color and enter the value you want in the "HTML" notation field. (Brief description of "HTML" color notation: This is three two-digit hexadecimal values. The three values, in order, are: Red-ness, then Green-ness, then Blue-ness. Hexidecimal means that instead of counting up [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], it counts [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F]. (So "0A" is 1 more than "09" and "10" is one more than "0F.")) To get a "perfect" grey, make sure to enter the same value for Red, Green, and Blue (example: 5B5B5B).
  • If you're working with an image where GW interprets the alpha as transparency, then pure white in the alpha channel is fully opaque, and pure black is totally transparent (literally invisible), and the shades of perfect grey fill in everything in between. Moreover, since GIMP treats alpha as transparent, what you see is exactly what you get.
  • If you're working with an image where GW interprets alpha as shiny, then pure white in the alpha is as-shiny-as-possible (the ugly thing you got when using bmp instead of dds) and black is totally dull, and the shades of perfect grey fill in everything in between. Your best bet is to use the eyedropper on what's already there to help you guess a good range of grey to use. I find that, in general, even the most shiny objects in GW tend to have pretty dark alpha.
  • If you're working with an image where GW interprets it in a blended way, you're SOL. Just kidding. But you will have to guess-and-check, since no one really knows how it works. (My guess is that it works like this: the high byte, or first digit, of each value, multiplied by 16, corresponds to shininess and the low byte (second digit), multiplied by 16, corresponds to transparency. So, for example, 2B2B2B in a "blended" image would be as shiny as 202020 in a "shininess-only" image and as transparent as B0B0B0 in a "transparency-only" image. That is, of course, only a guess. Feel free to test it out and post your findings.)

Now, how to get the color where you want it? I would probably:
Step 1: Read the manual pages for all the selection tools so I knew how to use them.
Step 2: Duplicate the layer I want to mess with.
Step 3: Toss up an alpha mask on that layer (Add layer mask, then show it).
Step 4: Make the appropriate selection(s) on the unmasked copy. (Use the layer menu (ctrl+L or "Dialogs" --> "Layers") to select which layer is active and which are visible.)
Step 5: Select the layer with the mask and do a fill or gradient fill with your chosen color(s) into the selection(s).
Step 6: Repeat 4 & 5 till you're happy with your edits.
Step 7: Apply the layer mask and go and delete the duplicate layer.

Laughing_Man

Laughing_Man

Frost Gate Guardian

Join Date: Jun 2005

Doomlore Shrine

Steel Moon [SM]

R/

well, the stuff so far has helped, but doesn't answer what I want...

I would like to know how to make a solid piece of armor (in this case, the collar on the male paragon eloinian armor) transparent.

Chthon

Grotto Attendant

Join Date: Apr 2007

Quote:
Originally Posted by Laughing_Man
well, the stuff so far has helped, but doesn't answer what I want...

I would like to know how to make a solid piece of armor (in this case, the collar on the male paragon eloinian armor) transparent.
Depends on how the alpha channel is interpreted for that bit of the armor.

If it's interpreted as alpha=transparency or alpha=blended, simply set the alpha for that patch to zero.

If it's interpreted as aplha=shininess, then there's nothing you can do. Setting the alpha to zero will just result in a black patch on the armor.

Laughing_Man

Laughing_Man

Frost Gate Guardian

Join Date: Jun 2005

Doomlore Shrine

Steel Moon [SM]

R/

dang. oh well, thanks.