Source SDK

Source SDK

Epifire Mar 5, 2015 @ 10:14pm
$basetexturescale Not Working
Hey guys odd little problem I've been having issues with and was wondering if someone had an answer. I'm trying to use the $basetexturescale line in a vmt so that I can make use of $detail to blend baked Ambient Occlusion on it's own unique scale.

Problem is I can't seem to get the $basetexturescale to work, with or without $detail being included in the vmt. I got the vmt right here, I just wanna know why it aint working...

****************************************************

VertexlitGeneric
{
$basetexture models/props_nightcall/hedge_leaves_001
$basetexturescale 1
$surfaceprop grass
$alphatest 1
$nocull 1

$phong 1
$phongboost 1
$phongfresnelranges "[.2 .2 .2]"
$phongexponent 60

$detail models/props_nightcall/hedge_leaves_001_ao
$detailscale .5
$detailblendfactor 1
$detailblendmode 0
}

****************************************************

I feel like it's probably something extremely simple but I just aint seein it. Any tips would be much appreciated!
< >
Showing 1-7 of 7 comments
Rectus Mar 5, 2015 @ 11:58pm 
I think $basetexturescale is deprecated and doesn't work for newer versions of the engine. You can use $basetexturetransform instead for the same effect.
Epifire Mar 7, 2015 @ 9:19pm 
Hmm right now since a lot of the proxy info for it seems unclear I seem to be battling with the thing to try and get it to work. But in theory, if I adjust the basetexture's scale doesn't that act as a parent to $detail? Cause when ever I try and scale the basetexture, I always end up screwing up the scale for the AO map being ran through $detail.

I can't even get a working vmt to give an example (otherwise I'd post it here) but when ever I've had it working in some limited fashion, it would always mess up the scale for detail. Even if I were to completely mirror the values (eg. basescale 2 / detailscale -2) it doesn't seem to affect it at all.

I wish there were a way call up separate UVs (ohhh that'd be so much easier) so then I wouldn't have to keep tinkering with vmts endlessly. You seem to be my "go to guy" for vmt info, aren't you Rectus :P
Rectus Mar 8, 2015 @ 8:21am 
It's fun trying to figure out how to do these things.

The detail scale seems to mean how many times it fits in the base texture, before any transformation is done to the base.

So if you want to have the detail match the UV while tiling the base texture, setting them like this seems to do it:
$basetexturetransform "center .5 .5 scale 4 4 rotate 0 translate 0 0" $detailscale 1.0
Epifire Mar 8, 2015 @ 6:40pm 
You are a machine dude. Like hardly anyone even knows how this stuff works anymore since most people don't even use these functions. Works like a charm, as I was totally not even running the texturetransform correctly. Never once had I a proper syntax example so that's where my difficulty was at.

So again, THANKYOU so much I really don't know where else I'd find info on this.
Originally posted by Rectus:
It's fun trying to figure out how to do these things.

The detail scale seems to mean how many times it fits in the base texture, before any transformation is done to the base.

So if you want to have the detail match the UV while tiling the base texture, setting them like this seems to do it:
$basetexturetransform "center .5 .5 scale 4 4 rotate 0 translate 0 0" $detailscale 1.0

hi 9 year old post (WTF XD)
i was wondering if you have any idea on how to randomize the rotation value in $basetexturetransform when the texture is applied in the world, im not expecting a response but its worth a shot xD
Rectus Jan 6, 2024 @ 8:10am 
Originally posted by horizon:
hi 9 year old post (WTF XD)
i was wondering if you have any idea on how to randomize the rotation value in $basetexturetransform when the texture is applied in the world, im not expecting a response but its worth a shot xD
You would need a material proxy for that. The biggest problem would be where to get the randomized value from. If you are applying the material to different entities there is the EntityRandom proxy, which gives out a per-entity value.

You would have to output the random value to a custom variable, plug in that to a TextureTransform proxy, and plug in the output of that to $basetexturetransform.
Epifire Jan 9, 2024 @ 7:39pm 
Originally posted by horizon:
hi 9 year old post (WTF XD)
i was wondering if you have any idea on how to randomize the rotation value in $basetexturetransform when the texture is applied in the world, im not expecting a response but its worth a shot xD

Hot damn you ain't kidding. I was hella surprised when I saw a notification to this on my Steam. Glad to see people still getting use outta this thread! :steamthumbsup:
< >
Showing 1-7 of 7 comments
Per page: 1530 50