cubemaps killing frame rate

cubemaps killing frame rate

Re: cubemaps killing frame rate Posted by kingtoke on Thu May 12th 2005 at 9:51am
kingtoke
56 posts
Posted 2005-05-12 9:51am
kingtoke
member
56 posts 26 snarkmarks Registered: Nov 25th 2004 Location: uk
hey guys, i've made a fairly large CSS map, with alot of open space, one part of my map has a building in it with a medium sized hallway in it. i have a fairly good system, and my fps is capped at a constant 60fps. that is until i add cubemaps - set to default resoution, then in certain parts of the map the frame rate dies to 30. even in parts far away from the cube maps. but especially in the hallway, which uses a tile texture for the floor.

i've tried toying with them, redusing the ammount, breaking up the hall, adding more cubemaps to other areas of the map, but its still killing the fps
Re: cubemaps killing frame rate Posted by Addicted to Morphine on Thu May 12th 2005 at 2:43pm
Posted 2005-05-12 2:43pm
3012 posts 529 snarkmarks Registered: Feb 15th 2005
Sorry double post.
Re: cubemaps killing frame rate Posted by Addicted to Morphine on Thu May 12th 2005 at 2:43pm
Posted 2005-05-12 2:43pm
3012 posts 529 snarkmarks Registered: Feb 15th 2005
What are your quality settings?

I'm assuming you don't have any problems with the valve maps with the same settings?
Re: cubemaps killing frame rate Posted by DrGlass on Thu May 12th 2005 at 3:10pm
DrGlass
1825 posts
Posted 2005-05-12 3:10pm
DrGlass
member
1825 posts 632 snarkmarks Registered: Dec 12th 2004 Occupation: 2D/3D digital artist Location: USA
run through your map and turn on +showbudget, take screen shots in
problem areas. Then turn on +showtexturebudget (this is the on
the cube maps affect) and take screen shots of problems areas.
Post those screens along with your compile log here.
Re: cubemaps killing frame rate Posted by kingtoke on Thu May 12th 2005 at 7:58pm
kingtoke
56 posts
Posted 2005-05-12 7:58pm
kingtoke
member
56 posts 26 snarkmarks Registered: Nov 25th 2004 Location: uk
** Executing...
** Command: "c:\program files\valve\steam\steamapps\kingtoke\sourcesdk\bin\vbsp.exe"
** Parameters: -game "c:\program files\valve\steam\steamapps\kingtoke\counter-strike source\cstrike" "C:\Program Files\Valve\Steam\SteamApps\kingtoke\sourcesdk_content\cstrike\mapsrc\kt_Trainyard"

Valve Software - vbsp.exe (Jan 19 2005)
1 threads
materialPath: c:\program files\valve\steam\steamapps\kingtoke\counter-strike source\cstrike\materials
Loading C:\Program Files\Valve\Steam\SteamApps\kingtoke\sourcesdk_content\cstrike\mapsrc\kt_Trainyard.vmf
fixing up env_cubemap materials on brush sides...
Material glass/glasswindowbreak070b is depending on itself through materialvar $crackmaterial! Ignoring...
Material glass/glasswindowbreak070b is depending on itself through materialvar $crackmaterial! Ignoring...
Material glass/glasswindowbreak070b is depending on itself through materialvar $crackmaterial! Ignoring...
Material glass/glasswindowbreak070b is depending on itself through materialvar $crackmaterial! Ignoring...
Material glass/glasswindowbreak070b is depending on itself through materialvar $crackmaterial! Ignoring...
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 (1)
Processing areas...done (0)
Building Faces...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
done (0)
writing C:\Program Files\Valve\Steam\SteamApps\kingtoke\sourcesdk_content\cstrike\mapsrc\kt_Trainyard.prt...done (0)
Creating default cubemaps for env_cubemap using skybox sky_wasteland02...
Run buildcubemaps in the engine to get the correct cube maps.
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) (322540 bytes)
Emitting linux collision data (use -nolinuxdata to disable).
Building Physics collision data...
done (0) (788530 bytes)
Placing detail props : 0...1...2...3...4...5...6...7...8...9...10
Writing C:\Program Files\Valve\Steam\SteamApps\kingtoke\sourcesdk_content\cstrike\mapsrc\kt_Trainyard.bsp
6 seconds elapsed
-0.515297 0.045585 0.000000
-0.209598 0.045585 0.000000
0.165600 0.031336 0.000000
0.165600 0.045585 0.000000
make_triangles:calc_triangle_representation: Cannot convert
Memory leak: mempool blocks left in memory: 48
Memory leak: mempool blocks left in memory: 4

** Executing...
** Command: "c:\program files\valve\steam\steamapps\kingtoke\sourcesdk\bin\vvis.exe"
** Parameters: -game "c:\program files\valve\steam\steamapps\kingtoke\counter-strike source\cstrike" -fast "C:\Program Files\Valve\Steam\SteamApps\kingtoke\sourcesdk_content\cstrike\mapsrc\kt_Trainyard"

Valve Software - vvis.exe (Dec 15 2004)
fastvis = true
1 threads
reading c:\program files\valve\steam\steamapps\kingtoke\sourcesdk_content\cstrike\mapsrc\kt_Trainyard.bsp
reading c:\program files\valve\steam\steamapps\kingtoke\sourcesdk_content\cstrike\mapsrc\kt_Trainyard.prt
944 portalclusters
3165 numportals
BasePortalVis: 0...1...2...3...4...5...6...7...8...9...10 (7)
Optimized: 34476 visible clusters (0.00%)
Total clusters visible: 775774
Average clusters visible: 821
Building PAS...
Average clusters audible: 916
visdatasize:228848 compressed from 226560
writing c:\program files\valve\steam\steamapps\kingtoke\sourcesdk_content\cstrike\mapsrc\kt_Trainyard.bsp
7 seconds elapsed

** Executing...
** Command: "c:\program files\valve\steam\steamapps\kingtoke\sourcesdk\bin\vrad.exe"
** Parameters: -game "c:\program files\valve\steam\steamapps\kingtoke\counter-strike source\cstrike" -noextra "C:\Program Files\Valve\Steam\SteamApps\kingtoke\sourcesdk_content\cstrike\mapsrc\kt_Trainyard"

Valve Software - vrad.exe (Mar 8 2005)
----- Radiosity Simulator ----
1 threads
[Reading texlights from 'lights.rad']
[1 texlights parsed from 'lights.rad']

Loading c:\program files\valve\steam\steamapps\kingtoke\sourcesdk_content\cstrike\mapsrc\kt_Trainyard.bsp
2724 faces
1 degenerate faces
856392 square feet [123320552.00 square inches]
6 displacements
645 square feet [92946.23 square inches]
2723 patches before subdivision
52953 patches after subdivision
12 direct lights
BuildFacelights: 0...1...2...3...4...5...6...7...8...9...10 (144)
BuildVisLeafs: 0...1...2...3...4...5...6...7...8...9...10 (156)
transfers 1520874, max 304
transfer lists: 11.6 megs
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #1 added RGB(39221, 32361, 23852)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #2 added RGB(3954, 3233, 2121)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #3 added RGB(600, 502, 291)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #4 added RGB(114, 98, 50)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #5 added RGB(24, 21, 9)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #6 added RGB(5, 5, 2)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #7 added RGB(1, 1, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #8 added RGB(0, 0, 0)
Build Patch/Sample Hash Table(s).....Done<0.0744 sec>
FinalLightFace: 0...1...2...3...4...5...6...7...8...9...10 (2)
FinalLightFace Done
Ready to Finish
0 of 0 (0% of) surface lights went in leaf ambient cubes.
ComputePerLeafAmbientLighting: 0...1...2...3...4...5...6...7...8...9...10

Object names Objects/Maxobjs Memory / Maxmem Fullness
------------ --------------- --------------- --------
models 17/1024 816/49152 ( 1.7%)
brushes 342/8192 4104/98304 ( 4.2%)
brushsides 2148/65536 17184/524288 ( 3.3%)
planes 1210/65536 24200/1310720 ( 1.8%)
vertexes 5396/65536 64752/786432 ( 8.2%)
nodes 1733/65536 55456/2097152 ( 2.6%)
texinfos 449/12288 32328/884736 ( 3.7%)
texdata 63/2048 2016/65536 ( 3.1%)
dispinfos 6/0 1056/0 ( 0.0%)
disp_verts 1734/0 34680/0 ( 0.0%)
disp_tris 3072/0 6144/0 ( 0.0%)
disp_lmsamples 2815/0 2815/0 ( 0.0%)
faces 2724/65536 152544/3670016 ( 4.2%)
origfaces 1018/65536 57008/3670016 ( 1.6%)
leaves 1751/65536 98056/3670016 ( 2.7%)
leaffaces 3459/65536 6918/131072 ( 5.3%)
leafbrushes 1031/65536 2062/131072 ( 1.6%)
surfedges 16739/512000 66956/2048000 ( 3.3%)
edges 9202/256000 36808/1024000 ( 3.6%)
worldlights 12/8192 1056/720896 ( 0.1%)
waterstrips 296/32768 2960/327680 ( 0.9%)
waterverts 0/65536 0/786432 ( 0.0%)
waterindices 4095/65536 8190/131072 ( 6.2%)
cubemapsamples 5/1024 80/16384 ( 0.5%)
overlays 0/512 0/180224 ( 0.0%)
lightdata [variable] 2391096/0 ( 0.0%)
visdata [variable] 228848/16777216 ( 1.4%)
entdata [variable] 25652/393216 ( 6.5%)
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/14286 ( 0.0%)
pakfile [variable] 67629/0 ( 0.0%)

Win32 Specific Data:
physics [variable] 322540/4194304 ( 7.7%)

Total Win32 BSP file data space used: 3713956 bytes

Linux Specific Data:
physicssurface [variable] 788530/6291456 (12.5%)

Total Linux BSP file data space used: 4179946 bytes

Total triangle count: 7222
Writing c:\program files\valve\steam\steamapps\kingtoke\sourcesdk_content\cstrike\mapsrc\kt_Trainyard.bsp
5 minutes, 5 seconds elapsed

** Executing...
** Command: Copy File
** Parameters: "C:\Program Files\Valve\Steam\SteamApps\kingtoke\sourcesdk_content\cstrike\mapsrc\kt_Trainyard.bsp" "c:\program files\valve\steam\steamapps\kingtoke\counter-strike source\cstrike\maps\kt_Trainyard.bsp"

** Executing...
** Command: "c:\program files\valve\steam\steamapps\kingtoke\counter-strike source\hl2.exe"
** Parameters: -game "c:\program files\valve\steam\steamapps\kingtoke\counter-strike source\cstrike" +map "kt_Trainyard"

____________________________________________________________

http://homepage.ntlworld.com/simon_elliott3/Images/kt_trainyard0014.jpg

http://homepage.ntlworld.com/simon_elliott3/Images/kt_trainyard0017.jpg

http://homepage.ntlworld.com/simon_elliott3/Images/kt_trainyard0019.jpg

http://homepage.ntlworld.com/simon_elliott3/Images/kt_trainyard0020.jpg

_____________________________________________________________

Game .dll loaded for "Counter-Strike: Source"
maxplayers set to 32
Heap: 64.00 Mb
DS:quad speaker configuration detected
3d surround sound initialization successful
Parsed 356 text messages
execing config.cfg
Can't use cheat cvars in multiplayer, unless the server has sv_cheats set to 1.
Can't use cheat cvars in multiplayer, unless the server has sv_cheats set to 1.
1 CPU, Frequency: 2.2 Ghz, Features: AuthenticAMD SSE MMX 3DNow RDTSC CMOV FCMOV
execing valve.rc
--- Missing Vgui material vgui/steam/games/icon_
Re: cubemaps killing frame rate Posted by Addicted to Morphine on Thu May 12th 2005 at 8:07pm
Posted 2005-05-12 8:07pm
3012 posts 529 snarkmarks Registered: Feb 15th 2005
Are the cubemaps placed 56 units above the ground (which is roughly
player height in CS:S)? Did you run buildcubemaps upon entering
the game and then reload the map?
Re: cubemaps killing frame rate Posted by kingtoke on Thu May 12th 2005 at 8:08pm
kingtoke
56 posts
Posted 2005-05-12 8:08pm
kingtoke
member
56 posts 26 snarkmarks Registered: Nov 25th 2004 Location: uk
cubemaps are placed roughly player height.. and yes i did reload the map

one thing you do notice though is the light fades or glows as you move around that room - the lights are just light entities at the moment and they are set to default settings, with the exception of brightness which is set to 400
Re: cubemaps killing frame rate Posted by DrGlass on Thu May 12th 2005 at 8:51pm
DrGlass
1825 posts
Posted 2005-05-12 8:51pm
DrGlass
member
1825 posts 632 snarkmarks Registered: Dec 12th 2004 Occupation: 2D/3D digital artist Location: USA
I'm going to guess its the swap buffer.

Any think that is transparent, or has alpha maps will stress you swap
buffer. How much glass/partical things do you have in your map?

that may be the problem.

There are also these errors in your compile log:

<br style="color: red;">
make_triangles:calc_triangle_representation: Cannot convert

and

Material glass/glasswindowbreak070b is depending on itself through materialvar $crackmaterial! Ignoring...

I dont know about the triangle thing.

but the material glass, i think, is a func_breakable_surf that doesn't
use the right texture. That could add to the problem.
Re: cubemaps killing frame rate Posted by Leperous on Thu May 12th 2005 at 9:49pm
Leperous
3382 posts
Posted 2005-05-12 9:49pm
Leperous
Creator of SnarkPit!
member
3382 posts 1635 snarkmarks Registered: Aug 21st 2001 Occupation: Lazy student Location: UK
Swap buffers can be an utter bastard, and I haven't found a way to sort them out other than to use 'cheap' cubemap-less textures (there are some with a _cheap label- if not, make one yourself with a quick .VMT file with just $basetexture and $surfaceprop defined in it).
Re: cubemaps killing frame rate Posted by keved on Fri May 13th 2005 at 10:04am
keved
252 posts
Posted 2005-05-13 10:04am
keved
member
252 posts 515 snarkmarks Registered: Jan 21st 2005 Occupation: Games designer, Rockstar Leeds Location: Leeds, UK
<DIV class=quote>
<DIV class=quotetitle>? quoting Leperous</DIV>
<DIV class=quotetext>Swap buffers can be an utter bastard, and I haven't found a way to sort them out other than to use 'cheap' cubemap-less textures (there are some with a _cheap label- if not, make one yourself with a quick .VMT file with just $basetexture and $surfaceprop defined in it).</DIV></DIV>

Yeah, totally. As is clear in the +showbudget pics kingtoke posted, swap buffers are clearly what is dragging fps right down.

Kingtoke you've got to make a decision on whether you want to keep the current materials which are swap buffer heavy and accept fps will be reduced, or as the guys suggest use/create cheaper materials which don't all use cubemaps. If you opt for the latter, clearly it won't look as good visually but you can try to think of ways so it's not as noticeable that 'cheap' materials are being used. Here are a few examples...

I'm doing a Combine-themed CTF level and have had to use 'cheap' materials on the entire exterior walls...but it doesn't matter too much because I've lit most of the exterior so that the displacement terrain ground is well lit whereas the fortresses' wall brush faces (which have a cheaper cubemap-less material) are receiving very little light anyway.

http://www.keved.com/promo_ctf_thegreatwall1.jpg

http://www.keved.com/promo_ctf_thegreatwall2.jpg

Another example below...as can be seen in the bottom right on the pic, I'm using the expensive cubemap version of the material here. However, the lighting above is dark so the brush faces above are all using the cheap version of the material. Also, the blue strip running down the corridor is using cubemaps but this isn't a problem because the rest of the floor isn't.

http://www.keved.com/promo_ctf_thegreatwall3.jpg

Basically, if you want to use cubemaps you can't simply texture big wall and floor expanses (particularly in the same room) with expensive cubemap materials. You've got to think about dividing walls/floor such that cubemap-heavy materials are only used on smaller & more isolated (from each other) faces, using cheaper versions of the materials on brush face walls which are well above head height, as so on.

<DIV class=quote>
<DIV class=quotetitle>? quoting DrGlass</DIV>
<DIV class=quotetext>Any think that is transparent .. will stress you swap buffer.</DIV></DIV>

Yeah, this is also the case. In the same CTF level I have very tall (512 units) Combine forcefields which use a glass material. I created a new vmt so it doesn't use cubemaps, but due to it being transparent, framerate is still being hammered when in front of the forcefields.
Re: cubemaps killing frame rate Posted by kingtoke on Fri May 13th 2005 at 10:41am
kingtoke
56 posts
Posted 2005-05-13 10:41am
kingtoke
member
56 posts 26 snarkmarks Registered: Nov 25th 2004 Location: uk
yeah cheers guys, it seems to be the "toilet tile" wall texture im using.. i changed it and the problems vastly reduced.

Material glass/glasswindowbreak070b is depending on itself through materialvar $crackmaterial! Ignoring...

seems to be when the cubemap hits the nodraw side of a window, as the textures are correct and working fine