$ssbump: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(→‎Creating self-shadowing bump maps: incorporated tool params)
Line 19: Line 19:
== Creating self-shadowing bump maps ==
== Creating self-shadowing bump maps ==


Valve's tools ([[height2ssbump]]) for creating ssbumps aren't in the SDK yet, [http://forums.facepunchstudios.com/showthread.php?t=529746 but there is a way to create them manually].
It's currently only possible to [http://forums.facepunchstudios.com/showthread.php?t=529746 create ssbumps manually], since '''<code>height2ssbump</code>''' has yet to be released. Nevertheless, here are the command line parameters it will support:
 
;<path/filename>
:The [[heightmap]] source file (presumed). TGA only?
;-r <int>
:Set the number of 'rays' (default 250). More rays take more time.
;-f <int>
:Set smoothing filter radius (default 10, 0 to disable).
;-n
:Generate a conventional normal map.
;-A
:Generate ambient occlusion in the alpha channel.
;-D
:Write out filtered result as <code>filtered.tga</code>.


[[Category:List of Shader Parameters|S]]
[[Category:List of Shader Parameters|S]]

Revision as of 15:41, 29 December 2008

$ssbump is a material parameter that flags a $bumpmap as being self-shadowing. It is only supported with LightmappedGeneric and requires the Orange Box.

You can read more about the technology behind it in this paper.

Tip.pngTip:Self-shadowed normal mapping is actually faster than the standard method!

Example

rockwall_cave_02a_height-ssbump.vtf
LightmappedGeneric
{
	$basetexture nature/rockwall_cave02a
	$surfaceprop concrete
	$bumpmap nature/rockwall_cave_02a_height-ssbump
	$ssbump 1
}

Creating self-shadowing bump maps

It's currently only possible to create ssbumps manually, since height2ssbump has yet to be released. Nevertheless, here are the command line parameters it will support:

<path/filename>
The heightmap source file (presumed). TGA only?
-r <int>
Set the number of 'rays' (default 250). More rays take more time.
-f <int>
Set smoothing filter radius (default 10, 0 to disable).
-n
Generate a conventional normal map.
-A
Generate ambient occlusion in the alpha channel.
-D
Write out filtered result as filtered.tga.