Jump to content

Layer add transparent color


Recommended Posts

Hi,

 

I am using paint.net for a game project I am recently working on. For my textures I need

- a "light map/texture" (which stores only rgb values and alpha is zero)

- and a camouflage map (which stores only alpha values but rgb is zero)

 

Now I wanted to combine both layers to one layer. Sadly paint.net seems to ignore pixels with an alpha value of zero no matter which option I choose.

 

Little example, we have a 1x1 image. So one pixel.

> Layer 1: r = 1, g = 1, b = 1, a = 0

> Layer 2: r = 0, g = 0, b = 0, a = 1

 

When combining both layers (no matter what blending option used) the result is:

r = 0, g = 0, b = 0, a = 1 (Pixel from layer 2)

However, the result should be

r = 1, g = 1, b = 1, a = 1

 

How can I avoid that? I want both layers to be added together and alpha zero values not to be ignored. Is this a bug of the additive mode?

 

I need this because the alpha values are representing channels to indicate the graphics card which color to set for this pixel from 1 to 255 different colors. While the r, g, b colors are modifing those colors represented by the alpha values.

 

Thank you very much,

Icca

Edited by IceCave
Link to comment
Share on other sites

As far as I understand it, this is the intended behavior.  Think about layers as a stack of plastic overhead transparencies.  When you flatten or combine the layers, whatever is visible from above the stack of transparencies becomes that new layer.  Since transparent pixels are invisible, they do not affect the merge.

 

You may find more luck using the Alpha Mask plugin in this instance.

 

The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.
Amy: But how did it end up in there?
The Doctor: You know fairy tales. A good wizard tricked it.
River Song: I hate good wizards in fairy tales; they always turn out to be him.

Link to comment
Share on other sites

Like david said, use the "alpha mask import" plugin to do this. Open your camouflage image, select all (ctrl+a) and copy (ctrl+c). Then, go to your other image and run the alpha mask plugin. Make sure you have the "mix" box unchecked and the "from clipboard" box checked. Invert mask if necessary.

It's a little more work than what you were looking for, but it should do the job. Good luck!

 

what I do all summer Emote Cursor Pack 'noob gallery

No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait

Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo

Link to comment
Share on other sites

The more I am thinking about it the more it makes sense. I now also noticed that the standard transparency color is white. That would cause a mess and is totally useless for many users :|

 

The alpha mask plugin works more or less like expected. The alpha values are not exactly correct (1, 3, 6 instead of 1, 2, 3 i.e.), however they are located in the right position.

 

I guess you will see me in the plugin section in a few days, again. Adding a new skinning mode. :)

 

Thank you very much for your help

- Icca

Link to comment
Share on other sites

Something you might want to watch out for is that, in paint.net v4.0, RGB values are not saved for pixels that are completely transparent.

  • Upvote 1

 

what I do all summer Emote Cursor Pack 'noob gallery

No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait

Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...