From Valve Developer Community
Jump to: navigation, search

Gimp colour loss warning

Is this really necessary, given that saving as PNG allows colour information to be saved for completely transparent values, and the resulting PNG files can be imported into VTFEdit quite happily? It's not true to say that there's no workaround, it's just not default behaviour when saving as TGA. Longsight 18:42, 29 Aug 2008 (PDT)

That's never worked for me. The option is there, but the values are deleted anyway. --TomEdwards 06:15, 30 Aug 2008 (PDT)
Hmph, I'm sure it's worked for me. I'll check it again, and if it turns out it's not working, I'll put your message back. Longsight 11:18, 30 Aug 2008 (PDT)
Checked it out and it worked fine. Applied a 100% transparency mask to an image in GIMP and then saved it as a PNG with colour preserved, and it imported into VTFEdit with colour intact. The image I used can be found here if you want to check for yourself. Longsight 11:28, 30 Aug 2008 (PDT)
I think what the GIMP discussion is saying is that color preservation of zero-alpha pixels cannot be guaranteed, owing to the anomalous behaviors the developers described (merging two transparent layers, etc.). Perhaps the line about the GIMP should be altered to say similarly that color preservation of transparent pixels cannot be guaranteed in the GIMP and perhaps provide some guidelines for having the best chance of preserving them, such as flattening the image before verifying color data and, as stated earlier, using export formats that preserve transparent color data, such as PNG and TGA (I can personally verify that TGA export also preserves color data, as I was performing $distancealpha experiments and discovered this behavior. —WhosAsking 09:37, 20 April 2012 (PDT)


I noticed in the tree prop model VMTs for Episode 2, there's an "$alphatestreference" 0.5 in the VMT... So, what does this do, exactly? --Campaignjunkie (talk) 23:50, 2 January 2010 (UTC)

$translucent vs $alphatest image

In the image relating to $translucent vs $alphatest, I am not entirely clear on which image the transparency is being applied. Any clarification?--Shawnolson 21:16, 2 September 2011 (PDT)

$additive bugs?

We were beta testing a map online, and for one player - a custom additive texture did not work. Here's the VMT:

	"$basetexture" "PB_textures/nature/lava"
	"$additive" "1"
	"$translucent" "1"
	"$surfaceprop" "no_decal"
	"$color" "[ 0.23 0.23 0.23 ]"

		"Texturescrollvar" "$Basetexturetransform"
		"Texturescrollrate" "0.01"
		"Texturescrollangle" "180"

Is there somthing wrong with the way the VMT is setup? like, the order everything comes in? Again - the additive did not work for just one of the players. And more fact: the map was compiled with ep2, but that player did not have ep2 installed.