From Valve Developer Community
Revision as of 07:24, 18 September 2011 by Shawnolson (talk | contribs) (Solid Color)
Jump to: navigation, search

Does $color apply to the whole material, or just the RGB of the $basetexture ?

Solid Color

The docs state:

This parameter can be used without an albedo to display a solid color without the need of a texture

But when I use a VMT like this:


	 "$color" "{165.0 150.0 218.0}"

The material is always just white. Is this limited to a certain shader?

The material is loading on the model... but it is simply white. Is there some special step for this?

Brain fart... tried without the quotation marks around the $color and it's working. [EDIT]... not really true... see below. --Shawnolson 15:00, 17 September 2011 (PDT)

What, around the value? --Artfunkel 03:06, 18 September 2011 (PDT)
No... actually around the $color like "$color" ... but I'm not certain that has anything to do with it now... probably because I am not clear on some docs regarding this. Without quotes around the value it won't work at all... but for some reason it seems to only show purple and black with the $color in quotes (though I'm certain I've done that before with parameters with no problems). I may have assumed the quotes had an issue because of the following inconsistencies during testing and I didn't take notes on specifically what I was doing originally.
What I'm now noticing is that it's working on LightmappedGeneric but not VertexLitGeneric. For VertexLitGeneric it seems to always be white with the example above (in Hammer and in game). But when I use it on LightmappedGeneric it will work.
Also I've noticed that the LightmappedGeneric VMT with just $color often displays as a purple-and-black texture in Hammer for a minute... then magically assumes the color. But in game the LightmappedGeneric version works fine always.--Shawnolson 07:24, 18 September 2011 (PDT)