$bumpmap
< Zh
Jump to navigation
Jump to search
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是一个材质着色器参数,可在所有的
起源 游戏中使用。
材质的漫反射贴图(左)与其法线贴图对比。
该参数指定为材质提供三维光照信息的纹理。该纹理属于凹凸贴图,但其应用过程被称为
法线贴图。不过这两个术语常被混用。
$bumpmap 会在所有由于顶点中未存储足够的法线贴图数据,引擎只能回退处理。
$bumpmap或$normalmap但编译时未包含该参数,则地图必须重新编译。
-bumpall VBSP参数编译的地图(该参数会为所有面生成4张光照贴图,无论是否启用凹凸贴图)。但应谨慎使用此参数,因其会显著增加光照贴图占用。$bumpmap 不适用于光照反射。请改用$normalmap。- 在
Water着色器中,$bumpmap用于DX8的du/dv贴图。请改用$normalmap。 - 除
CS:GO 引擎分支外,贴花纹理无法使用凹凸贴图。 - 在VertexLitGeneric中使用$lightwarptexture会强制启用凹凸贴图,即使VMT中未声明
$bumpmap。此时会绑定默认贴图,所有$bumpmap相关限制仍适用。
$bumpmap 会导致部分参数失效。受影响参数包括(但不限于):
- 与使用$envmapmask的材质不兼容。VertexLitGeneric
和LightmappedGeneric
除外。详见替代方案。 - 在
的LightmappedGeneric中无法使用$detailblendmode 9。 - 在
的VertexLitGeneric中无法使用$detailblendmode 5、6、8、9、10和11。若启用$phong则5和6可用。 - 在


的VertexLitGeneric中无法使用$detailblendmode 5-11。若启用$phong则5和6可用。 - 在



中$detailtint无效。 - $distancealpha、$outline、$softedges无效。
- 在LightmappedGeneric中无法与$basealphaenvmapmask共用。
基础语法
LightmappedGeneric
{
$basetexture brick/brickwall021a
$surfaceprop brick
$bumpmap brick/brickwall021a_normal
}
附加参数
对凹凸贴图纹理进行矩阵变换。
待完善: 是否必须DX9?在DX8回退着色器中存在。
- The default position is
center .5 .5 scale 1 1 rotate 0 translate 0 0.centerdefines the point of rotation. Only useful ifrotateis being used.scalefits the texture into the material the given number of times.2 1is a 50% scale in the horizontal X axis while the vertical Y axis is still at original scale.rotaterotates the texture counter-clockwise in degrees. Accepts any number, including negatives.translateshifts the texture by the given numbers..5will shift it half-way. 1 will shift it once completely over, which is the same as not moving it at all.
注意:All values must be included!
错误:Scaling the texture may cause odd issues where the Texture Lock tool in Hammer will not actually lock the texture in place. [todo tested in ?]
错误:Rotating textures applied on brushes will rotate around the map origin (confirm: Orangebox engine only?). A fix for this is to change the center position in the VMT to the brush's origin. [todo tested in ?]
$bumpframe <整数>
设置动画凹凸贴图的起始帧。
Shader(s): LightmappedGeneric, Lightmapped_4WayBlend, WorldVertexTransition
将凹凸贴图标记为自阴影贴图。点击查看详情。
0:根据显卡支持情况启用凹凸贴图;1:始终强制启用。
Shader(s): LightmappedGeneric, Lightmapped_4WayBlend, WorldVertexTransition
强制启用凹凸贴图,即使低端设备也生效。
Shader(s): LightmappedGeneric
在LightmappedGeneric中启用双凹凸贴图混合。
Shader(s): LightmappedGeneric, Lightmapped_4WayBlend, WorldVertexTransition
Shader(s): LightmappedGeneric, Lightmapped_4WayBlend, WorldVertexTransition
同
$bumpframe,但作用于第二张凹凸贴图。
Shader(s): LightmappedGeneric, Lightmapped_4WayBlend, WorldVertexTransition
同
$bumptransform,但作用于第二张凹凸贴图。
注意:若LightmappedGeneric着色器使用$addbumpmaps,则$detail配合$detailscale会覆盖此参数。
使用两张凹凸贴图时,可用第三张凹凸贴图作为基底,其alpha通道作为前两张的遮罩。
$bumpmask的alpha通道也用作高光遮罩。
注意:与$detail和$seamless_scale不兼容。
Shader(s): LightmappedGeneric
设置第一、第二张凹凸贴图在混合时的强度。
控制台命令
| 控制台变量/命令 | 参数或默认值 | 描述符 | 效果 |
|---|---|---|---|
| mat_fastnobump | bool | 快速切换法线贴图启用状态。 | |
| mat_normalmaps | bool | 将所有材质的凹凸贴图显示在漫反射贴图位置。 | |
| mat_bumpmap | 1 | bool | 启用/禁用法线贴图。 |