Oscillating Texture (Sine) Proxy?


ultranew_b
08-15-2007, 10:32 PM
Working on a new level with some tree models. I would like to apply a sine proxy to get the leaf textures "swaying". I've applied a scrolling material proxy to the ice texture in dod_flurry, so I have a basic understanding.

There is a page at the Valve Wiki re: proxies:

http://developer.valvesoftware.com/wiki/Material_Proxies

This is my current .vmt that does not work:

"VertexLitGeneric"
{
"$baseTexture" "models\mytreemodel"
"$alphatest" 1
"$nocull" 1

"Proxies"
{
"Sine"
{
"resultVar" "$baseTextureTransform"
"sineperiod" 8
"sinemin" 0
"sinemax" 1
}
}
}
If anyone has some insight on this it would be greatly appreciated !

:)

Dash
08-15-2007, 11:15 PM
I don't think you can use sineperiod, sinemin, sinemax with a baseTextureTransform.

AFAIK, you'll have to apply the sine results to a variable that will be reused on a TextureTransform...

ultranew_b
08-16-2007, 10:45 AM
Thanks Dash ! I realized that the shoreline overlay in Anzio uses a sine proxy! So I altered it slightly to my nds and came up with this, which does work !:

"VertexLitGeneric"
{
"$basetexture" "models\mytreeleaftexture"
"$alphatest" 1
"$nocull" 1

// VARS

"$ScrollRateResult" 1


"Proxies"
{
"Sine"
{
"resultVar" "$ScrollRateResult"
"sineperiod" 8
"sinemin" .0002
"sinemax" .002
}

"TextureScroll"
{
"texturescrollvar" "$basetexturetransform"
"texturescrollrate" .002
"texturescrollangle" 90
}



}

}

Hopefully this will help someone else down the road !

:D

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.