水体

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.
它能够创建真实地反射和折射场景的水体,并能在整个地图中流动。

特殊行为
- 昂贵和廉价
水体
材质分为两类:昂贵和廉价。昂贵水体在实时反射和折射场景,而廉价水体使用$envmap并且不会折射。用户可以通过视频选项禁用昂贵水体渲染,因此在整个地图中始终放置env_cubemap实体。- 水面上方和水面下方
水体
实际上需要两个材质:一个在水面上,一个在水面下。这些材质是独立的,但为了获得正确的效果,必须在大部分区域内关联。- 流动贴图
- 水体可以在任意方向流动。然而,手动创建流动贴图非常复杂,而Valve内部使用的工具尚未公开。
着色器参数
贴图

$underwateroverlay
$bumpmap
$normalmap
$dudvframe
$bumpframe
$bumptransform
$scale
$flashlighttint
$waterdepth
$depth_feather
雾
$fogstart
$fogend
$lightmapwaterfog
反射
$reflecttexture
$reflectamount
$reflecttint
$envmap
$envmapframe
$forceenvmap
$forcecheap
$forceexpensive
$cheapwaterstartdistance
$cheapwaterenddistance
$reflectentities
$reflectonlymarkedentities
$reflectskyboxonly
$reflect2dskybox
$reflect3dskybox
$reflectblendfactor
$nofresnel
$forcefresnel
$basereflectance
$maxreflectance
折射
$refract
$refracttexture
$refractamount
$refracttint
$blurrefract
$pseudotranslucent
$waterblendfactor
流水
$scroll1 "[<normal X> <normal Y>]"
(存在于自以来)
$scroll2 "[<normal X> <normal Y>]"
(存在于自以来)
- 如果定义了
$scroll1
并且X值不为零,将绘制两个额外的法线图层,这些图层会合并在一起。第一个层级是原始法线图层的7倍大并旋转45°;第二个是原始法线图层的2倍大并旋转90°。参数指定了额外图层的移动速度和方向。(Valve的材质通常包含第三个数字,但它似乎没有显著效果,最可能已经过时。)
流动贴图
$flowmap
$flow_normaluvscale
$flow_worlduvscale
$flow_uvscrolldistance
$flow_timeintervalinseconds
$flow_timescale
$flow_bumpstrength
$flow_noise_texture
$flow_noise_scale
$flow_debug

基础纹理流动
$basetexture
$color_flow_uvscale
$color_flow_timescale
$color_flow_timeintervalinseconds
$color_flow_uvscrolldistance
$color_flow_lerpexp
$color_flow_displacebynormalstrength
流动贴图的创作
总体来说,尝试手动创建流动贴图是一个噩梦。手动绘制流动贴图、将其调整到世界中、并绘制泡沫,非常困难。
但是,如果你想尝试,可以从流动贴图的红绿通道读取流动方向。50%灰度意味着没有移动。
使用流动贴图的水纹理的任何面贴图的纹理缩放似乎与流动贴图直接相关。使用较少的水面或平面时,创建自定义流动贴图的过程会更容易(当使用“视为一”功能进行缩放匹配时,选择所有水面也是一种可能的选择)。
- 红色通道
- X轴
- 绿色通道
- Y轴
- 透明度通道
- 控制从《Portal 2》起
$basetexture
的混合。
- 现在有工具可以帮助绘制流动贴图。
- Flow field editor from algoholic.eu : http://algoholic.eu/another-flow-field-editor-update/ [dead link]
- Flowmap generator (paid): http://www.superpositiongames.com/products/flowmap-generator
- 使用Houdini(UDK)创建流动贴图 : https://www.dropbox.com/s/ii2x077vj64lyhl/Water%20Flow%20For%20UDK.pdf [dead link]
其他
%CompileWater
%CompileSlime
$surfaceprop
%tooltexture
WaterLOD proxy
- 这连接到水的内部参数的 water_lod_control 实体。必须在材质中声明它,以使LOD机制正常工作。