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 Crash Fix: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{note|''This fix has been rolled into [[Orange Box]] VRAD. Only Episode One mappers still have to apply it manually.''}}
{{Subpage|[[VRAD]]}}
 
{{LanguageBar}}
{{note|''This fix was left out of [[Left 4 Dead]] VRAD. So Left 4 Dead mappers will still have to apply it manually.''}}
 
This fix applies to instances where [[VRAD]] crashes as it begins the [[HDR]] lighting pass while using the switch ''-both''. The [[LDR]] part of the compile typically completes without error, but once the HDR part starts, VRAD crashes without an error message.


{{source topicon}}{{l4D topicon}}
{{note|{{Src07|since}} This fix has been fixed. Only {{Src06|4}} and {{l4d|4}} mappers still have to apply it manually.}}
This fix applies to instances where [[VRAD]] crashes as it begins the [[HDR]] lighting pass while using the switch <code>-both</code>. The LDR part of the compile typically completes without error, but once the HDR part starts, VRAD crashes without an error message.
== Solution ==
== Solution ==
Splitting the LDR and HDR passes in vrad.exe execution seems to prevent this crash from occurring. This is as simple as defining 2 vrad commands -- one using the "-ldr" switch and the other using the "-hdr" switch -- instead of just one using the "-both" switch in Hammer's compile configuration. The following will detail what you can do in Hammer to achieve this.
Splitting the LDR and HDR passes in <code>vrad.exe</code> execution seems to prevent this crash from occurring. This is as simple as defining 2 VRAD commands—one using the <code>-ldr</code> switch and the other using the <code>-hdr</code> switch—instead of just one using the <code>-both</code> switch in Hammer's compile configuration. The following will detail what you can do in Hammer to achieve this.


Credit to Xanthi of the Steam User's forum for bringing this fix to light.
Credit to Xanthi of the Steam User's forum for bringing this fix to light.


== Setting up Hammer ==
== Setting up Hammer ==
 
# Open up the Run Map dialog (''File > Run…'' or {{key|F9}}) in Hammer.
# Open up the Run Map dialog (File -> Run... or F9) in Hammer.
# If not already in "Expert Mode", click the "Expert" button in the bottom left of the dialog.
# If not already in "Expert Mode", click the "Expert" button in the bottom left of the dialog.
# Select "HDR Full Compile" from the Configuration pull-down.
# Select "HDR Full Compile" from the Configuration pull-down.
#: '''Note:''' In this example, we are editing the existing "HDR Full Compile" configuration to apply the fix. The following steps can be used for the "HDR Full Compile -final (Slow)" configuration by maintaining the ''-final'' switch in the Parameters box.
{{Note|In this example, we are editing the existing "HDR Full Compile" configuration to apply the fix. The following steps can be used for the "HDR Full Compile -final (Slow)" configuration by maintaining the ''-final'' switch in the Parameters box.}}
# Select the 3rd item down, it should say "$light_exe -both -game $gamedir..."
# Select the 3rd item down, which should say <code>$light_exe -both -game $gamedir…</code>.
# In the text box labeled "Parameters", along the right of the dialog, change the switch "-both" to "-ldr". It should now read "-ldr -game $gamedir $path\$file"
# In the text box labeled "Parameters", along the right of the dialog, change the switch <code>-both</code> to <code>-ldr</code>. It should now read <code>-ldr -game $gamedir $path\$file</code>.
# Click the "New" button to create a new command in the configuration and select the new blank command at the bottom of the list.
# Click the "New" button to create a new command in the configuration and select the new blank command at the bottom of the list.
# Press the "Move up" button twice to move the new command to right under the command you just edited.
# Press the "Move up" button twice to move the new command to right under the command you just edited.
# Enter into the text box labeled "Command": $light_exe or use the "Cmd" button to the right and select the "LIGHT Program" option for the drop-down menu.
# Enter <code>$light_exe</code> into the text box labeled "Command," or use the "Cmd" button to the right and select the "LIGHT Program" option for the drop-down menu.
# Into the Parameters text box enter: "-hdr -game $gamedir $path\$file"
# Into the "Parameters" text box, enter: <code>-hdr -game $gamedir $path\$file</code>.


You now have a fixed HDR compile configuration in Hammer. You must use this configuration in "Expert" mode. "Normal" mode will still use the -both flag for HDR compiles.
You now have a fixed HDR compile configuration in Hammer. You must use this configuration in "Expert" mode. "Normal" mode will still use the <code>-both</code> flag for HDR compiles.


[[Category:Bug fixes]]
[[Category:Hammer]]
[[Category:Tutorials]]

Latest revision as of 00:02, 4 January 2025

English (en)中文 (zh)Translate (Translate)

Note.pngNote:(in all games since Source 2007) This fix has been fixed. Only Source 2006 Source 2006 and Left 4 Dead Left 4 Dead mappers still have to apply it manually.

This fix applies to instances where VRAD crashes as it begins the HDR lighting pass while using the switch -both. The LDR part of the compile typically completes without error, but once the HDR part starts, VRAD crashes without an error message.

Solution

Splitting the LDR and HDR passes in vrad.exe execution seems to prevent this crash from occurring. This is as simple as defining 2 VRAD commands—one using the -ldr switch and the other using the -hdr switch—instead of just one using the -both switch in Hammer's compile configuration. The following will detail what you can do in Hammer to achieve this.

Credit to Xanthi of the Steam User's forum for bringing this fix to light.

Setting up Hammer

  1. Open up the Run Map dialog (File > Run… or F9) in Hammer.
  2. If not already in "Expert Mode", click the "Expert" button in the bottom left of the dialog.
  3. Select "HDR Full Compile" from the Configuration pull-down.
Note.pngNote:In this example, we are editing the existing "HDR Full Compile" configuration to apply the fix. The following steps can be used for the "HDR Full Compile -final (Slow)" configuration by maintaining the -final switch in the Parameters box.
  1. Select the 3rd item down, which should say $light_exe -both -game $gamedir….
  2. In the text box labeled "Parameters", along the right of the dialog, change the switch -both to -ldr. It should now read -ldr -game $gamedir $path\$file.
  3. Click the "New" button to create a new command in the configuration and select the new blank command at the bottom of the list.
  4. Press the "Move up" button twice to move the new command to right under the command you just edited.
  5. Enter $light_exe into the text box labeled "Command," or use the "Cmd" button to the right and select the "LIGHT Program" option for the drop-down menu.
  6. Into the "Parameters" text box, enter: -hdr -game $gamedir $path\$file.

You now have a fixed HDR compile configuration in Hammer. You must use this configuration in "Expert" mode. "Normal" mode will still use the -both flag for HDR compiles.