.
Results 1 to 3 of 3

Thread: TGA Transparency Alpha Channel Help

  1. #1
    Join Date
    Dec 2011
    Location
    USA Florida Illinois
    Posts
    943
    Blog Entries
    1
     

    Question TGA Transparency Alpha Channel Help

    I looked and could not find. I am making a TGA Driver Icon 64x64. I took a jpg and loaded it in Paint. Painted around the drivers head with white (cut out). Then saved as a 64x64 bmp. I tried PEVSoft's tool and loaded the bitmap. How do I make the Alpha channel. I tried a plain white 64x64 bmp and still not luck.

    I have Visio and can take the bitmap, then save as png, and it lets me set the transparency color to white, and it works. PEVSofts tool does not support png files, and a jpeg does not allow transparency. I tried several online png to tga convertors, but none create the Alpha channel, just ignores the transparent part and makes it white. I know Photoshop can do it, but I don't own a copy. Any other solutions?

    The driver100.texture.txt file;
    Primary=driver100.tga
    Alpha=driver100.tga
    Tile=none

    The config.txt references it correctly, and the icon shows in game correctly, it's just not transparent.
    Last edited by Christopher824; November 27th, 2020 at 08:54 AM. Reason: spelling
    If it's not broke, don't fix it.


  2. #2
    Join Date
    May 2010
    Location
    United States of America
    Posts
    2,018
     

    Default

    You need to make sure the alpha layer in your .tga file (not whatever format(s) went into it) has black (0,0,0) and white (255,255,255) only - no other colors - and black is the area you want to be transparent. Don't guarantee this will work for an icon since the game may be programmed to ignore alpha layer on icons. Back when individual rolling stock had icons, the preceding did work for them; it's also how the body of the game treates .tga textures applied to objects.

  3. #3
    Join Date
    Dec 2011
    Location
    USA Florida Illinois
    Posts
    943
    Blog Entries
    1
     

    Default

    Quote Originally Posted by PWeiser View Post
    You need to make sure the alpha layer in your .tga file (not whatever format(s) went into it) has black (0,0,0) and white (255,255,255) only - no other colors - and black is the area you want to be transparent. Don't guarantee this will work for an icon since the game may be programmed to ignore alpha layer on icons. Back when individual rolling stock had icons, the preceding did work for them; it's also how the body of the game treates .tga textures applied to objects.
    Success! Thank You.

    Made two bitmaps 64x64, one is the head shot cut out, one is a cutout for the transparency in 1 bit black and white, key being black (0,0,0) is the transparent area. I tried white and is why it would not work, I'm guessing that's a rookie mistake. Then used PEVSofts tool to make the TGA file, and yes, works great for the icons so far as I can tell. Below are the results, little ruff around the edges, but this is just a test.



    Output;



    In game;

    If it's not broke, don't fix it.


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •