$ssbump: Difference between revisions
Jump to navigation
Jump to search
Tip:Self-shadowed normal mapping is actually faster than the standard method!
TomEdwards (talk | contribs) |
TomEdwards (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
'''$ssbump''' is a [[material]] parameter that flags a [[$bumpmap]] as being self-shadowing. It is only supported with <code>[[LightmappedGeneric]]</code> and requires the [[Orange Box]]. | '''$ssbump''' is a [[boolean]] [[material]] parameter that flags a [[$bumpmap]] as being self-shadowing. It is only supported with <code>[[LightmappedGeneric]]</code> and requires the [[Orange Box]]. | ||
You can read more about the technology behind it [http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_EfficientSelfShadowedRadiosityNormalMapping.pdf in this paper]. | You can read more about the technology behind it [http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_EfficientSelfShadowedRadiosityNormalMapping.pdf in this paper]. | ||
Line 11: | Line 11: | ||
LightmappedGeneric | LightmappedGeneric | ||
{ | { | ||
$basetexture nature/rockwall_cave02a | $basetexture nature/rockwall_cave02a | ||
$surfaceprop concrete | $surfaceprop concrete | ||
$bumpmap nature/rockwall_cave_02a_height-ssbump | $bumpmap nature/rockwall_cave_02a_height-ssbump | ||
'''$ssbump | '''$ssbump''' 1 | ||
} | } | ||
Line 23: | Line 23: | ||
;<path/filename> | ;<path/filename> | ||
:The source [[heightmap]] (TGA format). | :The source [[heightmap]] (TGA format). | ||
;-r <int> | ;-r <[[Integer|int]]> | ||
:Set the number of 'rays' (default 250). More rays take more time. | :Set the number of 'rays' (default 250). More rays take more time. | ||
;-f <int> | ;-f <int> | ||
:Set smoothing filter radius (default 10 | :Set smoothing filter radius (default 10; 0 disables). | ||
;-n | ;-n | ||
:Generate a conventional normal map. | :Generate a conventional normal map. |
Revision as of 07:16, 30 December 2008
$ssbump is a boolean 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.

Example
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 source heightmap (TGA format).
- -r <int>
- Set the number of 'rays' (default 250). More rays take more time.
- -f <int>
- Set smoothing filter radius (default 10; 0 disables).
- -n
- Generate a conventional normal map.
- -A
- Generate ambient occlusion in the alpha channel.
- -D
- Write out filtered result as
filtered.tga
.