Valve Hammer Editor: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 13: Line 13:
<!-- Details -->
<!-- Details -->
| developer = Valve Corporation
| developer = Valve Corporation
| initial_release = November 05, 2004<br><font style="font-size:10px;">(1.0, as Worldcraft)</font>
| initial_release = November 05, 2004<br><font style="font-size:10px;">(4.0)</font>
| stable_release = <!-- VHE on Source continues to receive updates so there's no point putting it here. -->
| stable_release = Actively developed <font style="font-size:10px;">(4.1)</font> <!-- VHE on Source continues to receive updates on most Source games. -->
| written_in =  
| written_in =  
| type = Map Editor
| type = Map Editor
Line 38: Line 38:
While in many ways improved, its core is still tied to ancient software architecture, and, being a product of its time, it often struggles under the load of designing modern, highly detailed looking levels.  
While in many ways improved, its core is still tied to ancient software architecture, and, being a product of its time, it often struggles under the load of designing modern, highly detailed looking levels.  


Despite that, {{hl2|1.bold}} and every other Source title was built with it. Its relative ease of entry and gradual learning curve attract modders to this day.
Despite that, {{hl2|1.bold}} and every other Source title was built with it. Its relative ease of entry and gradual learning curve attract modders to this day. This version of Hammer also continued to receive updates to this day.
{{ModernImportant|There are several community-made updates to Hammer (unfortunately, none are open-source, as the source code for Hammer has never been officially released, only either leaked, or available to licensees who kept it closed).<br>They are not essential for creating Source levels, but include bugfixes, QoL and extended features. '''They are [[#Community fixes|listed further below]]'''.}}
{{ModernImportant|There are several community-made updates to Hammer (unfortunately, none are open-source, as the source code for Hammer has never been officially released, only either leaked, or available to licensees who kept it closed).<br>They are not essential for creating Source levels, but include bugfixes, QoL and extended features. '''They are [[#Community fixes|listed further below]]'''.}}


Line 83: Line 84:
The fault is inherent to Hammer's 32-bit and single-thread architecture. It will struggle to display too many detailed objects and draw levels across vast distances; this is even apparent with '''Half-Life 2''''s own stock levels. To make matters worse, having a large number of visible objects - ''regardless'' of what they are or how low-poly they are - will degrade both performance and input times, and make everything like selecting, editing settings, or moving objects take longer.  
The fault is inherent to Hammer's 32-bit and single-thread architecture. It will struggle to display too many detailed objects and draw levels across vast distances; this is even apparent with '''Half-Life 2''''s own stock levels. To make matters worse, having a large number of visible objects - ''regardless'' of what they are or how low-poly they are - will degrade both performance and input times, and make everything like selecting, editing settings, or moving objects take longer.  


To fix it, keep the Model and Detail render distance in the 3D View tab of the Settings, on the lower side.
To workaround this, keep the Model and Detail render distance in the 3D View tab of the Settings, on the lower side.
{{Tip|Hotkeys {{Key|1}} and {{Key|2}} move the 3D view clipping plane back and forth - you can use it to quickly adjust it and thus lessen the rendering load on the editor.}}
{{Tip|Hotkeys {{Key|1}} and {{Key|2}} move the 3D view clipping plane back and forth - you can use it to quickly adjust it and thus lessen the rendering load on the editor.}}


Line 253: Line 254:
* {{csgo|1.bold}} ([[Counter_Strike_Global_Offensive.fgd|FGD]])
* {{csgo|1.bold}} ([[Counter_Strike_Global_Offensive.fgd|FGD]])


=== Hammer 5.x ({{src2|3.1}}) ===
{{stub|section=1}}
[[File:Hammercs2.png|thumb|250px|Hammer 5.x]]
{{hammer5|4.1}} is the official {{source2|1.bold}} mapping tool. The UI has been redesigned to utilizing [[Qt]] and adding more new features. Hammer 5.x can be obtained via the game's Workshop Tools DLC if available.
Unlike the previous Hammer in both '''Source''' and '''GoldSrc''' engine, this version utilizes meshes instead of BSP brushes and includes many "modeling" software features.
{| class="standard-table mw-collapsible mw-collapsed"
|- style="position:sticky; top:0; z-index:10"
! style="background:#666666; text-align:center; width:5em" | Version
! style="background:#666666; text-align:center; width:10em" | Game
! style="background:#666666; text-align:center; width:10em" | Release date
! style="background:#666666; text-align:center" | Features
|-
| 5.0, (build 9743)
| {{dota2|1.bold}}
| September 2015?
| Initial release of Source 2 Hammer for Dota 2. {{todo|Add more information.}}
|-
| 5.0 (build 8838)
| {{svrh|1.bold}}
| 2017
| {{todo|Add more information.}}
|-
| 5.0, (unknown build)
| {{hla|1.bold}}
| May 16, 2020‎
| {{todo|Add more information.}}
|-
| 5.0, (unknown build)
| {{sbox|1.bold}}
| July 26, 2022
|
*Added Asset Browser <br>{{todo|Add more information.}}
|-
| 5.0, (build 9832)
| {{cs2|1.bold}}
| June 7, 2023
| Initial release of Source 2 Hammer for '''CS2'''.{{confirm}}
*Added Workshop Item Tools and Workshop Manager <br>{{todo|Add more information.}}
|-
| 5.0, (build 9960)
| '''Counter-Strike 2'''
| March 22, 2024
| Latest version for '''CS2'''.
|}
{{cls}}
{{cls}}
== Troubleshooting ==
This section list the common issues that users may encounter when using Hammer, and how to troubleshoot it.
=== Hammer won't display grid ===
If you try to load or create a new level in '''Hammer''' and the viewports don't show the standard grid, it's possible you just need to press {{Key|Shift|R}} to toggle the grid, so go ahead and try that first.
Many new modders have been reporting that when they try to create new levels for their mod, Hammer will load, but it won't display the grid, and they can't add new entities to the map, and if it was a loaded map, they can't see anything except through the main camera. If you're having this problem, you probably also aren't able to launch your mod from Steam (even if you can launch it from your compiler). If this is the case, the problem probably lies in your mod's gameinfo file.
Check <code>gameinfo.txt</code> and check the number after SteamAppId. This needs to match the [[Steam Application ID]] of the base game you will be using to launch your mod. If the number points to a game that you don't have installed, you won't be able to launch your mod, and Hammer won't work either.
Moving the location of Hammer will cause it to be unable to find key files when loading a configuration, notably <code>gameinfo.txt</code>. To fix this, adjust the file paths in <code>GameConfig.txt</code> which can be found in the same folder as Hammer.
=== Poor performance ===
Due to Hammer being limited to single core, having high render distance will result in poor performance, even on powerful hardware.
To change the render distance, go to Tools ▶ Options ▶ 3D views, and adjust the Model and Detail render distance to be less than 5000-6000, or alternatively, use third-party or community-made modified version of Hammer.


== See also ==
== See also ==
Line 325: Line 265:
* {{hammerpp|1.bold}} - an alternative to Hammer for most Source engine games. It also adds several new features for level editing and modding.  
* {{hammerpp|1.bold}} - an alternative to Hammer for most Source engine games. It also adds several new features for level editing and modding.  
* {{slamminsrc|1.bold}} - an alternative to Hammer for most Source engine games, with performance upgrades and modernization.  
* {{slamminsrc|1.bold}} - an alternative to Hammer for most Source engine games, with performance upgrades and modernization.  
* {{Sledge|1.bold}} – a free and open-source alternative to Hammer for GoldSource. It supports '''Windows'''. It is no longer being developed.
* {{svencraft|1.bold}} - a modified version of Hammer 3.4 for {{svencoop|1.bold}}.
* {{Gearcraft|1.bold}} - a modified version of Hammer 3.4{{confirm}} for {{nightfire|1.bold}}.


== External links ==
== External links ==
Line 334: Line 271:


{{leveleditors}}
{{leveleditors}}
{{goldsrc sdktools}}
{{sdktools}}
{{sdktools}}
{{sdktools/source2}}


[[Category:Glossary]]
[[Category:Glossary]]
[[Category:Valve tools]]
[[Category:Valve tools]]
[[Category:Official Tools]]
[[Category:Official Tools]]
[[Category:Official GoldSrc Tools]]
[[Category:Official Source Tools]]
[[Category:Official Source Tools]]
[[Category:Official Source 2 Tools]]
[[Category:Hammer]]
[[Category:Hammer]]
[[Category:Level Design]]
[[Category:Level Design]]
[[Category:Tools]]
[[Category:Tools]]

Revision as of 21:25, 19 August 2024

Split-arrows.png Split

It has been suggested that this article or section be split into multiple articles: WAY too busy and imcomprehensive as a single article, with so many distracting tidbits.. (Discuss)

Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality because:
Overwhelmingly cluttered article for what's arguably the heart of Goldsrc/Src/2 modding. Each should have its own dedicated page: VHE/Hammer (GoldSrc), Hammer (Source), Hammer (Source 2). The mess of templates and notices should be completely revised, redundant tidbits cleared out. This article is just embarassing!
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.
Under construction.png
This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.

The user who added this notice, should you wish to contact them, is: leonidakarlach (talk) tr = idir.
Additional Notes: This page is being split into Valve Hammer Editor (GoldSrc), Valve Hammer Editor (Source), Valve Hammer Editor (Source 2). Once the pages has been updated, all other translated page needs to be rewritten.

English (en)Deutsch (de)Español (es)한국어 (ko)Português do Brasil (pt-br)Русский (ru)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)Translate (Translate)
Valve Hammer Editor
The Hammer Editor splash screen, which appears when being launched (version 4.x, Source).
Developer(s)
Valve Corporation
Initial release
November 05, 2004
(4.0)
Stable release
Actively developed (4.1)
Type
Map Editor
Distribution

Valve Hammer Editor (version 4.x) is Valve's in-house level editor for Source titles, included in the Source SDK. It is a further evolution of Hammer 3.x from the GoldSrc engine. Many of its core concepts, features, and UI elements still match those of 3.x, as does the underlying mapping theory: building sealed levels with brushes and compiling them into BSP maps.

While in many ways improved, its core is still tied to ancient software architecture, and, being a product of its time, it often struggles under the load of designing modern, highly detailed looking levels.

Despite that, Half-Life 2 and every other Source title was built with it. Its relative ease of entry and gradual learning curve attract modders to this day. This version of Hammer also continued to receive updates to this day.

Icon-Important.pngImportant:There are several community-made updates to Hammer (unfortunately, none are open-source, as the source code for Hammer has never been officially released, only either leaked, or available to licensees who kept it closed).
They are not essential for creating Source levels, but include bugfixes, QoL and extended features. They are listed further below.

Installing and launching

Older versions of Hammer (for Source 2009 and earlier) are shipped in their respective Source SDK packages, and are intended to be launched via the deprecated Source SDK Launcher.

Since the SteamPipe update and the release of Source 2013, Hammer are often preinstalled automatically with the games, and is available in the 🖿/bin/ folder of a particular game (🖿Half-Life 2/bin, 🖿Portal/bin, etc). However, in some cases, such as games starting with Left 4 Dead, Portal 2, etc., or some third-party Source games, their Authoring Tools need to be installed and launched to access Hammer.

Some of these sub-versions are interchangeable, such as between HL2, both of its Episodes, Portal, Counter-Strike: Source and Source 2013. Others, such as Portal 2's and Counter-Strike: Global Offensive, have certain exclusive features (Maya integration for P2, Sprinkle Tool for CS:GO) and may not be fully compatible with other titles. Additionally, VMF files created on Hammer (on newer branches such as Alien Swarm) may crashes on Hammer (on older branches like Source 2013) when loaded, unless it was converted or by using community-made version of Hammer.

For further information on setting up Hammer for Source, see Your First Map, Getting Started and its following articles.

See also Category:Hammer for more links to Hammer documentation.

Features and tools

Stub

This article or section is a stub. You can help by expanding it.

Compared to Hammer 3.x, the most notable new features include Displacements, I/O system, and using Source's own materialsystem for rendering textures and models. Later versions expanded on the user interface, adding the particle browser (since ASW), improved Model Browser, instances and other extra tools.

Community fixes

  • Slammin' Source Map Tools addresses performance and bug issues, adds convenience options and features, and comes with extended compilers: Slammin' Compile Tools;
  • Hammer++ updates Hammer with additional tools and modernized workflow, realtime in-editor lighting preview, in-editor physics and more. It is based on the no longer available "SDK 2013 Hammer" project, which closed off access after its developers started working with an engine license;
  • TeamSpen's Hammer Addons is a set of FGD enhancements, editor assets and scripts for working with Hammer, which don't directly modify the editor.

Developer resources

Common issues

See also:  Compile Errors

No grid (black viewports)

First, check that the grid is on. The hotkey Shift+R controls, so give it a try.

If that didn't help, check the formatting of your mod's 🖿gameinfo.txt.

It needs to include a key called SteamAppId, and the number after it needs to match the Steam Application ID of the base game you will be using to launch your mod.

This issue may also be caused by using a different Hammer version than the one intended for the game. To stay on the safe side, be sure to be launching 🖿hammer.exe from the 🖿/bin/ folder of the base game of your mod, or using Authoring Tools to launch it, if you're modding Portal 2, Left 4 Dead or Left 4 Dead 2 or Counter-Strike: Global Offensive.

Poor performance

The fault is inherent to Hammer's 32-bit and single-thread architecture. It will struggle to display too many detailed objects and draw levels across vast distances; this is even apparent with Half-Life 2's own stock levels. To make matters worse, having a large number of visible objects - regardless of what they are or how low-poly they are - will degrade both performance and input times, and make everything like selecting, editing settings, or moving objects take longer.

To workaround this, keep the Model and Detail render distance in the 3D View tab of the Settings, on the lower side.

Tip.pngTip:Hotkeys 1 and 2 move the 3D view clipping plane back and forth - you can use it to quickly adjust it and thus lessen the rendering load on the editor.

Make sure you didn't accidentally turn on Radius Culling by pressing C. This easy to press hotkey can cause huge performance loss and, to add insult to injury, make your level not compile until it is turned off.

The Radius Culling status is indicated by a circled red "R" on the Map Operations toolbar. Make sure it is de-pressed, unless you actually intend to use it.

Note.pngNote:Depending on the Hammer version, the button and the feature itself may not be present altogether. Older - pre-Steampipe - Hammer didn't have it, while Slammin' Hammer and Hammer++ keep it off by default and remove the hotkey.

Version History

Version Game/Branch Release date Features
4.0 All Source 2004 games November 05, 2004 Initial release of Hammer in the Source SDK.

Updates:

  • Source Engine materials system. Materials created with the Source Engine's advanced shader-based texturing system are properly rendered inside the Hammer Editor.
  • Displacement surfaces. A new class of mesh geometry that can be sculpted into different shapes and connected to one another to create terrain and other complex surfaces.
  • Input and Outputs entity system. Entities use a new method to trigger and connect to one another, offering a higher level of flexibility and control than ever before.
  • Hierarchical VisGroups. Objects can now be in multiple VisGroups, and Visgroups can be organized in a hierarchical manner for easier selection and organization.
  • Entity Helpers. New user interface controls that make editing parameters on entities such as spotlights and doors easier and clearer.
  • Per-face Lightmap controls. Lightmap density can be controlled on a per-face basis for more control over the balance of visual quality and rendering performance.
  • Sound Browser. Built-in browser to hear a preview of sounds available to level designers.
  • Non-modal Entity Report and Check for Problems dialogs. Dialogs are now non-modal, allowing for changes in the level and camera controls while using the information in the dialog boxes.
  • Smoothing Groups. Per-face control of lighting-based smoothing.
  • Find and Replace. Functions to both search and replace for text in any entity name, parameter, input, or output.
  • Selection Mode toolbar. A new toolbar to control the impact of groups and entities upon the selection tools.
  • Overlays. A new type of texture entity, similar to decals, but with far greater control over how it is applied to surfaces.
4.1 Half-Life 2: Lost Coast, All Source 2006 games and newer November 22, 2005

Updates:

  • HDR tools support. High Dynamic Range levels can be compiled and run from Hammer.
  • VGUI Model Browser. All new model browser with a full tree control and real-time 3D previewing of model geometry, rendered with the Source material system.
  • Enhanced 2D and 3D Views. 2D and 3D views are now rendered with a unified Source materials system, allowing for real-time feedback of transformations in all viewports simultaneously, and much faster rendering of the viewports.
  • 2D model and displacement Rendering. Prop models and displacement geometry rendering in 2D viewports.
  • Enhanced Auto Visgroups. A larger number of Visgroup categories, as well as an improved interface makes Visgroups more powerful.
  • Autosave feature. Creates automatic, numbered backups of maps, with options for when and where backups are created.
  • Paste Special enhancements. Provides options for renaming objects when pasted to avoid name collisions with automatic entity I/O fixup.
4.1 Source 2007 October 10, 2007

Updates:

  • Inspecting Leaves in Hammer. You can now see visleaves using the Load Portal File option in Hammer, instead of using the glview application.
Todo: Add more updates and changes in Source 2007 Hammer.
4.1 (unknown build) Left 4 Dead June 25, 2009 Initial release of Left 4 Dead Authoring Tools's Hammer.
4.1 (unknown build) Left 4 Dead 2 Between November 17, 2009 and December 26, 2009 Initial release of Left 4 Dead 2 Authoring Tools's Hammer.
Icon-silk-question.png Question: When L4D2 tools was actually released?
4.1 (unknown launch build) Alien Swarm July 19, 2010 Valve Map Format (.vmf) that are created using this version are incompatible
with previous version of Hammer without some modification and workarounds (such as using Left 4 Dead Authoring Tools/Left 4 Dead 2 Authoring Tools or editing VMF files).

Updates:

  • Added a way to export the selected brushes to Maya.
4.1 (unknown build) Portal 2 May 6, 2011 Initial release of Portal 2 Authoring Tools's Hammer.[confirm]
4.1 (unknown build) Portal 2 May 12, 2011

Fixes:

  • Fixed certain keystrokes being ignored by Hammer when browsing models
4.1 (unknown build) Portal 2 May 17, 2011

Fixes:

  • Fixed crash that could occur when malformed brushes were saved in a map and then re-opened in Hammer.
  • Hammer will now properly save maps after detecting and fixing malformed brushes. Fixes “Permission Denied” error some users were experiencing.
  • Removed “Lighting Preview” option as this is not currently supported.
4.1 (unknown build) Portal 2 May 20, 2011

Fixes:

  • Fixed Hammer becoming unresponsive after launching map
4.1 (unknown build) Portal 2 May 26, 2011 to May 21, 2012 Unknown
4.1 (BETA, unknown build) Counter-Strike: Global Offensive May 5, 2012 (or earlier)[confirm] Initial release of Counter-Strike: Global Offensive Authoring Tools's Hammer.
4.1 (unknown launch build) Counter-Strike: Global Offensive August 21, 2012 Launch version of Counter-Strike: Global Offensive Authoring Tools's Hammer.
4.1 (build 8678) Alien Swarm September 24, 2020 Latest version for Alien Swarm.
4.1 (build 9008) Source 2013 July 2, 2021 Latest version for Day of Defeat: Source, Half-Life 2: Deathmatch and Source SDK Base 2013 - Multiplayer
4.1 (build 9092) Team Fortress 2 September 16, 2021 Unknown
4.1 (build 9109) Team Fortress 2 October 5, 2021 Unknown
4.1 (build 9464) Team Fortress 2 September 26, 2022 Unknown
4.1 (build 9520) Half-Life 2 November 17, 2023 Latest version for Source 2013 (only in Half-Life 2).
4.1 (build 9540) Team Fortress 2 December 8, 2022 Unknown
4.1 (build 10038) Team Fortress 2 April 18, 2024 Added a dedicated 64 bit version.
4.1 (build 10042) Team Fortress 2 April 22, 2024 Latest version for Team Fortress 2 Team Fortress 2.
Todo: Additional updates, like instances in Left 4 Dead and model spray patterns in Counter-Strike: Global Offensive?. Also Portal 2 Hammer have an option to enable "DotA Camera".

Source FGDs

Note.pngNote:Most games come with their proper FGD.

See also

External links