• Custom VBSP that lets you use dynamic/physics models with prop_static
    19 replies, posted
By default, VBSP will remove prop_static entities that use dynamic/physics models (unless they were compiled with the [I]allowstatic[/I] option in the model's QC file). Valve's developer wiki claims that this enforces consistency in the behaviour of props, which is a fair point, but this sort of thing should really be left up to the level designer. Fortunately, it turns out that this restriction is completely arbitrary and that it only exists within VBSP. After removing the restriction, I found that VRAD and Source are perfectly capable of handling such models as prop_static entities. [img_thumb]http://images.akamai.steamusercontent.com/ugc/391042736555733455/483E4081366FF8220F327E2D6D129AF22498C49C/[/img_thumb] Previously, each of these props in the above example could only be placed using the prop_physics or prop_dynamic_override entities. With my modified VBSP, it's possible to use such models with prop_static entities as well. Most notably, this allows the props to cast static lightmap shadows and to receive baked per-vertex lighting (which often looks better than the lighting of dynamic props). Additionally, it reduces the entdata in the map and some network and rendering overhead. Basically, this allows you to place prop_static entities using any model that has the 'static' box checked in the Info tab of Hammer's model viewer. All you need to do is replace your VBSP executable and add the [B]-allowdynamicpropsasstatic[/B] parameter to it. Download: [URL="https://www.dropbox.com/s/6qivlp37dh5c1po/vbsp-modified-20160429.zip?dl=1"]https://www.dropbox.com/s/6qivlp37dh5c1po/vbsp-modified-20160429.zip?dl=1 [/URL]Download mirror: [URL]https://github.com/wouterpleizier/source-sdk-2013/files/243134/vbsp-modified-20160429.zip[/URL] Source: [URL]https://github.com/wouterpleizier/source-sdk-2013[/URL] This VBSP also includes the following changes that I released earlier: [QUOTE=03C0;45543692]L4D introduced [URL="https://developer.valvesoftware.com/wiki/Func_detail_blocker"]func_detail_blocker[/URL], a useful brush entity that prevents the placement of detail props within its volume. Unfortunately it's not supported by the compile tools of older Source games, so I decided to implement it myself for a map I'm working on. Here's an example of it in action: [img_thumb]http://cloud-2.steamusercontent.com/ugc/588035299217752496/FBEB3A32A42DD4067C43B7E88920F7595CEF7545/[/img_thumb] If I'm not mistaken, none of the existing compilers that support this entity produce maps that can be loaded by GMod, so I thought it'd be a good idea to share this here. This VBSP also includes a -nodefaultcubemap parameter as a workaround to the buildcubemaps issue described [URL="http://www.facepunch.com/showthread.php?t=1293081"]here[/URL].[/QUOTE]
so if i read this right this new vbsp will use -nocubemap and -allowdynamicpropsasstatic on the end of the vbsp line :)
you da best
[QUOTE=taz0;48842978]so if i read this right this new vbsp will use -nocubemap and -allowdynamicpropsasstatic on the end of the vbsp line :)[/QUOTE] Not all the way at the end, since the last parameter must be the path to the VMF that needs to be compiled. As an example, this is what I currently use: [code]-allowdynamicpropsasstatic -nodefaultcubemap -game $gamedir $path\$file[/code] On a side note, [url=http://www.garrysmod.com/2015/08/11/august-2015-update/]a recent GMod update[/url] fixes the problem that occurs when building/saving cubemaps. This should mean that the -nodefaultcubemap option is no longer necessary if you're mapping for GMod, but I have not tested this myself.
Another incredibly useful and informative post from 03C0! This should be very helpful on my end, cheers!
You are the hero the mapping section deserves. I don't know how difficult it is to do these modifications, but could you make the same changes to a vbsp.exe version that is supported by source 2006 (ep1)? Many old mods still have living communities, but have not been updated for a long time. Could you also implement a option to have vbsp place prop_statics instead of prop_details when placing detail objects? I know these requests might leave the impression that I don't appreciate what you did already, so let me emphasize that this is unbelievably useful. Truly magnificent.
Thanks guys, glad to hear it's useful to you. [QUOTE=Grenade Man;48852365]I don't know how difficult it is to do these modifications, but could you make the same changes to a vbsp.exe version that is supported by source 2006 (ep1)? Many old mods still have living communities, but have not been updated for a long time.[/QUOTE] The changes I made are fairly small, so they should be easy to implement in older versions. However, I don't know how easy it is to set up and compile the 2006 code using recent versions of Visual Studio. I'd rather not spend time on that if there's no great demand for it. (Of course, others are welcome to do it themselves. It's open source, after all) [QUOTE]Could you also implement a option to have vbsp place prop_statics instead of prop_details when placing detail objects?[/QUOTE] I fear that that would require considerably more work, partly because prop_statics are normally written to the BSP before detail props are emitted. And as I've mentioned previously, I feel that it would be easier and more flexible to use an external tool (like Wall Worm) to place props into the VMF, rather than letting the compiler place them into the BSP. If a prop is big enough to warrant collisions and lighting/shadows, it should also be possible to manually tweak its placement.
I've already made such thing at least a year ago: [url]http://www.moddb.com/mods/half-life-2-e3-reconstruction/downloads/vbsp-prop-static-fix[/url]
Interesting, I didn't know that. In any case, I think it's a good thing that the source code is available for it now (even if it was a simple change).
I have an issue when i replace my VBSP with this on Gmod Hammer Editor. [CODE] ** Executing... ** Command: "D:\Program Files (x86)\Steam\SteamApps\common\GarrysMod\bin\vbsp.exe" ** Parameters: -allowdynamicpropsasstatic -nodefaultcubemap -game "D:\Program Files (x86)\Steam\SteamApps\common\GarrysMod\garrysmod" "e:\projets\mapping\test" Valve Software - vbsp.exe (Oct 6 2015) nodefaultcubemap = true 8 threads materialPath: D:\Program Files (x86)\Steam\SteamApps\common\GarrysMod\garrysmod\materials Loading e:\projets\mapping\test.vmf material "tools/toolsnodraw" not found. Material not found!: TOOLS/TOOLSNODRAW ConVarRef mat_reduceparticles doesn't point to an existing ConVar material "tools/toolsskybox" not found. Material not found!: TOOLS/TOOLSSKYBOX Can't find surfaceprop concrete for material FISH/GTAIVTEX/DC_PAVEMENT_PLAINSMALL01, using default Can't find surfaceprop concrete for material FISH/GTAIVTEX/DM_UN_SLOPEDPATH, using default material "tools/toolsskip" not found. Material not found!: TOOLS/TOOLSSKIP material "tools/toolshint" not found. Material not found!: TOOLS/TOOLSHINT Can't find surfaceprop concrete for material MANHAT/ROADS/ROAD01A, using default Can't find surfaceprop concrete for material FISH/GTAIVTEX/NJ01_ROAD3BASE, using default Can't find surfaceprop concrete for material FISH/GTAIVTEX/NJ01_SIDEWALK5, using default Can't find surfaceprop concrete for material FISH/GTAIVTEX/MH_CPTILE02, using default Can't find surfaceprop concrete for material MANHAT/ROADS/ROAD01B_JUNC, using default Can't find surfaceprop concrete for material FISH/GTAIVTEX/DC_PEDCROSSPLAIN1, using default Can't find surfaceprop metal for material TOOLS/INVISMETAL, using default Can't find surfaceprop concrete for material FISH/GTAIVTEX/ET_AP_ROAD1, using default Can't find surfaceprop concrete for material CONCRETE/BLACKTOP_EXT_01, using default Can't find surfaceprop plaster for material ENV/BRUSH/WALLS/WALL_SECCLASS, using default Can't find surfaceprop rubber for material BUILDINGS/ROOF07, using default Can't find surfaceprop tile for material TILE/TILE_CEILING_01, using default Can't find surfaceprop brick for material BRICK/BRICK_EXT_06, using default Can't find surfaceprop plaster for material ENV/BRUSH/WALLS/WALL_HURON_1ST, using default Can't find surfaceprop concrete for material CONCRETE/ALLEYS_SIDEWALK, using default Can't find surfaceprop dirt for material AJACKS/AJACKS_GRASS01, using default Can't find surfaceprop tile for material ENV/BRUSH/FLOORS/FLOOR_POOLSIDE, using default Can't find surfaceprop solidmetal for material BRIDGE/SE1_METAL_TILES_04, using default Can't find surfaceprop tile for material ENV/BRUSH/FLOORS/FLOOR_STONE_TILE, using default Can't find surfaceprop concrete for material CONCRETE/CINDERWALL04, using default Can't find surfaceprop metal for material QUALITY/METAL_SMALL_PLATES, using default Can't find surfaceprop solidmetal for material BRIDGE/SE1_METAL_TILES_01, using default Can't find surfaceprop metalvent for material METAL/CEILING_WHITE02, using default Can't find surfaceprop metal for material METAL/BRIDGE_BEAM01A, using default material "tools/toolsplayerclip" not found. Material not found!: TOOLS/TOOLSPLAYERCLIP Can't find surfaceprop concrete for material MANHAT/ROADS/ROAD01B, using default material "dev/dev_measuregeneric01b" not found. Material not found!: DEV/DEV_MEASUREGENERIC01B Can't find surfaceprop brick for material BRICK/BRICKWALL056A, using default Can't find surfaceprop plaster for material PLASTER/CEILINGTILES01, using default Can't find surfaceprop tile for material ENV/BRUSH/WALLS/ENSUITE_PEACH_BROWN, using default Can't find surfaceprop brick for material REALWORLDTEXTURES/NEWER/0/BRICKS_0_07, using default Can't find surfaceprop plaster for material REALWORLDTEXTURES/WALLS/STONEHEDGE, using default Can't find surfaceprop carpet for material HIGHRISE/SE1_CARPET_OFFICE_FLOOR_03, using default Can't find surfaceprop concrete for material REALWORLDTEXTURES2/CONCRETE/ASPHAULT_BLACKTOP_01, using default Can't find surfaceprop tile for material REALWORLDTEXTURES/FLOOR/FLOOR_1_18, using default Can't find surfaceprop concrete for material DE_NUKE/NUKE_WALLOFFICE_01, using default Can't find surfaceprop wood for material AGENCY/FLOOR/WOODPANEL01, using default Can't find surfaceprop plaster for material ENV/BRUSH/WALLS/WALL_TAN_DARKTRIM, using default Can't find surfaceprop Wood_Plank for material CUSTOMTEXT/GC TEXTURES/WOOD/WOOD_FNISHED01, using default Can't find surfaceprop plaster for material PLASTER/PLASTER_CEILING_04, using default Can't find surfaceprop plaster for material ENV/BRUSH/WALLS/WALL_TURQ_SWIRLY, using default Can't find surfaceprop plaster for material ENV/BRUSH/WALLS/WALL_SALMON_PLAIN_B, using default Can't find surfaceprop plaster for material ENV/BRUSH/WALLS/SECONDCLASS_SOFTWALLPLASTER, using default Can't find surfaceprop wood for material AJACKS/ART_WOODFLOOR, using default Can't find surfaceprop tile for material ENV/BRUSH/FLOORS/FLOOR_TILESJAILMAIN, using default Can't find surfaceprop tile for material TILE/TILE_MALL_FLOORTRIM00, using default Can't find surfaceprop tile for material REALWORLDTEXTURES/NEWER/3/TILE_3_01, using default Can't find surfaceprop tile for material DE_DUST/DUTILE1, using default Can't find surfaceprop brick for material BRICK/BRICK_EXT_08, using default material "nature/grassfloor002a" not found. Material not found!: NATURE/GRASSFLOOR002A Can't find surfaceprop Brick for material SGTSICKTEXTURES/SICKNESSROAD_01, using default material "tools/toolsskybox2d" not found. Material not found!: TOOLS/TOOLSSKYBOX2D Can't find surfaceprop dirt for material DE_TIDES/BLENDGRASSSTONEPATH, using default Can't find surfaceprop Brick for material ADDITIONALDEVTEXTURES/DEV_SURFACE_BLUE, using default Can't find surfaceprop brick for material BRICK/WALL20, using default Can't find surfaceprop plaster for material REALWORLDTEXTURES2/WALL/WALLPAPER_58, using default Can't find surfaceprop Brick for material ADDITIONALDEVTEXTURES/DEV_SURFACE_GREEN, using default Can't find surfaceprop plaster for material ENV/BRUSH/WALLS/WALL_CREAMSTRIPE, using default Can't find surfaceprop plastic for material REALWORLDTEXTURES/WALLS/WALL_1_14, using default Can't find surfaceprop metal for material METAL/DRTRIMC, using default Can't find surfaceprop wood_plank for material WOOD/MILROOF005, using default Can't find surfaceprop tile for material REALWORLDTEXTURES/FLOOR/FLOOR_13, using default Can't find surfaceprop plaster for material ENV/BRUSH/CEILINGS/BROOM_CEILING, using default Can't find surfaceprop tile for material ENV/BRUSH/WALLS/ENSUITE1CREAMTILETRIM, using default Can't find surfaceprop Wood_Plank for material ENV/BRUSH/FLOORS/PARQ_DIAMOND, using default Can't find surfaceprop wood for material WOOD/LIGHTHOUSE_WOODSIDING, using default Can't find surfaceprop concrete for material CONCRETE/CEILING03, using default Can't find surfaceprop wood for material REALWORLDTEXTURES/FLOOR/WOOD_FLOOR_6, using default Can't find surfaceprop Brick for material ADDITIONALDEVTEXTURES/DEV_SURFACE_CYAN, using default Can't find surfaceprop tile for material ENV/BRUSH/WALLS/ENSUITE1CREAMTILE, using default material "dev/dev_water2" not found. Material not found!: DEV/DEV_WATER2 Can't find surfaceprop carpet for material ENV/BRUSH/FLOORS/FLOOR_HURON_1ST, using default Can't find surfaceprop concrete for material OCRP/URBAN/SIDEWALK2, using default Can't find surfaceprop concrete for material FISH/GTAIVTEX/DC_RC_PATH_01, using default Can't find surfaceprop concrete for material FISH/GTAIVTEX/MC_PAVEMENT_PLAINCORNER01, using default Can't find surfaceprop Concrete for material CUSTOMDEV/DEV_MEASUREGENERIC01GREY100, using default Can't find surfaceprop metal for material METAL/METAL_DOOR_01, using default Can't find surfaceprop concrete for material AGENCY/CONCRETE/CONCRETEWALL06, using default Can't find surfaceprop plaster for material ENV/BRUSH/WALLS/WALL_CONNEM_3RD, using default Can't find surfaceprop plaster for material ENV/BRUSH/CEILINGS/CEIL_TEMP01, using default Can't find surfaceprop glass for material RP_MANHAT/GLASS/GLASS04, using default Can't find surfaceprop carpet for material AGENCY/CEILING/CEILINGTILE, using default Can't find surfaceprop metal for material REALWORLDTEXTURES/NEW/METAL2, using default material "concrete/concretewall001a" not found. Material not found!: CONCRETE/CONCRETEWALL001A Can't find surfaceprop metal for material OCRP/URBAN/GDOOR1, using default Can't find surfaceprop Wood_Panel for material ENV/BRUSH/WALLS/WALL_WOODPANELSPLAIN, using default Can't find surfaceprop plastic for material TILE/COUNTERTOP02, using default Can't find surfaceprop wood for material WOOD/CABINETS02, using default Can't find surfaceprop wood for material WOOD/CABINETS_SIDE01, using default Can't find surfaceprop wood for material WOOD/CABINETS01, using default Can't find surfaceprop rubber for material BUILDINGS/ASPH_SHINGLES01, using default Can't find surfaceprop concrete for material CONCRETE/BASE01, using default Can't find surfaceprop wood for material AJACKS/H_WHITEDOOR1, using default Can't find surfaceprop brick for material REALWORLDTEXTURES2/WALL/BRICK_WALL_43, using default Can't find surfaceprop brick for material /BRICK3, using default Can't find surfaceprop Wood for material REALWORLDTEXTURES/NEWER/1/WOOD_1_06, using default material "wood/woodwall037a" not found. Material not found!: WOOD/WOODWALL037A Can't find surfaceprop wood for material WOOD/FENCE03TOP, using default Can't find surfaceprop wood for material DE_CHATEAU/STAIRWOOD01, using default Can't find surfaceprop rock for material STONE/INFSTAIRSATP, using default Can't find surfaceprop stone for material STONE/STONE_EXT_05, using default Can't find surfaceprop wood for material REALWORLDTEXTURES2/WOOD/WOOD_87, using default Can't find surfaceprop wood for material DE_PIRANESI/WOODSTAIR02, using default Could not locate 'GameData' key in d:\program files (x86)\steam\steamapps\common\garrysmod\garrysmod\gameinfo.txt 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) Chop Details...done (0) Find Visible Detail Sides... Merged 342 detail faces...done (0) Merging details...done (0) FixTjuncs... PruneNodes... WriteBSP... done (0) writing e:\projets\mapping\rp_manhat\rp_manhat_dev1a.prt...Building visibility clusters... done (0) Finding displacement neighbors... Finding lightmap sample positions... Displacement Alpha : 0...1...2...3...4...5...6...7...8...9...10 Can't find surfaceprop concrete for material overlays/street_cover_10, using default Building Physics collision data... ** Executing... ** Command: "D:\Program Files (x86)\Steam\SteamApps\common\GarrysMod\bin\vvis.exe" ** Parameters: -game "D:\Program Files (x86)\Steam\SteamApps\common\GarrysMod\garrysmod" "e:\projets\mapping\test" Valve Software - vvis.exe (Dec 9 2014) 8 threads reading e:\projets\mapping\test.bsp reading e:\projets\mapping\test.prt 471 portalclusters 1054 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: 248 visible clusters (0.63%) Total clusters visible: 39159 Average clusters visible: 83 Building PAS... Average clusters audible: 203 visdatasize:30559 compressed from 60288 writing e:\projets\mapping\test.bsp 0 seconds elapsed ** Executing... ** Command: "D:\Program Files (x86)\Steam\SteamApps\common\GarrysMod\bin\vrad.exe" ** Parameters: -game "D:\Program Files (x86)\Steam\SteamApps\common\GarrysMod\garrysmod" "e:\projets\mapping\test" Valve Software - vrad.exe SSE (Dec 9 2014) Valve Radiosity Simulator 8 threads [Reading texlights from 'lights.rad'] [45 texlights parsed from 'lights.rad'] Loading e:\projets\mapping\test.bsp Error! Invalid VTX file checksum: -1411328667, expected -1660873626 "models/props/cs_militia/mailbox01.dx80.vtx" Setting up ray-trace acceleration structure... Done (1.39 seconds) 3418 faces 1826631 square feet [263034896.00 square inches] 192 Displacements 333859 Square Feet [48075812.00 Square Inches] 3418 patches before subdivision 39572 patches after subdivision ** Executing... ** Command: Copy File ** Parameters: "e:\projets\mapping\test.bsp" "D:\Program Files (x86)\Steam\SteamApps\common\GarrysMod\garrysmod\maps\test.bsp" [/CODE] All materials are not found. Someone can't help me thanks you!
Looks like it's just plain not mounting source in general.
I get the same issue when I replace GMod's VBSP. I never use GMod's version of Hammer, but I assume that the compiler needs to load materials differently from how it's done in the 2013 Source SDK. Not sure if this was always the case (I don't remember if I tested this with GMod's Hammer when I released it - shame on me). Anyway, I don't think I can fix it, since there's no source code available for GMod's compile tools. Robotboy might be willing to merge my changes, though. I would suggest using a different version of Hammer for now, although you'd probably have to copy over the models, materials and FGD.
Can you make a modified version of this with the entity limit removed? If so, I'd totally use this. Good job! EDIT: wait i think my modified vbsp already does this lol automatically without the cmd line
[QUOTE=Kemerd;49761201]Can you make a modified version of this with the entity limit removed? If so, I'd totally use this. Good job! EDIT: wait i think my modified vbsp already does this lol automatically without the cmd line[/QUOTE] Wouldn't that be... bad? Like, really bad? I'd think the actual source game would not like it very much either. Also, if that is indeed possible, then would it also be possible to remove the brush limit and not break?
Just curious, does your custom VBSP here: [url]https://facepunch.com/showthread.php?t=1413597[/url] Do the same thing? (the one with no limits)
Yeah, it's the same thing. I've asked a mod to merge the threads or to lock the old thread. [QUOTE=RonanZer0;50457338]Wouldn't that be... bad? Like, really bad? I'd think the actual source game would not like it very much either. Also, if that is indeed possible, then would it also be possible to remove the brush limit and not break?[/QUOTE] There's a version with increased limits in the thread linked above. It lets you compile maps with a higher brush count, but when you load the map in HL2 or GMod (other games too, presumably), it immediately crashes. It might still be useful for other things, though, like exceeding the detail prop or entity limits.
[QUOTE=03C0;50463312] or GMod[/QUOTE] hasn't a lot of limits in source been raised in the gmod code? or just model related stuff?
Sorry about the bump but I am wondering if there is any technical reason why props marked as physics only (not dynamic) cannot be used as prop_statics. This compiler only seems to deal with dynamic props.
[QUOTE=Slay33D;52333336]Sorry about the bump but I am wondering if there is any technical reason why props marked as physics only (not dynamic) cannot be used as prop_statics. This compiler only seems to deal with dynamic props.[/QUOTE] When the $staticprop parameter is used (which is what the 'static' checkbox in the model viewer indicates), it guarantees that the prop has no moving parts. The Valve wiki also vaguely mentions that it "performs several other complex optimisations". I presume that these things are necessary in order to make the prop suitable for prop_static. If I recall correctly, the engine will simply refuse to use the model otherwise, even if the compiler did allow it. Finding a more specific reason would require access to (and some digging through) the engine code. Sadly, there's a few models in HL2 that weren't compiled with the $staticprop parameter, even though they don't actually have moving parts. I guess the only option is to recompile them, or to simply use prop_physics or prop_dynamic instead.
I tried it both with and without the -allowdynamicpropsasstatic and while Physic models with $staticprop appears, no dynamic models (neither only Dynamic or Dynamic with static checkbox) appears in game. The compile log adress this correctly as they don't delete it. Curiously if I use Nicknine's version, they will appear but spazzed out (with distorted parts going into the map origin and stuff). Tested on a Source 2013 MP mod.
Sorry, you need to Log In to post a reply to this thread.