Transparent chroma key

Non-platform specific questions.

Transparent chroma key

Postby GreenGame » Fri Jan 05, 2007 4:38 am

The image that I'm using for a moving actor has a green chroma key background. Is there a way to use GE to make the chroma key transparent?
GreenGame
 
Posts: 8
Joined: Sat Dec 30, 2006 4:50 am
Score: 0 Give a positive score

Postby irblinx » Fri Jan 05, 2007 11:05 am

What image format are you using?

My understanding of this is that for 24bit files GE uses the alpha transparency of the image, otherwise the colour of the top left corner pixel dictates the transparent colour of the image in GE.
irblinx
http://www.irblinx.me.uk/Crania.htm
Current projects: Crania deluxe for Mac, iCrania
User avatar
irblinx
 
Posts: 122
Joined: Wed Apr 19, 2006 11:15 am
Location: Manchester, UK
Score: 6 Give a positive score

Postby makslane » Fri Jan 05, 2007 1:23 pm

24bit files GE uses the alpha transparency of the image

For 32 bit files!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Game A Gogo » Fri Jan 05, 2007 10:16 pm

24 bits is only 255x255x255 which is not 32bit 255x255x255x255 (the 3 firts 255 are the colors and the last one is the transparent)
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby irblinx » Fri Jan 05, 2007 10:47 pm

makslane wrote:
24bit files GE uses the alpha transparency of the image

For 32 bit files!


er .... yeah ... that's what I meant :roll:
irblinx
http://www.irblinx.me.uk/Crania.htm
Current projects: Crania deluxe for Mac, iCrania
User avatar
irblinx
 
Posts: 122
Joined: Wed Apr 19, 2006 11:15 am
Location: Manchester, UK
Score: 6 Give a positive score

Postby GreenGame » Sat Jan 13, 2007 5:05 am

My image is a jpg.

Can both JPEG and GIF work for transparencies? Will a pic lower than 32 bit work or not, and does the 32 bit mean size or quality?
GreenGame
 
Posts: 8
Joined: Sat Dec 30, 2006 4:50 am
Score: 0 Give a positive score

Postby makslane » Sat Jan 13, 2007 2:19 pm

32 bit image means a image with 24bits for color (R, G, B) per pixel plus 8bit for alpha channel.

Jpeg don't have alpha channel and, due compression, the color hue change every pixel. So, you don't have solid colors with jpeg.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Game A Gogo » Sat Jan 13, 2007 6:54 pm

actually, not all pixel, the Jpeg files have some sort of compression system, depending on the compression value (from 0=smallest file/worts quality to 12=biggest file/best quality (Doesn't change the picture at all)

And depending on the compression value, you will be able to see that there is a somewhat square.

In other words, you can have a jpeg whit maximum quality, and have the worts of them.

Note:
When you have a solid section of color (MonoColor), it doesn't get blurred out

Note2:
MS Paint saves Jpeg image at a compression size of 6-7, so it has the most of small file and quality.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Fuzzy » Sat Jan 13, 2007 11:38 pm

It is not true that a jpg of 100 quality has no detail loss.

Here is the original image in png format, which is compressed in a way that doesnt result in lost information..

Image

Here is the jpg version of that set to 100 quality.

Image

...and here is the result of both images being subtracted from each other.

Image

The lesson is: Dont trust jpg to not mangle your graphics.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Postby Game A Gogo » Sun Jan 14, 2007 6:13 pm

well, when i save my JPG, i save them at 120% quality, so there is absolute no loss
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest