Zh/$bumpmap: Difference between revisions
< Zh
Jump to navigation
Jump to search
(Created page with "{{subst:#if: Translation of '$bumpmap' to '中文' via Template:LanguageBar buttons * * * * * * * * * * * * * * * * * * * * * * * * * * * *...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{wip}}{{translate}} | |||
{{LanguageBar}} | {{LanguageBar}} | ||
{{this is a|shader parameter|notext=1|name=$bumpmap}} | {{this is a|shader parameter|notext=1|name=$bumpmap}} | ||
[[File:Brickwall021a normalcompare.jpg|thumb|A material's | [[File:Brickwall021a normalcompare.jpg|thumb|A material's {{L|diffuse}} (left) compared to its normal map.]] | ||
[[File:Example of bump mapping.jpg|thumb|The above material in-game.]]It specifies a | [[File:Example of bump mapping.jpg|thumb|The above material in-game.]]It specifies a {{L|texture}} that will provide three-dimensional lighting information for a material. The texture is a {{L|bump map}}, but the process it is used for is called {{w|normal mapping}}. The two terms are often used interchangeably, however. | ||
{{warning|<code>$bumpmap</code> will disable {{ent|prop_static}}'s per-vertex lighting in every Source game before {{csgobranch|4}}.<br> | {{warning|<code>$bumpmap</code> will disable {{ent|prop_static}}'s per-vertex lighting in every Source game before {{csgobranch|4}}.<br> | ||
Not enough data is stored in the vertices for normal mapping, so the engine has no choice but to fall back.}} | Not enough data is stored in the vertices for normal mapping, so the engine has no choice but to fall back.}} | ||
{{important|Bumpmapped brushes and displacements generate four lightmaps per-surface (one for each light direction, plus non-bumped version), instead of one. If {{code|$bumpmap}} or {{code|$normalmap}} is added to a VMT that did not have it at the time of compilation, the map must be recompiled. | {{important|Bumpmapped brushes and displacements generate four lightmaps per-surface (one for each light direction, plus non-bumped version), instead of one. If {{code|$bumpmap}} or {{code|$normalmap}} is added to a VMT that did not have it at the time of compilation, the map must be recompiled. | ||
{{note|This does not apply to maps compiled using the {{code|-bumpall}} | {{note|This does not apply to maps compiled using the {{code|-bumpall}} {{L|VBSP}} parameter (Which creates 4 lightmaps for all faces, regardless of if they are bumpmapped). This parameter should not be used often, however, as it significantly increases lightmap usage.}} | ||
}} | }} | ||
{{Important|<code>$bumpmap</code> does not exist for {{code| | {{Important|<code>$bumpmap</code> does not exist for {{code|{{L|LightmappedReflective}}}}. Use <code>$normalmap</code> instead.}} | ||
{{note| | {{note| | ||
* In the <code> | * In the <code>{{L|Water_(shader)|Water}}</code> shader, <code>$bumpmap</code> is for a DX8 {{L|Du/dv_map|du/dv map}}. Use <code>$normalmap</code> instead. | ||
* Bump maps cannot be used on decal textures except in {{csgobranch|4}}. | * Bump maps cannot be used on decal textures except in {{csgobranch|4}}. | ||
* On {{ent|VertexLitGeneric}} using {{ent|$lightwarptexture}} will force bumpmapping even if <code>$bumpmap</code> is not in the VMT. A default one is bound instead, all <code>$bumpmap</code> caveats come with it.}} | * On {{ent|VertexLitGeneric}} using {{ent|$lightwarptexture}} will force bumpmapping even if <code>$bumpmap</code> is not in the VMT. A default one is bound instead, all <code>$bumpmap</code> caveats come with it.}} | ||
{{bug| <code>$bumpmap</code> causes some other Parameters to not work. Parameters that will break with <code>$bumpmap</code> are ( but not limited to ) : | {{bug| <code>$bumpmap</code> causes some other Parameters to not work. Parameters that will break with <code>$bumpmap</code> are ( but not limited to ) : | ||
* Will not work with materials using {{ent|$envmapmask}}. Except on {{ent|VertexLitGeneric}}{{mapbase|only}} and {{ent|LightmappedGeneric}}{{csgo|only}}. See | * Will not work with materials using {{ent|$envmapmask}}. Except on {{ent|VertexLitGeneric}}{{mapbase|only}} and {{ent|LightmappedGeneric}}{{csgo|only}}. See {{L|$envmapmask#Alternative_methods|Alternative methods}}. | ||
* In {{csgo}} {{ent|LightmappedGeneric}}, | * In {{csgo}} {{ent|LightmappedGeneric}}, {{L|$detail#Parameters and Effects|$detailblendmode}} 9 cannot be used. | ||
* In {{csgo}} {{ent|VertexLitGeneric}}, | * In {{csgo}} {{ent|VertexLitGeneric}}, {{L|$detail#Parameters and Effects|$detailblendmode}} 5, 6, 8, 9, 10 and 11 not usable. With {{ent|$phong}} 5 and 6 can be used. | ||
* In {{src13}}{{tf2}}{{as}} {{ent|VertexLitGeneric}}, | * In {{src13}}{{tf2}}{{as}} {{ent|VertexLitGeneric}}, {{L|$detail#Parameters and Effects|$detailblendmode}} 5-11 not usable. With {{ent|$phong}} 5 and 6 can be used. | ||
* In {{src13}}{{tf2}}{{as}}{{csgo}} | * In {{src13}}{{tf2}}{{as}}{{csgo}} {{L|$detail#Parameters and Effects|$detailtint}} won't work. | ||
* {{ent|$distancealpha}}, {{ent|$outline}}, {{ent|$softedges}} won't work. | * {{ent|$distancealpha}}, {{ent|$outline}}, {{ent|$softedges}} won't work. | ||
* On {{ent|LightmappedGeneric}}, cannot be used with {{ent|$basealphaenvmapmask}} | * On {{ent|LightmappedGeneric}}, cannot be used with {{ent|$basealphaenvmapmask}} | ||
Line 52: | Line 42: | ||
{{VMT UVtransform}}|dx9=1}} | {{VMT UVtransform}}|dx9=1}} | ||
{{MatParam|$bumpframe|int|The frame to start an animated bump map on.}} | {{MatParam|$bumpframe|int|The frame to start an animated bump map on.}} | ||
{{MatParam|$nodiffusebumplighting|bool|Stops the bump map affecting the lighting of the material's | {{MatParam|$nodiffusebumplighting|bool|Stops the bump map affecting the lighting of the material's {{L|albedo}}, which help combat {{L|Material optimization#Overdraw|overdraw}}. Does not affect the {{L|specular}} map, making it useful for distorted reflections on flat surfaces. | ||
: {{bug|Does not function beyond {{src07|2}}.{{confirm}}}} | : {{bug|Does not function beyond {{src07|2}}.{{confirm}}}} | ||
: {{note|Functions with | : {{note|Functions with {{L|$ssbump}} but not regular normals on {{game link|Source 2013}}. More testing required?}} | ||
|shaders=LightmappedGeneric, Lightmapped_4WayBlend, WorldVertexTransition}} | |shaders=LightmappedGeneric, Lightmapped_4WayBlend, WorldVertexTransition}} | ||
{{MatParam|$ssbump|bool|Flags the bump map texture(s) as being self-shadowing. Click for more details.|since={{src07}}|shaders=LightmappedGeneric, Lightmapped_4WayBlend, WorldVertexTransition}} | {{MatParam|$ssbump|bool|Flags the bump map texture(s) as being self-shadowing. Click for more details.|since={{src07}}|shaders=LightmappedGeneric, Lightmapped_4WayBlend, WorldVertexTransition}} | ||
Line 71: | Line 61: | ||
==Console Commands== | ==Console Commands== | ||
{{IO|mat_fastnobump|param=bool|Quickly enables/disabled normal mapping.}} | {{IO|mat_fastnobump|param=bool|Quickly enables/disabled normal mapping.}} | ||
{{IO|mat_normalmaps|param=bool|Displays the bump map texture of all materials that have one in place of their | {{IO|mat_normalmaps|param=bool|Displays the bump map texture of all materials that have one in place of their {{L|diffuse}}.}} | ||
{{IO|mat_bumpmap|param=bool|Enable or disable normal mapping. Default 1.}} | {{IO|mat_bumpmap|param=bool|Enable or disable normal mapping. Default 1.}} | ||
==See also== | ==See also== | ||
* {{ent|$ssbump}} | * {{ent|$ssbump}} | ||
* | * {{L|Bump map}}, for technical details and a guide to creation. |
Revision as of 19:34, 16 March 2025

This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.
The person who added this notice will be listed in its edit history should you wish to contact them.

This page needs to be translated.
This page either contains information that is only partially or incorrectly translated, or there isn't a translation yet.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.
This page either contains information that is only partially or incorrectly translated, or there isn't a translation yet.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.
$bumpmap
是一个材质着色器 参数,可在所有的 起源 游戏中使用。

A material's diffuse (left) compared to its normal map.
It specifies a texture that will provide three-dimensional lighting information for a material. The texture is a bump map , but the process it is used for is called normal mapping. The two terms are often used interchangeably, however.

$bumpmap
will disable prop_static's per-vertex lighting in every Source game before 
Not enough data is stored in the vertices for normal mapping, so the engine has no choice but to fall back.



$bumpmap
does not exist for LightmappedReflective. Use $normalmap
instead.
- In the
Water
shader,$bumpmap
is for a DX8 du/dv map . Use$normalmap
instead. - Bump maps cannot be used on decal textures except in
CS:GO 引擎分支.
- On VertexLitGeneric using $lightwarptexture will force bumpmapping even if
$bumpmap
is not in the VMT. A default one is bound instead, all$bumpmap
caveats come with it.

$bumpmap
causes some other Parameters to not work. Parameters that will break with $bumpmap
are ( but not limited to ) :
- Will not work with materials using $envmapmask. Except on VertexLitGeneric(仅存在于
之中) and LightmappedGeneric(仅存在于
之中). See Alternative methods .
- In
LightmappedGeneric, $detailblendmode 9 cannot be used.
- In
VertexLitGeneric, $detailblendmode 5, 6, 8, 9, 10 and 11 not usable. With $phong 5 and 6 can be used.
- In
VertexLitGeneric, $detailblendmode 5-11 not usable. With $phong 5 and 6 can be used.
- In
$detailtint won't work.
- $distancealpha, $outline, $softedges won't work.
- On LightmappedGeneric, cannot be used with $basealphaenvmapmask
Basic Syntax
LightmappedGeneric
{
$basetexture brick/brickwall021a
$surfaceprop brick
$bumpmap brick/brickwall021a_normal
}
Additional Parameters
$bumptransform
$bumpframe
$nodiffusebumplighting
$ssbump
$forcebump
$bump_force_on
$addbumpmaps
$bumpmap2
$bumpframe2
$bumptransform2
$bumpmask
$bumpdetailscale1
Console Commands
- mat_fastnobump <布尔值 >
- Quickly enables/disabled normal mapping.
- mat_normalmaps <布尔值 >
- Displays the bump map texture of all materials that have one in place of their diffuse .
- mat_bumpmap <布尔值 >
- Enable or disable normal mapping. Default 1.