Talk:$translucent

From Valve Developer Community
Jump to navigation Jump to 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)

$alphatestreference

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)

Both. One is using translucency, and the other is using alpha text transparency.
SirYodaJedi (talk) 12:01, 17 July 2022 (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:

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

	"Proxies"
	{
		"TextureScroll"
		{
		"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.

$translucent parameter not working

I have a custom VMT file that's a decal with transparency that looks like this:

LightmappedGeneric
{
    "$basetexture" "decals/..."
    "$decal" 1
    "$selfillum" 1
    "$translucent" 1
    "%keywords" ...
}

But when I put both it and the VTF it's referencing in Portal 2's materials folder and open Hammer, it shows up in the texture editor and I can use it as a decal, but it's just one solid black rectangle. It doesn't even look glitchy when I look at it from certain angles in Hammer. The base texture does have an alpha channel. And it looks the same when seen ingame. --Tiny Desk Engineer (Talk Page) 13:10, 19 June 2022 (PDT)

$blendtintbybasealpha

It seems that $translucent is incompatible with $blendtintbybasealpha. It allows the model underneath the translucent texture to be seen but any textures aren't.

$blendtintbybasealpha0
$blendtintbybasealpha 1

--jacksongaming (Talk Page) 13:02, 16 August 2022 (GMT)