Results 1 to 10 of 10

Thread: The mistery of the tga files

  1. #1

    Default The mistery of the tga files

    This message is a call for help from the experts in formats of graphic files.
    I reported some time ago my problems with info_pics for units. I made them with Adobe Photoshop 7.0 by the simplest method:
    - From a screenshot I deleted the excess of picture, leaving a transparent background. This image, of the correct size, was saved as 32 bits tga.
    The result was OK for the information pannel
    , but not for the recruitment information pannel .

    After this report of my problem, Uranos (thanks my friend) helped me saying that the solution would be to put a background, identical to that used in the information pannel.
    He did with a light brown background, but including an alpha channel to make it transparent.
    I was surprised with I opened his modified pic, as it was identical to mine in my photoshop version. But it worked differently in the game.

    Now it was the same in info pannel (the background was considered transparent), but not in recruitment information pannel .

    I'm trying to find any other method to do info_pics, but in the process I've found this.
    When I save the differents tga files as dds, this is the result:

    In the middle, there is my original file, and the same problem in-game can be seen here. It seems then that the game transforms the original tga in some dds format, unable to handle transparent backgrounds.
    On the left, there is the Uranos modified file. The same image than that observed in the game is generated. Now, even if photoshop shows a transparent background, the dds file shows the light brown color.

    Finally on the right, my attempt to include the new UI background to my pic. I include a new background layer and the alpha channel. I merged both layers and did the white silhouette in the alpha channel.
    However, when I saved as 32 bits tga, the alpha channel disappears, the background is still visible, but now the dds generated is correct.

    I must still test this new file in-game.
    In any case I wonder why my tga files are larger (132 kb) than those in the original game (around 90 kB).

    Any explanation for this behaviour?

  2. #2

    Default

    if you open a pre-existing unit card with photoshop, you'll notice that the layer name is layer 0 with no background.

    IF i remember right, the way i did these unit cards before was, that i used an exisiting unit card, replaced the figure on it.



    To make one from scratch is, that after you created your unit card and you merged your layers into one or flattened your image is to duplicate the the flattened image layer, so you have the background layer and another one on top with the same image. Now delete the background layer, and name layer1 to layer0, then save it as a .tga. But i think the first option (editing a pre-existing card is easier.

  3. #3

    Default

    Thanks Archer, but I think my problem is another one (all my files show a "layer 0").
    In this image I show you how Photoshop 7.0 shows a 32 bits tga that I was convinced it was correct.

    The same file open with Irfanview shows the same problem I see in-game.
    The image with the white background is the 24 bits tga.
    I've opened also the unit cards, that are correct in-game and they show the same problem (they are also 32 bits tgas).

    Thus it seems to me that there is some problem with this version of photoshop to save correctly the 32 bits tga format.

    I tried to paste the new figure on an existing info-pic, but in that case the background shows a white silhouette (where the old image was formerly).

  4. #4

    Default

    I think your problem is that you use the transparency in the image instead of using an alphachanel, and that the game/tga format doeasn't handle it. I have worked alot with UI lately, and i usually need to create the alpha. I see you don't have alpha in any of your tga's that are displayet.

    I think the image get's screwed due to the transparent layer. I have never these problems with my unitcards, but i allways use alpha to defy the transparency, not transparent layers.

    In my PS experience, you don't eaven have to merge the layers before saving as tga, as long as you hav the alpha.

    (The easyest way for you to create a good alpha with the images you have, wold be to copy the layer with the unit(on transparent) and set the lighness to full, so that it becomes all white. Then paste this white version on a black background in your alphachanel (new chanel), and make sure it matches the position og the unit on the card. But you probably know this)

    -Skel-

    Age of Vikings and fanatics: Total War

  5. #5

    Default

    Thanks, again.
    I've been looking for the problem, and I have remarked that PS 7.0 is unable to export the alpha channel to a tga file.
    From PS 7.0 Help:
    Code:
    Note: As long as you save a file in a format supporting the image's color mode, the color channels are preserved. Alpha channels are preserved only when you save a file in Adobe Photoshop, PDF, PICT, Pixar, TIFF, or Raw formats. DCS 2.0 format only preserves spot channels. Saving in other formats may cause channel information to be discarded
    It is necessary to update it to 7.0.1. I think all the problem is that.

  6. #6

    Default

    Ok, strange that it works with 6.0, nd not 7.0.

    ANyway, if it doesn't work with 7.0.1, you could allways dl the DXTbmp tool, and use that to put in your alpha.

    -Skel-

    Age of Vikings and fanatics: Total War

  7. #7
    webbird's Avatar Senator
    Join Date
    Oct 2004
    Location
    Germany
    Posts
    1,171

    Default

    I make a render of the unit in max and save it as 32bit tga with premultiplied alpha option choosen.
    When you open that picture in photoshop the background is transparent.
    Next i copy the unit`s graphic into existing Unit pictures, delete the default layer, duplicate my added layer,
    Cut out everything from the background layer, and save as 32bit tga compressed. Works perfect.


  8. #8

    Default

    um webbird are these skins uploaded somewhere? They are really good!

  9. #9

    Default

    Quote Originally Posted by skeletor
    Ok, strange that it works with 6.0, nd not 7.0.

    ANyway, if it doesn't work with 7.0.1, you could allways dl the DXTbmp tool, and use that to put in your alpha.

    -Skel-

    I had the same problem, there is a bug in Photoshop. Simply look for the tga plugin (in the plug-ins folder) from photoshop 6.0 and copy-paste it over into
    your new version. or download it here:

    http://www.adobe.com/support/downloa...44&fileID=1478

  10. #10
    webbird's Avatar Senator
    Join Date
    Oct 2004
    Location
    Germany
    Posts
    1,171

    Default

    Thats my actual line up for the two celtic factions with rtw1.3 and will be published for Christmas :O)

Posting Permissions

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