/r/hammer

Photograph via snooOG

This subreddit is meant for everything around the mapping tool Hammer. Here you can post questions, get feedback, help others, or simply brag about your work!

Welcome! This subreddit is meant for everything around the mapping tool Hammer (GoldSrc, Source and Source2). Here you can post questions, get feedback, help others, or simply brag about your work!


Posting guidelines:

  1. Be humble and nice.

  2. Please try to avoid requests.

  3. Please tag your post with what game it is for. E.g: [CSGO].

  4. Please mark your post with the appropriate flair.


Join the SourceEngine Discord chat!


Useful links:

Hammer related FAQs by TopHATTwaffle.

3kliksphilip guides.

More YouTube tutorials by reddit user awkook.

How to use light_environment.

Source engine water types.

Official Valve guides.


Related subreddits:

/r/SourceEngine

/r/CSMapMakers

/r/GlobalOffensive

/r/TF2

/r/HalfLife

/r/L4D2

/r/hammer

25,520 Subscribers

1

I need Vmap conversion help.

So I have a .tif color map file, but to use it in the editor I need it to be a .vmap. Is there some way to convert this file? Also sorry if I sound stupid or smt, I completely new to this editor.

0 Comments
2024/10/06
11:07 UTC

1

Hammer++ Propper++ creates messy textures with alpha channel

Propper++ issue evidence

As in the title. The whole fuzz is about splitting textures to the texture atlas to create a new UV map, in which there is always some blurry offset created by propper++ (check images), even if there is no alpha channel. It does not matter if there are no transparent parts of the model, but if there are, then it's completely wrong. I double-checked not to have it in the original textures. Any idea what to do, or it should be fixed in the propper++ itself? The worst-case scenario would be to clear up the texture manually. However, this will be a horrible task if it is necessary to do on foliage.

0 Comments
2024/10/06
10:54 UTC

1

VScripting help

I'm new to VScripting, and I can't wrap my head around how calling functions when an event happens work. I know that in GLua just uses "function event(params)" but that doesn't seem to work in Squirrel? Am I just stupid or what?

0 Comments
2024/10/06
09:45 UTC

1

how do i make fog go only in one direction?

im making non-playable room, where i want to make gray fog. so how do i make it go in one direction?

0 Comments
2024/10/06
09:22 UTC

78

I guess I messed up Pakrat

2 Comments
2024/10/06
07:08 UTC

66

A bit of an unusual post: Some weird music visuals I created a while ago using maps made in Hammer

4 Comments
2024/10/06
04:02 UTC

3

Anyone know if I can make J.A.C.K. read both cstrike and cstrike_addon folders?

So I'm setting up J.A.C.K. for some good ol' goldsrc mapping. For CS 1.6 specifically. Anyways I can't seem to make the program read both directories (cstrike and cstrike_addon), which is a pain in the ass, cause it means I gotta move everything into one of the folders, cstrike most likely, which kinda defeats the purpose of even having the '_addon' folder around since I'm cluttering the base game folder, by using J.A.C.K.

1 Comment
2024/10/05
23:20 UTC

5

Map build fails after last update on light baking on AMD card.

10 Comments
2024/10/05
19:37 UTC

3

Map build fails at light baking after last cs2 update.

1 Comment
2024/10/05
19:37 UTC

2

Wrong PostSpawn() function called

I am in the TF2 hammer editor.

I have two point_templates in my map, each one with their unique entity script. In each point_template's entity script, I defined PostSpawn() and PreSpawnInstance(). When I spawn an instance of either point_template, it always invokes the last created point_template's PostSpawn() function.

As a test, I created a third point_template, named it nothing, connected it to nothing (its not hooked up to any env_entity_maker), but gave it an entity script with the following contents:

function PreSpawnInstance( entityClass, entityName )
{
    return null
}

function PostSpawn( entities )
{
    printl("This is the random script, connected to nothing")
}

Sure enough, whenever I spawn an instance of the first or second point_template, I see the "This is the random script, connected to nothing" string in my console.

Prior to creating the unnamed point_template, all instances of either point_template would invoke the second point_template's PostSpawn(). Prior to creating the second point_template, all instances of the first point_template would invoke that point_template's PostSpawn().

Do all PostSpawn() functions exist in a global scope and just override each other? I must be missing something because this seems rather strange and unintuitive.

0 Comments
2024/10/05
02:02 UTC

10

Negative lights in Source?

I read on the wiki that using a negative brightness value for a light will "suck out the amount of lighting that the equivalent positive brightness would cast."

I thought this would be a great way to create artificial shadows with penumbras using light_spot. However, the light does nothing in-game. Does this only work in certain builds, or is the wiki just incorrect?

7 Comments
2024/10/05
00:53 UTC

9

Why is VRAD3 breaking on my map render D:

6 Comments
2024/10/04
20:34 UTC

2

The light_enviroment isn't working, only my revolver is affected by the lighting

1 Comment
2024/10/04
18:56 UTC

4

Can't Compile. Unable to Run Vrad3

UPDATE 2 - FIX FOR RTX CARDS: revert nvida gpu driver to version 561.09. The new cs update along with the new driver doesn't work.

The recent update (Oct. 2, 2024) caused a reoccurring error that wasn't present before. If I set generate lightmaps to fast quality I can compile, anything higher causes the error. If someone knows how to fix it please let me know!

PC specs:
CPU: AMD ryzen 9 7800x (integrated graphics disabled in BIOS).

GPU: Nvidia rtx 4090

The error:

Error running "vrad3.exe -map maps/untitled_1.vmap -script script-gpu.vrad3 -aftermath -aftermath_full -vulkan -gpuraytracing -allthreads -unbufferedio -noassert"
VRAD3 - Distributed Lighting Tool
Copyright (c) Valve Corporation, All rights reserved.
Build: pc64 Oct 1 2024 14:41:32
WD: d:\programs\steam\steamapps\common\counter-strike global offensive\game\csgo_addons\pact_001\_vrad3
Command: vrad3.exe -map maps/untitled_1.vmap -script script-gpu.vrad3 -aftermath -aftermath_full -vulkan -gpuraytracing -allthreads -unbufferedio -noassert
Fossilize ERROR: Failed to parse ApplicationInfoFilter, letting recording go through.
Fossilize INFO: Overriding serialization path: "D:\Programs\Steam\steamapps\shadercache\730\fozpipelinesv6\steamapprun_pipeline_cache".
Unable to open Vulkan pipeline cache shadercache\vulkan\shaders.cache file - might not exist yet.
Num Threads: 31
Loading 1 resources... Done (0.00 seconds)
Creating VB/IB/BLAS for 1 meshes... Done (0.01 seconds)
Creating ray trace scene world with 1 instances... Done (0.00 seconds)
Loading lightmap_packing_geometry.dat... Done (0.00 seconds)

Encountered accessviolation.

Wrote minidump to .\vrad3_2024_1004_132243_0_accessviolation.mdmp

Unable to run Vrad3.
Light mapper didn't return valid triangles: failing.
+- csgo_addons\pact_001\maps\untitled_1\world.vrman
--> Map build FAILED.

Update 1:

I tried running the compiler command line in power shell and it said, "Unable to open Vulkan pipeline cache shadercache&#92;vulkan&#92;shaders&#46;cache file &#45; might not exist yet&#46;</font><br/><font color="#FFFF00"></font><font color="#FFFF00">Trying to set dxlevel &#40;111&#41; which is higher than the card can support.

So either a rtx 4090 cant run Vulkan (insane) or the hammer compiler refuses to use my card.

6 Comments
2024/10/04
18:32 UTC

1

Hammer crashing when saving manually or Ctrl + S

EDIT: Potentially fixed, read bottom if you are searching for this issue.

A new issue has started appearing for me in the map editor. Previous, larger projects did crash once in a while, but those were understandable (manipulating way too many meshes at once). Now it has started crashing very frequently when I try to save any changes made to the map.

Since it hasn't been crashing like this before, I can't imagine it's because of my computer specs. All help is appreciated :)

Potential fix: I did not respect geometry enough and had an insane n-gon. Just dividing the n-gon into quads and triangles seems to have fixed it.

I also chose Windows 8 as the compatibility option for cs2.exe and csgocfg.exe. Additionally I made exceptions for all .exe files in my anti-virus. Haven't had a crash in a long time now.

2 Comments
2024/10/04
14:17 UTC

413

Source 2 vs. Source 1 lighting (ported my old CSGO map to CS2)

35 Comments
2024/10/04
13:52 UTC

1

Button / Trigger over multiple rounds ?

Hey, got a question regarding CS2 SDK, if somebody here is able to help.

Basically I want to have a button / trigger / relay being actived and for it's outputs to last over multiple rounds, until half time.

Is that possible to achieve or do they always reset after every round ?

I've researched quite a bit and haven't received any answers on the web.

Thanks in advice.

4 Comments
2024/10/04
12:06 UTC

289

Relatable

7 Comments
2024/10/04
11:46 UTC

1

No Pointfile but Skybox is still buggy! Please help!!!

https://preview.redd.it/q46y99vmiosd1.png?width=2140&format=png&auto=webp&s=2d02d16a0728c69b2c91516c21e52e0802764ea3

Yeah, like it says. There's no leak but the skybox is still screwed up :(

I tried looking up to see if anybody has had this problem and I couldn't find anything :(

this is the compile text:

** Executing...

** Command: "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\bin\vbsp.exe"

** Parameters: -game "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf" "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\maps\mapsrc\first_map.vmf"

Valve Software - vbsp.exe (Jun 25 2024)

12 threads

Using shader api: shaderapiempty.dll

materialPath: C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\materials

Loading C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\maps\mapsrc\first_map.vmf

fixing up env_cubemap materials on brush sides...

ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (0)

ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (0)

Processing areas...done (0)

Building Faces...done (0)

FixTjuncs...

PruneNodes...

WriteBSP...

done (0)

writing C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\maps\mapsrc\first_map.prt...Building visibility clusters...

done (0)

material "skybox/sky_midnight_02rt" not found.

Can't load skybox file skybox/sky_midnight_02 to build the default cubemap!

Can't load skybox file skybox/sky_midnight_02 to build the default cubemap!

Finding displacement neighbors...

Finding lightmap sample positions...

Displacement Alpha : 0...1...2...3...4...5...6...7...8...9...10

Building Physics collision data...

done (0) (4071 bytes)

Placing detail props : 0...1...2...3...4...5...6...7...8...9...10

Compacting texture/material tables...

Reduced 8 texinfos to 4

Reduced 2 texdatas to 2 (44 bytes to 44)

Writing C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\maps\mapsrc\first_map.bsp

ZIP Output overshot buffer estimate: Estimated 0, actual 54

0 seconds elapsed

CMaterialDict::Shutdown m_MissingList count: 1

** Executing...

** Command: "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\bin\vvis.exe"

** Parameters: -game "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf" "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\maps\mapsrc\first_map"

Valve Software - vvis.exe (Jun 25 2024)

12 threads

reading c:\program files (x86)\steam\steamapps\common\team fortress 2\tf\maps\mapsrc\first_map.bsp

reading c:\program files (x86)\steam\steamapps\common\team fortress 2\tf\maps\mapsrc\first_map.prt

24 portalclusters

44 numportals

BasePortalVis: 0...1...2...3...4...5...6...7...8...9...10 (0)

PortalFlow: 0...1...2...3...4...5...6...7...8...9...10 (0)

Optimized: 0 visible clusters (0.00%)

Total clusters visible: 512

Average clusters visible: 21

Building PAS...

Average clusters audible: 24

visdatasize:340 compressed from 384

writing c:\program files (x86)\steam\steamapps\common\team fortress 2\tf\maps\mapsrc\first_map.bsp

ZIP Output overshot buffer estimate: Estimated 0, actual 54

0 seconds elapsed

** Executing...

** Command: "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\bin\vrad.exe"

** Parameters: -game "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf" "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\maps\mapsrc\first_map"

Valve Software - vrad.exe SSE (Jun 25 2024)

Valve Radiosity Simulator

12 threads

[Reading texlights from 'lights.rad']

unknown light specifier type - lights

[56 texlights parsed from 'lights.rad']

Loading c:\program files (x86)\steam\steamapps\common\team fortress 2\tf\maps\mapsrc\first_map.bsp

Setting up ray-trace acceleration structure... Done (0.00 seconds)

160 faces

375011 square feet [54001664.00 square inches]

0 Displacements

0 Square Feet [0.00 Square Inches]

160 patches before subdivision

11752 patches after subdivision

sun extent from map=0.173648

3 direct lights

BuildFacelights: 0...1...2...3...4...5...6...7...8...9...10 (0)

BuildVisLeafs: 0...1...2...3...4...5...6...7...8...9...10 (0)

transfers 278634, max 194

transfer lists: 2.1 megs

GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)

Bounce #1 added RGB(2246, 2711, 3589)

GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)

Bounce #2 added RGB(140, 165, 219)

GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)

Bounce #3 added RGB(9, 10, 13)

GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)

Bounce #4 added RGB(1, 1, 1)

Build Patch/Sample Hash Table(s).....Done<0.0023 sec>

FinalLightFace: 0...1...2...3...4...5...6...7...8...9...10 (0)

FinalLightFace Done

0 of 0 (0% of) surface lights went in leaf ambient cubes.

ThreadComputeLeafAmbient: 0...1...2...3...4...5...6...7...8...9...10 (0)

Writing leaf ambient...done

Ready to Finish

Object names Objects/Maxobjs Memory / Maxmem Fullness


models 1/1024 48/49152 ( 0.1%)

brushes 11/8192 132/98304 ( 0.1%)

brushsides 66/65536 528/524288 ( 0.1%)

planes 62/65536 1240/1310720 ( 0.1%)

vertexes 223/65536 2676/786432 ( 0.3%)

nodes 95/65536 3040/2097152 ( 0.1%)

texinfos 4/12288 288/884736 ( 0.0%)

texdata 2/2048 64/65536 ( 0.1%)

dispinfos 0/0 0/0 ( 0.0%)

disp_verts 0/0 0/0 ( 0.0%)

disp_tris 0/0 0/0 ( 0.0%)

disp_lmsamples 0/0 0/0 ( 0.0%)

faces 160/65536 8960/3670016 ( 0.2%)

hdr faces 0/65536 0/3670016 ( 0.0%)

origfaces 22/65536 1232/3670016 ( 0.0%)

leaves 97/65536 3104/2097152 ( 0.1%)

leaffaces 160/65536 320/131072 ( 0.2%)

leafbrushes 60/65536 120/131072 ( 0.1%)

areas 2/256 16/2048 ( 0.8%)

surfedges 796/512000 3184/2048000 ( 0.2%)

edges 429/256000 1716/1024000 ( 0.2%)

LDR worldlights 3/8192 264/720896 ( 0.0%)

HDR worldlights 0/8192 0/720896 ( 0.0%)

leafwaterdata 0/32768 0/393216 ( 0.0%)

waterstrips 20/32768 200/327680 ( 0.1%)

waterverts 0/65536 0/786432 ( 0.0%)

waterindices 243/65536 486/131072 ( 0.4%)

cubemapsamples 0/1024 0/16384 ( 0.0%)

overlays 0/512 0/180224 ( 0.0%)

LDR lightdata [variable] 273500/0 ( 0.0%)

HDR lightdata [variable] 0/0 ( 0.0%)

visdata [variable] 340/16777216 ( 0.0%)

entdata [variable] 964/393216 ( 0.2%)

LDR ambient table 97/65536 388/262144 ( 0.1%)

HDR ambient table 97/65536 388/262144 ( 0.1%)

LDR leaf ambient 297/65536 8316/1835008 ( 0.5%)

HDR leaf ambient 97/65536 2716/1835008 ( 0.1%)

occluders 0/0 0/0 ( 0.0%)

occluder polygons 0/0 0/0 ( 0.0%)

occluder vert ind 0/0 0/0 ( 0.0%)

detail props [variable] 1/12 ( 8.3%)

static props [variable] 1/12 ( 8.3%)

pakfile [variable] 54/0 ( 0.0%)

physics [variable] 4071/4194304 ( 0.1%)

physics terrain [variable] 2/1048576 ( 0.0%)

Level flags = 0

Total triangle count: 388

Writing c:\program files (x86)\steam\steamapps\common\team fortress 2\tf\maps\mapsrc\first_map.bsp

ZIP Output overshot buffer estimate: Estimated 0, actual 54

0 seconds elapsed

** Executing...

** Command: Copy File

** Parameters: "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\maps\mapsrc\first_map.bsp" "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\maps\first_map.bsp"

** Executing...

** Command: "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\hl2.exe"

** Parameters: -game "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf" +map "first_map" -steam

3 Comments
2024/10/04
06:02 UTC

3

Is there a program that can bulk process prop_dynamic props into prop_static props?

Sorry if the question is hard to understand, I'm not really sure how to word it.

Is there a way to make basically all props able to be used as prop_static so that it can cast proper baked shadows in a map? I'm kind of tired having to convert a prop that can only be prop_dynamic into prop_static just to have nice shadows.

If this is a problem related to optimization then I apologize, but I've seen on the wiki that prop_static should be less performance heavy than prop_dynamic so I'm hoping to do that.

ediy: I'm aware that you can bulk change prop classes from dynamic to static, but not all props can be turned into static props, and will be deleted when the map compiles. I'm talking more like something akin to H++'s Propper++ that recompiles things into prop_static, but in bulk for every prop.

9 Comments
2024/10/04
03:52 UTC

1

Just moved my game files. How do I open hammer?

I just got another SSD so I moved TF2 of my disk onto the SSD so I could load the game faster while I edit.

Unfortunately, hammer is looking for some file in its previous location and will no longer open:

https://preview.redd.it/xhihio2mpnsd1.png?width=358&format=png&auto=webp&s=c3808dd80c580c3ed0c3a0b54d9a74c534153d00

What's telling hammer to look in this location and how do I make it look somewhere else? Things I've tried:

  • Deleting the bin folder and verifying the game files to re-install it
  • restarting steam
  • restarting my pc
  • Downloading the Source SDK steam tool and running "Reset Game Configurations".

Edit: Figured it out. I found the file "H:\SteamLibrary\steamapps\common\Team Fortress 2\bin\GameConfig.txt" (this is my new tf2 install location), opened the file, and changed all of the old paths to the new paths and it works.

3 Comments
2024/10/04
03:14 UTC

9

Why are my point_template instances facing me side on instead of head on?

I have a point_template. The templated entities consist of a blue cylinder and a light_dynamic:

https://preview.redd.it/2pnanj5f0nsd1.png?width=293&format=png&auto=webp&s=3d3e07c3867622d31251461b733dbc525375497f

The cylinder's parent is the light_dynamic. The light dynamic is pointing straight down.

I have the light dynamic pointing to a func_illusionary that I have attached to the player's eyes. I can confirm this part at least worked because if I spawn a bunch of my template'd cylinders, the cylinders re-orient.

The problem is, I expect to see the bottom of the cylinders, but for some reason they are re-orienting so I see their side. What's going on here?

Edit: The bottom of the cylinder has a "bulls eye" design on it (the reason its a cylinder is because for some reason if I flatten it into a circle, the center of the bulls eye starts clipping into the rest of it and looks funky). The goal is to get the bulls eye to always face the player, and all this nonsense with the light_dynamic and the parenting is just the best way I could figure out to accomplish that.

2 Comments
2024/10/04
00:54 UTC

3

Coop mapping?

Hi guys,

I was talking to a friend about mapping in CS and he was very enthusiastic about my idea. My idea is to create a map in CS together. So I was wondering if there is a version control system (VCS) in the Hammer editor? Or any tool that makes it possible to create a map together? How do professionals deal with this problem?

5 Comments
2024/10/03
19:11 UTC

2

Hammer++ Error

I keep getting an Error about copying something into somewhere, i even downgraded my version of hammer, still nothing.
I need help.

Error Message:


Running command:

copy "C:\Program Files (x86)\Steam\steamapps\sourcemods\mapbase_episodic\maps\1.bsp" "\1.bsp"



Command failed with return code 0x1!

** Screenshot the WHOLE window when showing this compile log

** Or upload the .log file generated beside your VMF


1 command(s) finished in 0 seconds

Press a key to close.

3 Comments
2024/10/03
17:05 UTC

4

cs2 Compilation error VK_ERROR_DEVICE_LOST.

The map just stopped compiling for no reason, other maps work fine, error:
Vulkan encountered unrecoverable error VK_ERROR_DEVICE_LOST.
0....1....2....3....4....5....6....7....8....9....] FAILED (101.41 seconds)

https://preview.redd.it/69gkowcenksd1.png?width=1210&format=png&auto=webp&s=4256c4efa7e1ab06a43a0af62c4b560ae6d27d0e

full: https://pastebin.com/MdHMxS9g

1 Comment
2024/10/03
16:55 UTC

6

Directional audio is "flipped?" In the final map of my L4D2 campaign and I have no idea why.

When I say directional, I mean Like you hear the bot survivors voices in front of you even though they are behind you, or a smoker making noise on my left and grabbing me from the right. What the hell is going on? I've never seen this problem before and the other chapter audio is perfectly normal!

4 Comments
2024/10/03
16:42 UTC

34

The CS2 update added bits to the workshop tools

6 Comments
2024/10/03
11:09 UTC

157

What do you guys think of this? (EXTRA PICTURES IN COMMENTS)

25 Comments
2024/10/03
09:38 UTC

0

CPU COMPILATION DONE? Thanks Gaben, as always (no)

SO its not working anymore from command manager
Its just stop C/users/username command
Also this update broke my laser texture from de_nuke, now its not visible at all
GENIOUS GABEN, why they touch maps

1 Comment
2024/10/03
08:19 UTC

9

Job: Looking for an experienced GoldSrc Mapper for a Large Roleplay City Map

Hi there!

I’m an experienced mapper with an extensive knowledge of the GoldSrc engine, and have models, textures, and many other resources at the ready. However, I no longer have the time to map myself (at least not on this scale), though will collaborate/advise throughout the process - I’m seeking a highly skilled mapper to create a roleplay city map for the GoldSrc engine (legacy engine version) for a mod called 'The Specialists'. This will be a large and intricate city with a gritty 1970’s New York feel, inspired by the street and city levels of Cry of Fear, Max Payne, and a few GoldSrc/Garry's mod maps.

The challenge with a map of this scale lies in avoiding the notorious clipnode and AllocBlock limitations. However, with smart use of func_detail and Valve's detail texture system, we can push these boundaries and create something both big and detailed.

If you are savvy with these techniques and passionate about creating something truly unique, I’d love to hear from you about this project!

Requirements:

  • Extensive experience with the GoldSrc engine and mapping.
  • Deep understanding of the limits (e.g., clipnode, AllocBlock) and how to bypass/work around them.
  • Creativity in designing buildings, interiors and layouts
  • A portfolio would be very good!

Compensation: Up for negotiation - but am willing to pay well

Contact: goldsrcmappers@gmail.com

Kindest regards :)

2 Comments
2024/10/03
01:22 UTC

Back To Top