$ssbump: Difference between revisions
mNo edit summary |
m (Correct typo ("funcitonal")) |
||
Line 40: | Line 40: | ||
{{warning|Height2SSBump may crash if it is given too large of an input image. Images 2048x2048 or greater are confirmed to crash the tool.}} | {{warning|Height2SSBump may crash if it is given too large of an input image. Images 2048x2048 or greater are confirmed to crash the tool.}} | ||
{{bug|'''<code>height2ssbump</code>''' is currently non- | {{bug|'''<code>height2ssbump</code>''' is currently non-functional in {{Strata|4}} games. Use {{portal2|4}}'s instead, or {{csgo|4}}'s if you still have access to it}} | ||
You can use '''<code>normal2ssbump</code>''', another SDK tool, to generate an SSBump from a ''normal'' bump map (as opposed to a height or displacement map) - Unlike '''<code>height2ssbump</code>''' you do not need to run through the [[command line]] or use any additional parameters; simply drag-and-drop your normal map onto the program or a shortcut. | You can use '''<code>normal2ssbump</code>''', another SDK tool, to generate an SSBump from a ''normal'' bump map (as opposed to a height or displacement map) - Unlike '''<code>height2ssbump</code>''' you do not need to run through the [[command line]] or use any additional parameters; simply drag-and-drop your normal map onto the program or a shortcut. | ||
Revision as of 02:24, 11 May 2024


It is a boolean parameter that flags a $bumpmap texture as being a self-shadowing bump map.
Standard bump maps only darken texels that are facing away from a light source. Self-shadowing bump maps darken both texels facing away and also any texels which are 'behind' them, similar to Ambient Occlusion maps in modern game engines. You can read more about the technology behind it in this paper.

Example

Limitations
The shadows cast by the bump map are permanently baked into the texture, meaning that they can only appear in one of three predefined locations. height2ssbump
generates shadows for light arriving from the right, top-left, and bottom-left of the texture.

If light arrives from between those directions (such as from the left), the nearest available baked shadows are blended between, producing an acceptable but hardly ideal image.
Additionally, in order to preserve the illusion of height, low areas of a SSBumped material will receive less light even if it arrives head-on. This can look odd if you have too intense (rugged) a SSBump.
Creation
You need to use height2ssbump
, a command line SDK tool. The command is:
height2ssbump <options> <path\to\heightmap.tga> <float|bumpscale>
The output is <input name>-ssbump.tga
, in the same folder as the input file. Bumpscale
controls the intensity of the ssbump (i.e., coarseness of the surface).



height2ssbump
is currently non-functional in 


You can use normal2ssbump
, another SDK tool, to generate an SSBump from a normal bump map (as opposed to a height or displacement map) - Unlike height2ssbump
you do not need to run through the command line or use any additional parameters; simply drag-and-drop your normal map onto the program or a shortcut.

Options
<path/filename>
- The source heightmap (TGA format).
-r <int>
- Set the number of 'rays' (default 250). More rays take more time.
-n
- Generate a conventional bump map as
<input name>-bump.tga
. -d
(in all games since)(also in
)
- Generate an ssbump detail texture, used with $detailblendmode 10 and 11.
Confirm:How does this differ from a making regular SSBump? public/bitmap/float_bm.h has a description.
-A
- Generate ambient occlusion in the alpha channel.
-f <int>
- Set smoothing filter radius (default 10; 0 disables).
-D
- Write out filtered result as
filtered.tga
.
An example of a complete command is:
height2ssbump -r 275 "C:\Path\to\example-height.tga" 35
Third Party Tools
Third-party tools capable of generating SSbump maps:

|