Actor images and background color

jon2sjon2s Member Posts: 40
edited November -1 in Working with GS (Mac)
I know that with images on actors the background color will shine through white areas, but what if I want a white area to be rendered white? Do I have to set the background color to white and color the areas I want colored? For example I have 5 different color variations of a sprite. I want part of it white, do I have to make 5 different versions or is there another way to mask the image?

Thanks!

Comments

  • rebumprebump Member Posts: 1,058
    Don't confuse actor transparency with white. Some paint programs will render transparency (the area where stuff behind will show through) in white, sometimes it will render it with a checkerboard pattern, etc. There is usually a setting for what to show transparency as.

    Then when you do want white, select a white paint/draw color and then draw with that. Be aware that you can usually adjust the transparency for whatever paint/draw operation you are doing at the moment (i.e. you can paint/draw with any color and you can set the transparency from 0 to 100% at the same time).

    If you don't want anything behind bleeding through, set tranparency to 0%.

    Transparency is sometimes referred to as "alpha" and then if you don't want anything bleeding through, set alpha to "1.0". Think of alpha "0" being 100% transparent, alpha "0.5" being 50% transparent, and alpha "1.0" being opaque (no see-through). Etc....
  • jon2sjon2s Member Posts: 40
    Correct. I understand transparency and how that works. For example on this page the background of the page is set to a gray color. The face lines and rounded border on the image are all black. The eyes are white. http://jon2s.com/test.html

    One would think that when put into GameSalad, the background color would shine through the transparent areas. This is not the case. When put into GameSalad, the eyes are blue and the transparent areas are well, transparent.

    So it appears that GameSalad is using the color white as a mask to shine the actor background color through which is fine, but can you change it from using white to using another color?

    Thanks!
  • rebumprebump Member Posts: 1,058
    Well, I just draw my images how I want them. Import/add them to GS. Then just drag-n-drop the image on the actor. I do not mess with the actor's color or alpha settings and everything works fine (colors and transparency). If I need to fade the image out (i.e. for a button or control that I want the background to bleed through on), I will then further reduce its transparency with the actor's alpha setting.

    If you have a colored actor, say a white space ship, and you drop it on an actor whose color is set to blue, the white *will* take on a blue color. You can think of the actor color as being a tint to the image you drop on the actor. I use this mechanism all the time. Draw something all white (with or without some transparency) and then I can use it on an actor whose color I can control to produce many variations of the actor.

    Also, when saving a PNG file, be sure to save it in the RGB color space. I think there are a few color spaces and one of them causes issues (but I think that was the grey scale 8-bit color space).
  • jon2sjon2s Member Posts: 40
    Thanks rebump. Just trying to keep the number of images down to a minimum by reusing them and coloring them with the gamesalad rather than by having a separate image for each color.

    Thanks!
  • rebumprebump Member Posts: 1,058
    Cool. Just to clarify for any newbies...if the image you drop on an actor has say green and yellow in it and then you change the actor's GS color to blue, the green takes on a green-blue color and the yellow takes on a green color. The actor color setting is blended with the image colors using normal color blending "laws".
Sign In or Register to comment.