This article relates to the game "Left 4 Dead". Click here for more information.
This article's documentation is for anything that uses the Source engine. Click here for more information.

VRAD中的HDR崩溃修复

From Valve Developer Community
Jump to: navigation, search
Underlinked - Logo.png
This article needs more links to other articles to help integrate it into the encyclopedia. Please help improve this article by adding links that are relevant to the context within the existing text.
January 2024
English (en)中文 (zh)
... Icon-Important.png

Note.pngNote:(in all games since Source 2007)的 VRAD 已经被修复。只有Source 2006 Source 2006Left 4 Dead Left 4 Dead的地图作者仍然需要使用此修复方法。

此修复适用于 VRAD English在使用参数-both开始 HDR 光照通道时崩溃的情况。当编译到 LDR 部分是通常无错误地完成,但是,一旦开始 HDR 部分,VRAD 就会崩溃而不会出现错误消息。

解决方案

vrad.exe执行中分割 LDR 和 HDR 通道似乎可以防止发生这种崩溃。这与定义 2 个 VRAD 命令一样简单——一个使用-ldr开关,另一个使用-hdr开关——而不是在 Hammer 的编译配置中使用-both参数。以下内容将详细说明如何在 Hammer 中实现这一点。

感谢 Steam 用户论坛的 Xanthi 为此解决方案提供了重要信息。

配置Hammer

  1. 在Hammer中打开 Run Map 对话框(File > Run…F9)。
  2. 如果尚未处于“专家模式”中,请单击对话框左下方的“专家(Expert)”按钮。
  3. 从配置下拉菜单中选择“HDR Full Compile”。
Note.pngNote:在这个例子中,我们正在编辑现有的“HDR Full Compile”配置来应用修复。“HDR Full Compile -final (Slow)”通过在参数(Parameters)框中保留-final即可适用于以下步骤。
  1. 选择第三个项目,其内容应该为$light_exe -both -game $gamedir…
  2. 在对话框的右侧的标有“参数”的文本框中,将参数-both更改为-ldr。现在其内容应该是-ldr -game $gamedir $path\$file
  3. 单击“新建(New)”按钮在配置中创建一个新命令,然后在列表底部选择新建的空白命令。
  4. 按下“上移(Move up)”按钮两次,将新命令移至刚刚编辑的命令的下面。
  5. 在标有“Command”的文本框中输入$light_exe或者按“Cmd”按钮,然后在下拉菜单中选择“LIGHT Program”选项。
  6. 在参数文本框中输入-hdr -game $gamedir $path\$file

现在,在 Hammer 里有一个修改好的HDR编译配置。你必须在“专家”模式下使用此配置。“正常(Normal)”模式仍然使用-both标志进行HDR编译。