Robots

Author Topic: Swtich a BMP for a TGA?  (Read 1105 times)

Offline Sonny_Resetti

  • *
  • Posts: 3627
  • Reputation: 16
  • Replica King
    • ResettisReplicas
    • View Profile
  • See profile for gamer tags: 1
Swtich a BMP for a TGA?
« on: August 10, 2011, 08:07:28 PM »
I'm working on a custom-skinned Emergency flipper, and I got to thinking that it would look neat if I could make parts of it invisible, tranpasrent via a TGA file.  Transparencies don't carry over when you convert to a 24-color BMP, so what if I went into the GMF and replaced "flipper1.bmp" with "flipper1.tga"?  Would the game accept that?

Offline ACAMS

  • *
  • Posts: 3314
  • Reputation: -501
    • View Profile
    • myfolderz.com
Re: Swtich a BMP for a TGA?
« Reply #1 on: August 10, 2011, 08:18:14 PM »
I am 99.999% sure that it will.......there is a way to be 100% sure  ;)

Offline Serge

  • *
  • Posts: 1483
  • Reputation: 13
    • View Profile
    • http://www.q3k.org/
Re: Swtich a BMP for a TGA?
« Reply #2 on: August 10, 2011, 08:54:27 PM »
I don't have any RA2 installation at the moment to base my theories on, but I'm fairly sure some components already use transparent textures (TGA?), eg. the disk extender thing. So yes, it should work - you may have to copy the texture and material settings from a component using transparency to the one you're trying to modify though.
home | twitter | yt | gmf de/compiler | component freedom | xmpp: q3k@q3k.org | email: q3k@q3k.org

Offline ACAMS

  • *
  • Posts: 3314
  • Reputation: -501
    • View Profile
    • myfolderz.com
Re: Swtich a BMP for a TGA?
« Reply #3 on: August 10, 2011, 09:57:52 PM »
If it uses a map, then it will be simple......too arsed to go look, in fact this topic should not even be started unless someone (hehehehe, I didn't say Somebody) was too arsed to try it before hand!

Offline G.K.

  • *
  • Posts: 11514
  • Reputation: 10
  • Striving for a good personal text since 1994.
    • View Profile
Re: Swtich a BMP for a TGA?
« Reply #4 on: August 11, 2011, 02:45:57 AM »
You can, at least, I have been able to.
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V. Signups open for The RA2 League.
Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline JoeBlo

  • *
  • Posts: 14546
  • Reputation: 13
    • View Profile
Re: Swtich a BMP for a TGA?
« Reply #5 on: August 11, 2011, 09:17:28 AM »
what if I went into the GMF and replaced "flipper1.bmp" with "flipper1.tga"?  Would the game accept that?

it works fine.. I have been doing it for years..
14x BOTM Winner - Robot Arena for Mac

Offline Clickbeetle

  • *
  • Posts: 3323
  • Reputation: 21
  • In Soviet Russia, bugs stomp YOU!
    • View Profile
    • Beetle Bros site
Re: Swtich a BMP for a TGA?
« Reply #6 on: August 27, 2011, 07:39:55 PM »
'nuther bump.
 
You can replace "flipper1.bmp" with "flipper1.tga", (though it's actually named "emergency_flipper.bmp") but there's one extra step you need to do in order to get transparency.
 
Copy the whole texture like this
 
Code: [Select]
   *TEXTURE
   {
    *MAP_NAME Map #10
    *MAP_CLASS Bitmap
    *BITMAP emergency_flipper.tga
    *MAP_AMOUNT 1
    *MAP_DIFFUSE
    *MAP_TYPE Screen
    *UVW_U_OFFSET 0
    *UVW_V_OFFSET 0
    *UVW_U_TILING 1
    *UVW_V_TILING 1
    *UVW_ANGLE 0
    *UVW_BLUR 1
    *UVW_BLUR_OFFSET 0
    *UVW_NOISE_AMT 1
    *UVW_NOISE_SIZE 1
    *UVW_NOISE_LEVEL 1
    *UVW_NOISE_PHASE 0
    *BITMAP_FILTER Pyramidal
    *BITMAP_MAP_CHANNEL 1
   }

and paste it directly underneath, so you have two textures.  Now change MAP_DIFFUSE to MAP_OPACITY in the second texture.  This tells the game to apply that texture as an opacity map instead of a color map.
 
Finally, find where it says *TEXTURE_COUNT 1 above the two textures and change the 1 to a 2.

To lack feeling is to be dead, but to act on every feeling is to be a child.
-Brandon Sanderson, The Way of Kings