[Tutorial] Texture Alpha Mask correction

User avatar
Alundaio
S.T.A.L.K.E.R.
Posts: 1368
Joined: 26 May 2012, 22:26

[Tutorial] Texture Alpha Mask correction

Postby Alundaio » 11 Nov 2016, 03:05

This tutorial teaches you how to fix the visible white lines errors around transparent in-game sprites.



Image
At first glance these icons appear just fine. But, the alpha mask is hiding some errors within the R G B channels (most likely caused by using Paint.net)

How to detect errors:
  • Open the *.dds with Gimp.
  • Colors > Components > Decompose

    Image
  • Whoa! Now we see why there is visible white lines around our icons! If you inspect each channel you'll see white blotches in R G B but Alpha channel
    is fine.

How to fix errors:
  • Open the *.dds with Gimp.
  • MENU > Right-click the layer and Alpha to Selection
  • Copy and Paste layer
  • On the original layer select the alpha with the magic wand
  • Invert selection
  • Copy and Paste layer
  • Delete original layer
  • Merge visible layers (keep image size) and Save

You should be finished. Examine the image and compare to the original to make sure it is visually the same.
"I have a dream that one day this community will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident; that all mods are created equal."

User avatar
olivius74
Loner
Posts: 469
Joined: 12 Apr 2014, 17:09

Re: [Tutorial] Texture Alpha Mask correction

Postby olivius74 » 11 Nov 2016, 11:55

Hello Dear Alundiao
You always write extraordinary tutos.
Thank a lot,Gimp seems genious,more easy at first look than my old photoshop version.
Just need for first install to add the dds pluggin https://code.google.com/archive/p/gimp-dds/

http://imgur.com/a/dE3R3

Very usefull because for my hud ,I found many transparent errors!
Thank's a lot
Have a good week-end

User avatar
Comatose
Scavenger
Posts: 3
Joined: 18 Sep 2016, 13:00

Re: [Tutorial] Texture Alpha Mask correction

Postby Comatose » 12 Nov 2016, 04:00

I found a workaround that works in paint.net. Instead of using the eraser or selecting and deleting things, use the tools with the alpha set to zero, the blending mode set to overwrite, and the color set to what color you want the alpha mask to be.

User avatar
Alundaio
S.T.A.L.K.E.R.
Posts: 1368
Joined: 26 May 2012, 22:26

Re: [Tutorial] Texture Alpha Mask correction

Postby Alundaio » 15 Jan 2017, 15:04

in Gimp I found a better way
you just right-click layer, add Layer Mask
then add alpha mask
and then when you right-click again you can see options to show or edit the layer mask
and edit alpha mask directly. When you are happy with it, you just click apply layer mask
"I have a dream that one day this community will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident; that all mods are created equal."


Return to “Modding Tutorials”

Who is online

Users browsing this forum: No registered users and 1 guest

cron