Heya, I am really new to the Q3 code base and trying to find my way around where things are stored and what sort of limits exist with the default Q3 base (1.32b). I am trying to understand what exactly makes up a BSP file and what sort of limits exist before I hopefully hit them. I found the following in the file qfiles.h:
// there shouldn't be any problem with increasing these values at the
// expense of more memory allocation in the utilities
#define MAX_MAP_MODELS 0x400
#define MAX_MAP_BRUSHES 0x8000
#define MAX_MAP_ENTITIES 0x800
#define MAX_MAP_ENTSTRING 0x40000
#define MAX_MAP_SHADERS 0x400
#define MAX_MAP_AREAS 0x100 // MAX_MAP_AREA_BYTES in q_shared must match!
#define MAX_MAP_FOGS 0x100
#define MAX_MAP_PLANES 0x20000
#define MAX_MAP_NODES 0x20000
#define MAX_MAP_BRUSHSIDES 0x20000
#define MAX_MAP_LEAFS 0x20000
#define MAX_MAP_LEAFFACES 0x20000
#define MAX_MAP_LEAFBRUSHES 0x40000
#define MAX_MAP_PORTALS 0x20000
#define MAX_MAP_LIGHTING 0x800000
#define MAX_MAP_LIGHTGRID 0x800000
#define MAX_MAP_VISIBILITY 0x200000
#define MAX_MAP_DRAW_SURFS 0x20000
#define MAX_MAP_DRAW_VERTS 0x80000
#define MAX_MAP_DRAW_INDEXES 0x80000
I have a really large BSP file (@30Mb) and I still want to add more to it but I have no idea if I am close to any of the above limits because I don't have information or tools to tell me what I have in my BSP file. I assumed (read somewhere) that the actual Q3 BSP file size was limited to 30Mb but this is not true because I compiled a BSP last night is was 30.3Mb and it runs fine.
My question is: How can I find out how close I am to the above limits? Does anyone know of a tool that can audit or tell me the contents / size of my BSP file?
Well he was evil, but he did build alot of roads. - Gogglor
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
Those are hex values so you could just use something like the windows calculator to convert them. And I think q3map2 outputs the totals while it runs doesn't it? Maybe the -v flag would show you.
// there shouldn't be any problem with increasing these values at the
// expense of more memory allocation in the utilities
#define MAX_MAP_MODELS 0x400 // 1024
#define MAX_MAP_BRUSHES 0x8000 // 32768
#define MAX_MAP_ENTITIES 0x800 // 2048
#define MAX_MAP_ENTSTRING 0x40000 // 262144
#define MAX_MAP_SHADERS 0x400 // 1024
#define MAX_MAP_AREAS 0x100 // MAX_MAP_AREA_BYTES in q_shared must match!
#define MAX_MAP_FOGS 0x100 // 256
#define MAX_MAP_PLANES 0x20000 // 131072
#define MAX_MAP_NODES 0x20000 // 131072
#define MAX_MAP_BRUSHSIDES 0x20000 // 131072
#define MAX_MAP_LEAFS 0x20000 // 131072
#define MAX_MAP_LEAFFACES 0x20000 // 131072
#define MAX_MAP_LEAFBRUSHES 0x40000 // 262144
#define MAX_MAP_PORTALS 0x20000 // 131072
#define MAX_MAP_LIGHTING 0x800000 // 8388608
#define MAX_MAP_LIGHTGRID 0x800000 // 8388608
#define MAX_MAP_VISIBILITY 0x200000 // 2097152
#define MAX_MAP_DRAW_SURFS 0x20000 // 131072
#define MAX_MAP_DRAW_VERTS 0x80000 // 524288
#define MAX_MAP_DRAW_INDEXES 0x80000 // 524288
I did check the /verbose option for the q3map2 compiler and it produces a mountain of stuff to look through. I was hoping that someone had created a simple utility to check the stats of a BSP against the q3 engine limits. Part of the problem with the /v option is that the terminalogy is different between the list above and the additional complier output. For example metasurfaces and luxels?
I checked the q3 source and it says the BSP is split into 17 lumps with some of them linked to the above code limits, are there no totals in the BSP file to say how much is in each lump section? Maybe to compare to the above list?
Well he was evil, but he did build alot of roads. - Gogglor
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
Well he was evil, but he did build alot of roads. - Gogglor
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
192 lightmaps... stock Q3 crashes after 256 lightmaps, ioquake3 hard-limits it (patch by yours truly; I didn't expect anyone to even get remotely close to that limit).
The competition version of the map loads with surfaces missing in IOquake which I posted about on the IOQ3 forums and sadly no one replied. You submitting a patch to limit the lightmaps sort of answers my question I posted on the forums. Strangely enough the above map works fine with Q3 pointrelease 1.16n and 1.32b, so I am not sure how it can crash with excessive lightmaps.
Well he was evil, but he did build alot of roads. - Gogglor
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
As soon as you start crossing that 256 limit, the engine begins overwriting internal buffers. This might or might not result in a crash (it's non-deterministic) but it is always a Bad Thing.