gametechmods

Robot Arena => General Support => Topic started by: Resetti's Replicas on August 10, 2011, 08:07:28 PM

Title: Swtich a BMP for a TGA?
Post by: Resetti's Replicas 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?
Title: Re: Swtich a BMP for a TGA?
Post by: ACAMS on August 10, 2011, 08:18:14 PM
I am 99.999% sure that it will.......there is a way to be 100% sure  ;)
Title: Re: Swtich a BMP for a TGA?
Post by: Serge 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.
Title: Re: Swtich a BMP for a TGA?
Post by: ACAMS 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!
Title: Re: Swtich a BMP for a TGA?
Post by: G.K. on August 11, 2011, 02:45:57 AM
You can, at least, I have been able to.
Title: Re: Swtich a BMP for a TGA?
Post by: JoeBlo 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..
Title: Re: Swtich a BMP for a TGA?
Post by: Clickbeetle 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.