这篇条目有关 Source引擎。如需详情,点击这里。

Zh/$bumpmap: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
(deepseek translation)
(→‎控制台命令: Substituted IO templates)
Line 60: Line 60:


==控制台命令==
==控制台命令==
{{IO|mat_fastnobump|param=bool|快速切换法线贴图启用状态。}}
{{Varcom|start}
{{IO|mat_normalmaps|param=bool|将所有材质的凹凸贴图显示在{{L|diffuse|漫反射}}贴图位置。}}
{{Varcom|mat_fastnobump||bool|快速切换法线贴图启用状态。}}
{{IO|mat_bumpmap|param=bool|启用/禁用法线贴图。默认1。}}
{{Varcom|mat_normalmaps||bool|将所有材质的凹凸贴图显示在{{L|diffuse|漫反射}}贴图位置。}}
{{Varcom|mat_bumpmap|1|bool|启用/禁用法线贴图。}}
{{Varcom|end}}


==另见==
==另见==
* {{ent|$ssbump}}
* {{ent|$ssbump}}
* {{L|Bump map|凹凸贴图}},了解技术细节与制作指南。
* {{L|Bump map|凹凸贴图}},了解技术细节与制作指南。

Revision as of 17:38, 21 April 2025

Info content.png
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.(en)
English (en)Español (es)Français (fr)中文 (zh)Translate (Translate)

$bumpmap是一个材质(en)着色器(en)参数,可在所有的 起源 起源 游戏中使用。

材质的漫反射贴图(en)(左)与其法线贴图对比。
上述材质的游戏内效果。

该参数指定为材质提供三维光照信息的纹理(en)。该纹理属于凹凸贴图(en),但其应用过程被称为Wikipedia icon 法线贴图。不过这两个术语常被混用。

Warning.png警告:$bumpmap 会在所有CS:GO 引擎分支 CS:GO 引擎分支之前的Source游戏中禁用prop_static的逐顶点光照。
由于顶点中未存储足够的法线贴图数据,引擎只能回退处理。
Icon-Important.png重要:使用凹凸贴图的笔刷和置换表面会为每个面生成四张光照贴图(每个光照方向一张,外加非凹凸版本),而非一张。若在VMT中添加$bumpmap$normalmap但编译时未包含该参数,则地图必须重新编译。
Note.png注意:此规则不适用于使用-bumpall VBSP(en)参数编译的地图(该参数会为所有面生成4张光照贴图,无论是否启用凹凸贴图)。但应谨慎使用此参数,因其会显著增加光照贴图占用。
Icon-Important.png重要:$bumpmap 不适用于光照反射(en)。请改用$normalmap
Note.png注意:
Icon-Bug.png错误: $bumpmap 会导致部分参数失效。受影响参数包括(但不限于):   [todo tested in ?]

基础语法

LightmappedGeneric
{
	$basetexture	brick/brickwall021a
	$surfaceprop	brick
	$bumpmap		brick/brickwall021a_normal
}

附加参数

$bumptransform $bumpframe $nodiffusebumplighting $ssbump $forcebump $bump_force_on $addbumpmaps $bumpmap2 $bumpframe2 $bumptransform2 $bumpmask $bumpdetailscale1

控制台命令

{{Varcom|start}

mat_fastnobump bool 快速切换法线贴图启用状态。 mat_normalmaps bool 将所有材质的凹凸贴图显示在漫反射(en)贴图位置。 mat_bumpmap 1 bool 启用/禁用法线贴图。

另见