Anyone know how the item coloring works ?

Apr 13, 2009
728
309
Not that I'm really interested in buying paint myself but I'm curious about the technical aspect of it. Seems like the models don't actually feature skins (texturegroup) for those colors, any idea how it works ? Any screens of recolored items yet ?
 

fubarFX

The "raw" in "nodraw"
aa
Jun 1, 2009
1,720
1,978
well, they don't need seperate textures. the bucket of paint probably has the same effect as adding a $colors in a vmt (which tints the whole vtf to a specified color). but yeah, my guess is that these temporary vmts might be dynamically generated. (that's why you don't find them in the gcf).

wild guess here, don't take me seriously
 
Last edited:

Nineaxis

Quack Doctor
aa
May 19, 2008
1,767
2,820
I think they are just a tint masked to certain sections of hats.
 

Ravidge

Grand Vizier
aa
May 14, 2008
1,544
2,818
They have added a few lines to colorable items vmt's

Example (from the pith helmet):
Code:
	"$blendtintbybasealpha" "1" 
	"$blendtintcoloroverbase" "1"   // between 0-1 determines how much blended by tinting vs. replacing the color

	"$colortint_base" "{157 150 142}" // put the RGB value of whats being colored when no paint is present, if $blendtintcoloroverbase is 0 then put [1 1 1] here.
	"$colortint_tmp" "[0 0 0]"

And a few more in the proxies section further down the same file:
Code:
                "ItemTintColor"
		{
			"resultVar" "$colortint_tmp"
		}
		"SelectFirstIfNonZero"
		{
			"srcVar1"	"$colortint_tmp"
			"srcVar2"	"$colortint_base"
			"resultVar" "$color2"
		}

The textures themselves use a alpha mask to decide what parts of the material gets tinted.
 
Apr 13, 2009
728
309
Tints with a mask... hmmkay guess that makes sense.
Didn't even know souce could do that :p
 

Ravidge

Grand Vizier
aa
May 14, 2008
1,544
2,818
I think it's new.

Actually, this opens up the question whether modelers can create multiple skins with masked tints instead of full materials (vmts are MUCH cheaper than vtfs) for map props.

It's probably possible...
 
Feb 14, 2008
1,051
931
I think it's new.

Actually, this opens up the question whether modelers can create multiple skins with masked tints instead of full materials (vmts are MUCH cheaper than vtfs) for map props.

It's probably possible...

Except you need to pay $2 to view the VMT :3
 

Ravidge

Grand Vizier
aa
May 14, 2008
1,544
2,818
Yellow fence set $4.99
 
Feb 18, 2009
640
629
I think it's new...

It came with Alien Swarm I think. A certain prop type in Alien Swarm SDK can have its colour changed. This is just an overall colour change, and only works well on specific models (they are very neutral in colour, like grey or even just white with an AO map).
This is just adding a mask to that effect I think.
 

Ravidge

Grand Vizier
aa
May 14, 2008
1,544
2,818
It came with Alien Swarm I think. A certain prop type in Alien Swarm SDK can have its colour changed. This is just an overall colour change, and only works well on specific models (they are very neutral in colour, like grey or even just white with an AO map).
This is just adding a mask to that effect I think.

AS and L4D (colored cars) have used various tint tricks before, for AS you can edit the tint on any prop with a keyvalue, the prop itself is white. It offers really good customization and doesn't increase the map filesize at all.
I dunno if that functionality has been ported to TF2 (I doubt it), but the ability to add masked tints to vmts as separate skins to custom models should now be possible (very filesize effective).

Let's hope it works :)
 

TMP

Ancient Pyro Main
aa
Aug 11, 2008
947
560
If you choose to use the paint on a hat, it shows you a preview of what it looks like.
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Depending on how ugly paints are (and whether people can use them for a gameplay avantage) I hope there's a client-side option in the future to disable tinting.

Y'know, to avoid the "Everything I have is a blu/red purple color guy".
 

sniprpenguin

L6: Sharp Member
Mar 14, 2008
266
258
DX8 systems can't run tinting.

Need an upgrade here.