Mapham Posted July 22, 2013 Report Posted July 22, 2013 (edited) I have this weird fps problem with my map. In certain spots, if I move (not looking around), fps drops very noticeably. I have no clue where to start searching for the problem. Another weird thing is, that if I put budget panel on, the fps jumps to normal levels, also if i turn vsync off it solves the problem. But I will not play without vsync because without it, the image gets scattered while moving. Another reason is that changing my game options does not solve the problem itself. Budget panel shows that something called Swan butters takes alot of resources constantly. Also toggling wireframe shows me the entire map, I am not sure is that what should happen with wireframe option. The most weird thing is, that those fps drops do not happen when I am looking at large areas, it seems very random also. I have tried removing lights from the areas where this problem occurs but it does not help. My lightmap scale is 16, tried higher numbers but it did not help. I have used func_detail as much as I can. Nodraw texture everywhere players cant see, also does not help. I tried to build hint/skip brushes but the problem is not here either, because the fps drop happens regardless of removing stuff from being drawn. Also, the spot where fps starts to drop, has no fps issues at all while looking at opposite direction. Also the places where this fps drop happens do not have anything special or anything that is not there where fps is normal. Edited July 22, 2013 by Mapham Quote
JeanPaul Posted July 22, 2013 Report Posted July 22, 2013 Its hard to give any advice with this little information. Show some pictures and possibly even the map. Also, its not swan buffers, its swap buffers: Swap buffers A lot of time in Swap Buffers is usually a fillrate problem. Be sure to run full screen and at a lower resolution to test. You can also use mat_viewportscale to test if you are fillrate limited; watch for performance shooting up as the value decreases. Here are some useful bindings for changing mat_viewportscale using the "[" and "]" keys: bind "[" "incrementvar mat_viewportscale .1 1 -.1" bind "]" "incrementvar mat_viewportscale .1 1 .1" High fillrate can be caused by a number of things, but it's usually expensive materials that cover large amounts of screen space. Expensive materials include: Water, especially water that overlaps over or under other expensive materials. Fire, smoke or steam effects. Glass or other transparent textures, especially with refraction. Bump, normal-mapped, or specular (reflective) materials. Any other material with complicated shader effects. To solve fillrate problems, reduce the number of expensive materials in the scene by simplifying the materials themselves or reducing their number by removing geometry. Commands: mat_bumpmap 0/1 mat_specular 0/1 https://developer.valvesoftware.com/wiki/Showbudget Also http://i.imgur.com/nKuTgi9.jpg Quote
Mapham Posted July 22, 2013 Author Report Posted July 22, 2013 (edited) I would give the editor file of the whole map, but I have custom textures and models so it would not work as intended for others. What kind of screenshots you require? Im not sure how it would help to show you some corner of the map where nothing is really showed. I did not understand that fillrate thing, what exactly i need to do to decrease that power eating? Here is the compile information: ------------------------------------------------------------------------------- Running command: cd "E:SteamfolderisteamappscommonCounter-Strike Global Offe nsivebin" ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Running command: "E:SteamfolderisteamappscommonCounter-Strike Global Offensi vebinvbsp.exe" -game "E:SteamfolderisteamappscommonCounter-Strike Global O ffensivecsgo" "C:UsersHeopcDesktopde_saunahotelli.vmf" ------------------------------------------------------------------------------- Valve Software - vbsp.exe (May 20 2013) 4 threads materialPath: E:SteamfolderisteamappscommonCounter-Strike Global Offensivec sgomaterials Loading C:UsersHeopcDesktopde_saunahotelli.vmf Map revision 424 ConVarRef gpu_level doesn't point to an existing ConVar ***need to set $abovewater for material dev/dev_water2_cheap ***need to set $abovewater for material dev/dev_water2_cheap 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 204 detail faces...done (0) Merging details...done (0) FixTjuncs... PruneNodes... WriteBSP... NODRAW on terrain surface! NODRAW on terrain surface! NODRAW on terrain surface! NODRAW on terrain surface! NODRAW on terrain surface! NODRAW on terrain surface! NODRAW on terrain surface! NODRAW on terrain surface! NODRAW on terrain surface! NODRAW on terrain surface! NODRAW on terrain surface! NODRAW on terrain surface! NODRAW on terrain surface! NODRAW on terrain surface! NODRAW on terrain surface! NODRAW on terrain surface! NODRAW on terrain surface! NODRAW on terrain surface! done (0) writing C:UsersHeopcDesktopde_saunahotelli.prt...Building visibility cluster s... done (0) Finding displacement neighbors... Found a displacement edge abutting multiple other edges. Warning: overflowed 4 displacement corner-neighbor lists.Finding lightmap sample positions... Displacement Alpha : 0...1...2...3...4...5...6...7...8...9...10 Building Physics collision data... done (0) (147228 bytes) Placing detail props : 0...1...2...3...4...5...6...7...8...9...10 Water found with no water_lod_control entity, creating a default one. Compacting texture/material tables... Reduced 661 texinfos to 374 Reduced 50 texdatas to 41 (1544 bytes to 1137) Writing C:UsersHeopcDesktopde_saunahotelli.bsp 0 seconds elapsed Reference Count for Material ___error (1) != 0 ------------------------------------------------------------------------------- Running command: cd "E:SteamfolderisteamappscommonCounter-Strike Global Offe nsivebin" ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Running command: "E:SteamfolderisteamappscommonCounter-Strike Global Offensi vebinvvis.exe" -game "E:SteamfolderisteamappscommonCounter-Strike Global O ffensivecsgo" "C:UsersHeopcDesktopde_saunahotelli" ------------------------------------------------------------------------------- Valve Software - vvis.exe (May 20 2013) 4 threads reading c:usersheopcdesktopde_saunahotelli.bsp reading c:usersheopcdesktopde_saunahotelli.prt 149 portalclusters 354 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: 76 visible clusters (0.00%) Total clusters visible: 9795 Average clusters visible: 65 Building PAS... Average clusters audible: 141 visdatasize:6635 compressed from 7152 writing c:usersheopcdesktopde_saunahotelli.bsp 0 seconds elapsed ------------------------------------------------------------------------------- Running command: cd "E:SteamfolderisteamappscommonCounter-Strike Global Offe nsivebin" ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Running command: "E:SteamfolderisteamappscommonCounter-Strike Global Offensi vebinvrad.exe" -game "E:SteamfolderisteamappscommonCounter-Strike Global Offensivecsgo" "C:UsersHeopcDesktopde_saunahotelli" ------------------------------------------------------------------------------- Valve Software - vrad.exe SSE (May 20 2013) Valve Radiosity Simulator 4 threads [Reading texlights from 'lights.rad'] [2 texlights parsed from 'lights.rad'] Loading c:usersheopcdesktopde_saunahotelli.bsp Setting up ray-trace acceleration structure... Done (0.78 seconds) 1537 faces 181073 square feet [26074624.00 square inches] 54 Displacements 107319 Square Feet [15454006.00 Square Inches] 1537 patches before subdivision 25761 patches after subdivision 21 direct lights BuildFacelights: 0...1...2...3...4...5...6...7...8...9...10 (14) BuildVisLeafs: 0...1...2...3...4...5...6...7...8...9...10 (2) transfers 2038765, max 413 transfer lists: 15.6 megs GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0) Bounce #1 added RGB(28988, 15874, 7310) GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0) Bounce #2 added RGB(8158, 2826, 717) GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0) Bounce #3 added RGB(2545, 605, 111) GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0) Bounce #4 added RGB(831, 144, 19) GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0) Bounce #5 added RGB(290, 38, 4) GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0) Bounce #6 added RGB(106, 11, 1) GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0) Bounce #7 added RGB(41, 3, 0) GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0) Bounce #8 added RGB(16, 1, 0) GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0) Bounce #9 added RGB(7, 0, 0) GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0) Bounce #10 added RGB(3, 0, 0) GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0) Bounce #11 added RGB(1, 0, 0) GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0) Bounce #12 added RGB(1, 0, 0) Build Patch/Sample Hash Table(s).....Done<0.0135 sec> FinalLightFace: 0...1...2...3...4...5...6...7...8...9...10 (1) 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 (1) Writing leaf ambient...done Ready to Finish Object names Objects/Maxobjs Memory / Maxmem Fullness ------------ --------------- --------------- -------- models 17/1024 816/49152 ( 1.7%) brushes 401/8192 4812/98304 ( 4.9%) brushsides 2795/65536 22360/524288 ( 4.3%) planes 1544/65536 30880/1310720 ( 2.4%) vertexes 2818/65536 33816/786432 ( 4.3%) nodes 497/65536 15904/2097152 ( 0.8%) texinfos 374/12288 26928/884736 ( 3.0%) texdata 41/2048 1312/65536 ( 2.0%) dispinfos 54/0 9504/0 ( 0.0%) disp_verts 1350/0 27000/0 ( 0.0%) disp_tris 1728/0 3456/0 ( 0.0%) disp_multiblend 0/0 0/0 ( 0.0%) disp_lmsamples 241656/0 241656/0 ( 0.0%) faces 1537/65536 86072/3670016 ( 2.3%) hdr faces 0/65536 0/3670016 ( 0.0%) origfaces 1214/65536 67984/3670016 ( 1.9%) facebrushes 226/0 452/0 ( 0.0%) facebrushlists 1537/0 6148/0 ( 0.0%) leaves 515/65536 16480/2097152 ( 0.8%) leaffaces 1876/65536 3752/131072 ( 2.9%) leafbrushes 690/65536 1380/131072 ( 1.1%) areas 2/256 16/2048 ( 0.8%) surfedges 12638/512000 50552/2048000 ( 2.5%) edges 7940/256000 31760/1024000 ( 3.1%) LDR worldlights 21/8192 2100/819200 ( 0.3%) HDR worldlights 0/8192 0/819200 ( 0.0%) leafwaterdata 1/32768 12/393216 ( 0.0%) waterstrips 283/32768 2830/327680 ( 0.9%) waterverts 0/65536 0/786432 ( 0.0%) waterindices 4731/65536 9462/131072 ( 7.2%) cubemapsamples 0/1024 0/16384 ( 0.0%) overlays 0/512 0/180224 ( 0.0%) LDR lightdata [variable] 1542770/0 ( 0.0%) HDR lightdata [variable] 0/0 ( 0.0%) visdata [variable] 6635/16777216 ( 0.0%) entdata [variable] 19856/393216 ( 5.0%) LDR ambient table 515/65536 2060/262144 ( 0.8%) HDR ambient table 515/65536 2060/262144 ( 0.8%) LDR leaf ambient 1635/65536 45780/1835008 ( 2.5%) HDR leaf ambient 515/65536 14420/1835008 ( 0.8%) 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/8650 ( 0.0%) pakfile [variable] 150614/0 ( 0.0%) physics [variable] 147228/4194304 ( 3.5%) physics terrain [variable] 3340/1048576 ( 0.3%) Level flags = 4 Total triangle count: 4692 Writing c:usersheopcdesktopde_saunahotelli.bsp 18 seconds elapsed ------------------------------------------------------------------------------- Running command: copy "C:UsersHeopcDesktopde_saunahotelli.bsp" "E:Steamfold eristeamappscommonCounter-Strike Global Offensivecsgomapsde_saunahotelli.b sp" ------------------------------------------------------------------------------- Finished. Press a key to close. Edited July 22, 2013 by Mapham Quote
Squad Posted July 22, 2013 Report Posted July 22, 2013 Providing the .vmf file would help though, even without custom assets. But only if you want to give it out. Or otherwise the .bsp file, but it's not easy to help if we can't see how the map is build Quote
JeanPaul Posted July 22, 2013 Report Posted July 22, 2013 Im pretty sure "NODRAW on terrain surface!" causes the map to fail compiling entirely, I have no idea how you got what you did. Make sure none of your displacements use the nodraw texture then compile it again. Quote
cincinnati Posted July 22, 2013 Report Posted July 22, 2013 maps with nodraw terrain don't cause compile issues. only bright yellow displacements that, of course, should still be fixed. Quote
Mapham Posted July 23, 2013 Author Report Posted July 23, 2013 (edited) I have all floors as displacements because i heard its cheaper than normal brush, and no drawed them all. But i do have normal brush under the displacement floor. But if it fails the compile process, why am i able to play the map? Edited July 23, 2013 by Mapham Quote
cincinnati Posted July 23, 2013 Report Posted July 23, 2013 the nodraws are little more than a cosmetic issue (plus whatever is eaten by drawing those extra faces). if you have nodraw on a displacement and it's not something you see in the map, then you should probably just get rid of those faces by destroying the displacements...and then creating them again with only the needed faces selected. Quote
Mapham Posted July 23, 2013 Author Report Posted July 23, 2013 Here is the vmf file of the map http://s000.tinyupload.com/index.php?file_id=01442667125704524898 Quote
Spherix Posted July 23, 2013 Report Posted July 23, 2013 (edited) Took a quick look, and whilst I could go on and on explaining all the things I found, it all comes down to very poor optimalisation of the map as far as I can tell; Read up on things like https://developer.valvesoftware.com/wiki/Optimization_%28level_design%29 http://rvanhoorn.ruhosting.nl/optimization.php?chapter=intro http://www.nodraw.net/2009/12/optimization-in-source-a-practical-demonstration/ https://developer.valvesoftware.com/wiki/Visibility_optimization (all of them) etc. Also, displacements are nót cheaper when it comes down to a flat surface. Edited July 23, 2013 by Spherix Quote
Mapham Posted July 23, 2013 Author Report Posted July 23, 2013 (edited) I have read and watched many tutorials about optimization but I cannot figure out what I can do to fix this map. Also, blocking window and doors from the first and second room (in attempts to prevent engine from rendering the rest of the map) did not help at all, the fps at the entrace to the "restraurant" section still had issues. There are other spots too where fps starts to decline but I tried to start from somewhere to find out where those problems are. What exactly are the main issues with that map? Edited July 23, 2013 by Mapham Quote
Spherix Posted July 24, 2013 Report Posted July 24, 2013 I'd start with reverting those displacements; use regular brushes if the surface is flat. Furthermore, apply the nodraw texture to every non-visible surface. That includes the sides/back of planes used for skybox etc. Only the visible side has to be skybox. I see quite a lot of ad01 textures being applied on places where the player couldn't see, I'd still say: nodraw it. Best thing is perhaps to nodraw the entire map after you're done removing the displacements where they are not needed and then texture per surface, not object. I'm not at a pc with Hammer at the moment, but there's more than one way to prevent the engine from rendering the next room aside from placing an actual visual door. Quote
Mapham Posted July 24, 2013 Author Report Posted July 24, 2013 Well i have pretty much everything nodrawed that player cant see during the game. Unless someone enlightens me how to hint brush this exact map, this fps issue remains a mystery and only solution I could come up with, was to toggle vsync off. I have tried various different ways to make this map work properly with hint brushes but none of those have had any effect framerate. Quote
Squad Posted July 24, 2013 Report Posted July 24, 2013 I found quite some things that aren't properly build. The biggest is the displacements you used as floors and ceilings. Displacements don't block VIS, so the engine is probably drawing most of the map at any given location. In this picture I unchecked everything that doesn't block VIS (props, brush entities, displacements, func_detail) leaving only regular brushes visible. It gives you a good idea of what the engine "sees". There is a gap at the bottom of your walls (you made the floor a displacement), so that needs optimization. Here are a few things that should be func_detailed (highlighting in red). You should seal of the map with skybox texture better, not leaving a gap between the outside wall and the skybox. Also nodraw the non-visible side of the wall. Also, your brushwork is rather sloppy in some places (making for unnecessary cuts in VIS). It might be a good idea to have a look at how official maps are build. Thrik 1 Quote
Mapham Posted July 25, 2013 Author Report Posted July 25, 2013 I replaced all floors with normal brushes and plugged skybox against the wall. Didnt seem to fix the fps. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.