/r/hammer
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:
Be humble and nice.
Please try to avoid requests.
Please tag your post with what game it is for. E.g: [CSGO].
Please mark your post with the appropriate flair.
Join the SourceEngine Discord chat!
Useful links:
Hammer related FAQs by TopHATTwaffle.
More YouTube tutorials by reddit user awkook.
Related subreddits:
/r/hammer
https://www.moddb.com/mods/sane-in-silence Let me know what you guys think! Mapping is all done by me 😀
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.
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.
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?
im making non-playable room, where i want to make gray fog. so how do i make it go in one direction?
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.
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.
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?
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)
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\vulkan\shaders.cache file - might not exist yet.</font><br/><font color="#FFFF00"></font><font color="#FFFF00">Trying to set dxlevel (111) 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.
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.
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.
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
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.
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:
What's telling hammer to look in this location and how do I make it look somewhere else? Things I've tried:
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.
I have a point_template. The templated entities consist of a blue cylinder and a light_dynamic:
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.
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?
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.
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)
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!