Alpha Color

Mike

Veteran
Veteran
Joined
Aug 28, 2013
Messages
316
Reaction score
36
First Language
English
Primarily Uses
I'm an amateur when it comes to graphic art, I did photoshoping years back, but I never try color manipulation (beside burn and opacity -> is that even coloring?). : p

So yea, I have this picture with white background, and I've browsed a bit using google that alpha can be used to make the white background to be transparent, but when I browsed about alpha value and manipulation alpha, I was sent to pages of math formulas, haha. And I tried looking at the photoshop, but I can't find alpha color. I found rgb and black though. Sorry, that I've been asking questions a lot lately, I just want to build a nice game for free. : x

So yea, what should I use as value for alpha to make the white background to be transparent? What if the alpha background is black? What if it's purple? And yes, they are solid colors (solid white, solid black, and so on).
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
I use GIMP, so the exact instructions will vary, but in the Layers command, I select Transparency, then Add alpha channel.  Then I can simply select the background with a tool which might be called a Magic Wand in Photoshop and simply delete it, leaving it transparent around the main image.  I would imagine that it is something like that in Photoshop.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,669
First Language
German
Primarily Uses
RMMV
if the white is a unicolor white, you might want to save the picture as BMP and then add it by the resource manager. That way the resource manager can create the alpha channel transparencies for you (don't save it in a format that already has an alpha channel, as the resource manager will then assume that the transparancy already exists).


However, that will usually make the picture larger compared to directly creating the alpha data in a program like photoshop.


With photoshop, you create a new file with transparent background, copy the image data into that and then use magic selection and delete to remove the solid color parts before saving in a format that allows for transparency (PNG is what is used in RM)
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Alpha is not a color. That is why you are getting math.


If you are looking for a solid color that would be safe to use as a transparency mask, you should pick a color that the sprite does not have. You can use different colors for different sprites; as long as RM doesn't have to work hard to figure out whether one pixel should be rendered or not.
 
Last edited by a moderator:

Mike

Veteran
Veteran
Joined
Aug 28, 2013
Messages
316
Reaction score
36
First Language
English
Primarily Uses
Thanks for the inputs. : )

I use GIMP, so the exact instructions will vary, but in the Layers command, I select Transparency, then Add alpha channel.  Then I can simply select the background with a tool which might be called a Magic Wand in Photoshop and simply delete it, leaving it transparent around the main image.  I would imagine that it is something like that in Photoshop.
Does GIMP support multi-files manipulation? For example: I have 200 small pictures with the same alpha type, do I need to go to each picture and manually do the transparency thingy? Or is there a function where I could just open all files and manipulate them altogether like some kind of synchronization.

if the white is a unicolor white, you might want to save the picture as BMP and then add it by the resource manager. That way the resource manager can create the alpha channel transparencies for you (don't save it in a format that already has an alpha channel, as the resource manager will then assume that the transparancy already exists).

However, that will usually make the picture larger compared to directly creating the alpha data in a program like photoshop.
With photoshop, you create a new file with transparent background, copy the image data into that and then use magic selection and delete to remove the solid color parts before saving in a format that allows for transparency (PNG is what is used in RM) 
Hum, I dealing with hundreds of pictures (similar names happen) and sub-folders, so going to the resource manager might not end well for me. : p

And yea, I've done transparent works more before with the lasso / wand, but doing so hundreds of time is discouraging. xD

Alpha is not a color. That is why you are getting math.
If you are looking for a solid color that would be safe to use as a transparency mask, you should pick a color that the sprite does not have. You can use different colors for different sprites; as long as RM doesn't have to work hard to figure out whether one pixel should be rendered or not.
Oh, how do you do that transparency mask?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
It doesn't need to be explicitly an alpha channel.


You can just flood fill all the transparent parts with a particular color.


If you're using a modern image editor that supports alphas, you can even just delete all the pixels and it will automatically be saved with the correct transparencies assuming your format supports it (eg: 32bpp PNG)


If you need to do batch image processing you should look into imagemagick.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Does GIMP support multi-files manipulation? For example: I have 200 small pictures with the same alpha type, do I need to go to each picture and manually do the transparency thingy? Or is there a function where I could just open all files and manipulate them altogether like some kind of synchronization.
Truthful answer is I've never tried, but I don't think so.  But maybe some GIMP wizard will drop by and say, "Of course there is.  You just....
 

Mike

Veteran
Veteran
Joined
Aug 28, 2013
Messages
316
Reaction score
36
First Language
English
Primarily Uses
If you need to do batch image processing you should look into imagemagick
Thank you so much, my life is complete.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,669
First Language
German
Primarily Uses
RMMV
Another tool usefull for image batch processing and image management is ThumbsPlus.


Thumbsplus is the cheapest image viewer I know of that also supports content analysis of pictures - most other image management programs, when asked to find duplicates, look at filenames only - ThumbsPlus analyses the picture content instead, and you can set the filters to find false-colored variants of the same pictures with different names and things like that.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
you can also just use like Paint.net, use magic wand to select the white background or whatever color you wanna "erase", press delete... save as .PNG... on the file browser of windows, it will probably look like it has a white background but programs that will use it will already know that it is in face transparent
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top