Tooltexture: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (links)
(Cleanup)
Line 1: Line 1:
{{todo|find out what else this parameter is also used for}}
Used to blend [[texture]] previews in [[Hammer]].
Used to blend [[texture]] previews in [[Hammer]].


When using a preview tooltexture in a material, the material is scaled up or down to the size of the tooltexture. If the material is a blend of two 1024x1024 textures but your tooltexture is only 256x256, the 1024x1024 textures will be scaled down to the much lower quality of 256x256. Unfortunately, this means that the tooltexture cannot be made smaller to save space (since nobody will see it in-game). You'll need a preview tooltexture as large as you want the texture to display within the engine.
In Hammer and in-game, the material is scaled down to the size of the tooltexture. Unfortunately, you can't make the preview smaller to save space. You'll need one as large as the material you want to display.
 
== VMT syntax example ==
<pre>
"WorldVertexTransition"
{
"$basetexture"    "dirt/blend1_mountain_dirt_a1"
"$basetexture2"  "dirt/blend2_mountain_dirt_a1"
"%tooltexture"      "preview/blend_mountain_dirt_a1"


$bumpmap          "dirt/blend_mountain_dirt_a1-ssbump"
[[File:Blend texture preview01.jpg|The texture to the right|thumb|190px]]
                "$ssbump"  "1"
%detailtype desert1
"$detail"    "dirt/blend_mountain_dirt_a1_DM"


$surfaceprop      dirt
WorldVertexTransition
$surfaceprop2    rock
{
}
$basetexture    dirt/blend1_mountain_dirt_a1
</pre>
$basetexture2  dirt/blend2_mountain_dirt_a1
'''The texture in preview/'''
'''%tooltexture    preview/blend_mountain_dirt_a1'''
[[Image:Blend texture preview01.jpg]]
$bumpmap        dirt/blend_mountain_dirt_a1-ssbump
$ssbump        1
%detailtype    desert1
$detail        dirt/blend_mountain_dirt_a1_DM
$surfaceprop    dirt
$surfaceprop2  rock
}


This is useful for showing what the 2 blend textures are in a single image, without this it will just show your basetexture on it's own thus not showing it's second blend.
Without a tooltexture, Hammer will only show your first [[$basetexture]], making it impossible to see the blend without compiling.  
[[Category:List of Shader Parameters]]
[[Category:List of Shader Parameters]]

Revision as of 11:32, 17 December 2013

Used to blend texture previews in Hammer.

In Hammer and in-game, the material is scaled down to the size of the tooltexture. Unfortunately, you can't make the preview smaller to save space. You'll need one as large as the material you want to display.

The texture to the right
WorldVertexTransition
{
$basetexture    dirt/blend1_mountain_dirt_a1
$basetexture2   dirt/blend2_mountain_dirt_a1
%tooltexture    preview/blend_mountain_dirt_a1
$bumpmap        dirt/blend_mountain_dirt_a1-ssbump
$ssbump         1
%detailtype     desert1
$detail         dirt/blend_mountain_dirt_a1_DM
$surfaceprop    dirt
$surfaceprop2   rock
}

Without a tooltexture, Hammer will only show your first $basetexture, making it impossible to see the blend without compiling.