• Making a animated VTF with transparent background
    2 replies, posted
Me and a Friend are trying to get this working, for the last few week or something i dont even know.. For a Addon i created we want to have a animated texture be in the Overlay of the Players Screen. Whenever the Addon speaks (its alot stuff with sound) The Material/Texture gets displayd in the corner. It works fine with a transparent PNG, but we would like to have a animated version, and still transparent of course. Now, the animation works fine (sometimes, we get to that in a sec), but the background is black then. Sometimes the animation doesnt work at all, the transparent background NEVER works, and sometimes its just a missing texture. We tryd out to make the VTF in VTFEdit, with different versions when important. From 7.1 to 7.4 and everything tested out. Several Alpha Channel types, but it all is no use. Either we do something really wrong, or its not possible? Heres the VMT file and the VTF file, in case you need it. VMT: "UnlitGeneric" { "$baseTexture" "Kato" "$surfaceprop" "Default" "Proxies" { "AnimatedTexture" { "animatedTextureVar" "$basetexture" "animatedTextureFrameNumVar" "$frame" "animatedTextureFrameRate" "30" } } } VTF: The thing about the VTF is, importing the pictures often lets it stop and just saying "Error importing files:" And nothing else..the animation is supposed to have 100 frames, is that too much maybe? But on other Alpha channel it works and imports, even has a alpha channel, so i guess some alpha types dont supposed that many frames. So we can get a animation and alpha channel in VTF edit, but in gmod it never works. I just noticed the VTF is 50 MB big..jesus christ..The symbol on the right is supposed to spin. Better not upload 50 MB now..Black is supposed to be transparent https://files.facepunch.com/forum/upload/144088/4edeef2a-c7aa-4e6c-914a-55839d2952da/katoblack.png ALSO: heres the lua that makes the material appear on the players screen. Maybe theres something wrong here? hook.Add("HUDPaint","KatoOverlay", function()                 local KatoDestiny = file.Read("Kato_Settings.txt", "DATA")                 if KatoDestiny == "1" then                     local Kato = Material( "kato.png" )                     surface.SetMaterial( Kato )                     surface.SetDrawColor( 255, 255, 255 )                     surface.DrawTexturedRect( ScrW() - 250, 5, 250, 100 )                 end             end) This is all information i can give i think. If you need anything else tell me. We really dont know anymore
Always a good idea to leave the problem you posted, as much info as possible, and edit with your solution when you can as to help others. You ask for help but in return give nothing.
yea i realized that a bit later. i add the post back soon. plus solution
Sorry, you need to Log In to post a reply to this thread.