Rainbow Texture using VMT

Noltron200

L1: Registered
Jun 25, 2012
5
0
So I want to make a smooth & slow animated rainbow texture.
I've tried making an animated texture but the transitions between colors was too jagged.

So I've done some research and I believe that I can edit $color in the VMT.
I have a solid white texture as the base, however in the VMT I have the following:

Code:
"LightmappedGeneric"
{
	"$basetexture" "test/whitetexture"

	$setred 0
	$setblu 0
	$setgrn 0
	$color "{ $setred $setgrn $setblu }"

	Proxies
	{
		Sine
		{
			resultVar	$setred
			sineperiod		12
			timeoffset		0
			sinemin		0
			sinemax		255
		}
		
		Sine
		{
			resultVar	$setgrn
			sineperiod		12
			timeoffset		4
			sinemin		0
			sinemax		255
		}

		Sine
		{
			resultVar	$setblu
			sineperiod		12
			timeoffset		8
			sinemin		0
			sinemax		255
		}
	}
}

Now I know the timing or w/e is probably not a perfect rainbow, but im not seeing any color changes in game. All I see is that solid white texture.

Anyone have any ideas?
 

Tumby

aa
May 12, 2013
1,085
1,194
Most importantly, do you have DirectX 9 enabled in tf2? Most VMT based effects require that to work.
I haven't tested this, but i think the easiest way make this is to take a small rainbow texture and just texturescroll it.
EDIT: I think I understood wrong what you meant. Ignore what I suggested to do.
 

Noltron200

L1: Registered
Jun 25, 2012
5
0
The thing is I wanted it all to be one solid color at any one given time which would mean scrolling wouldn't quite do the job, but yeah I have DirectX 9 enabled :D

Thanks for your response tho
 

TMP

Ancient Pyro Main
aa
Aug 11, 2008
947
560
I'm kinda out of it right now, but the first thing I'd think is maybe it's the color of the texture. I would say try with a gray, something with a value of like, 128 (half of it, pure gray).
 

Noltron200

L1: Registered
Jun 25, 2012
5
0
I'm going to mess around a little more with the vtf/vmt just cause I really wanted it to work but it sounds like it probably wont.

But oh boy 1-color-value-per-frame differences xD
Sounds like lots of fun. I'll try that when I have more time :)