View Full Version : What makes small file sizes?
Loffy
20th October 2003, 13:47
Hi!
When you map, you want to keep finished file size to a minimum. Noone likes to download huge files.
What will determine final file size (Enemy Territory)? Im not talking about custom sounds and textures, but level design, brush work and compiling. Is it as simple and uncomplicated as this: more brush work = larger file, and a larger number of leaf nodes = a larger file ? Or is it more complicated that that?
I guess what I am asking is: Is there something that I can do, when I start a new ET map project and work on this project, to keep file size to a minimum?
// Loffy
fraco
20th October 2003, 15:08
hehe,
nothing is that straightforward. Obviously Ydnar can answer this best, but I'll give it a try, so he doesn't have to answer all the questions.
.bsp size = mainly determined by: (in order of importance)
* number of lightmaps: (ab)using _lightmapscale, texturing unseen faces that end up being lit (e.g. because they are only hidden by detail brushes)
* bad vis: if you have too little (or none at all) detail brushes (actually, to many leaf nodes), the vis data will be large
* misc_model: i believe misc_model models are directly included in the bsp, if you have a lot of those -> maybe expensive
what you can do: only texture stuff that can be seen, consider using vertex lighting where it doesn't matter, avoid using _lightmapscale when not needed, ask yourself if you really need lightmapped terrain. Make sure your vis is efficient.
fraco
chavo_one
20th October 2003, 15:36
ET uses external lightmaps, so you don't have to worry about them in your bsp, Loffy.
ydnar
20th October 2003, 15:37
Actually, lightmaps aren't the biggest contributor to BSP size.
It's the surface & vertex counts.
Lots of tiny brush faces (or just lots of complex brushwork in general) will blow out the BSP size.
Try Q3Map2 -info sometime on a BSP. It will show you exactly what's taking up the space.
y
Loffy
20th October 2003, 23:02
Thank you for your replies!
// L.
fraco
28th October 2003, 07:34
that info switch is interesting. I believe it tells me that lightmaps are the biggest contributors in my map. Should i be worried???
Abstracted BSP file components (*actual sizes may differ)
35 models 1400
228 shaders 16416
12811 brushes 153732
133768 brushsides 1605216 *
0 fogs 0
89180 planes 1426880
370 entdata 33102
2942 nodes 105912
2978 leafs 142944
15342 leafsurfaces 61368
30688 leafbrushes 122752
6629 drawsurfaces 981092 *
59785 drawverts 4782800 *
38919 drawindexes 155676
152 lightmaps 7471104
293664 lightgrid 8809920 *
visibility 319408
total 18411220
17979 KB
17 MB
---------------------------------
6 seconds elapsed
fraco
ydnar
28th October 2003, 15:27
Well, 152 lightmaps is quite a bit. What's the map look like?
y
fraco
28th October 2003, 16:44
What's the map look like?
looks gr8 of course...for a first map release that is. I'll drop some screenies later...
large lightmapped terrain, half of the terrain lightmapscale 0.5 :-D. I also have -nocollapse (needed that, cfr. other thread). Had a few _lightmapscale 0.125 for lightleaks and for *impressive* shadows...
fraco
SCDS_reyalP
28th October 2003, 20:19
If I'm reading that right, your lightgrid is nearly at the max too, taking about 8MB.
ydnar
28th October 2003, 20:27
Well, I'd scale back some of your ambitious lightmapping. Only use it on the parts of the map where it'll be most noticable.
Also, the lightgrid sizes are much larger than they actually are. Internally it represents each lightgrid cell as 8 colors rather than 2, plus direction for a total of 36 bytes per cell rather than 12. So the lightgrid is actually about 2.5MB or so.
y
fraco
28th October 2003, 22:04
:D
top down view of the map:
http://www.fab4.be/~fraco/nuclearb2.jpg
Half of the surface of the terrain is with _lightmapscale 0.25. It's surrounded by a fence. The outer part of the terrain (unreachable, outside the fence) is not
I couldn't help myself, but I love those smooth shadows on the terrain:
http://www.fab4.be/~fraco/nuclearb8.jpg
I actually have this high contrast light vs. dark all round my map:
http://www.fab4.be/~fraco/nuclearb9.jpg
http://www.fab4.be/~fraco/nuclearb1.jpg
http://www.fab4.be/~fraco/nuclearb10.jpg
http://www.fab4.be/~fraco/nuclearb4.jpg
Also, there is a large roof section i felt needed more detailed shadows (_lightmapscale 0.25 again)
http://www.fab4.be/~fraco/nuclearb5.jpg
but looking back at the screenie, that definately wasn't necessary.
The large lightgrid is probably because my skybox is high and empty to allow space for the cooling tower (which i feel actually should have been much bigger)
some more screenies
http://www.fab4.be/~fraco/nuclearb6.jpg
http://www.fab4.be/~fraco/nuclearb7.jpg
I had a lot of trouble hinting to give decent fps round this mirror (its visible from quite some spots...)
http://www.fab4.be/~fraco/nuclearb12.jpg
And some ppl might recognise a model of theirs (properly credited in the readme, hope you don't mind my borrowing it...)
http://www.fab4.be/~fraco/nuclearb13.jpg
So, I feel reluctant to reduce the lightmap count, coz i like the way it looks. For the lightgrid, I suppose i could increase the _blocksize (blocksize, gridsize, whatisitagain). Not sure about the effect.
I actually sent the map as final for inclusion in the sof2 mod ICS2, so I'm not sure if I'll have time to change stuff before the release of that mod.
I was planning on dropping some screenies in here around the release time of ICS2 anyways along with a big
Thank You
:clap:
for all the patience and the help.
greetz
fraco
LordDaimos
28th October 2003, 22:41
That map looks awsome :).
/LordDaimos
ydnar
28th October 2003, 23:20
You should make the coke machine shader light-emitting. It'd be a bit more realistic.
What are you using for your sky shader? It looks like you've got a high ambient or _minlight.
y
fraco
29th October 2003, 07:33
You should make the coke machine shader light-emitting. It'd be a bit more realistic.
erm, good point, rep and 5thhorseman provided a whole set of different shaders with it, and i managed to take the dullest. The machine also has a lightstyles shader (really neat), but that is incredibly expensive :-). Just a simple surfacelight would be way better yes.
What are you using for your sky shader? It looks like you've got a high ambient or _minlight.
Erm, usually screenies look darker on other ppl's monitor than on mine, I manually brightened them some in photoshop... That's all...
no minlight...
textures/nuclear/nuclear_sky
{
q3map_lightimage textures/colors/blue_light
qer_editorimage textures/tools/editor_images/qer_sky
sun 0.47 0.57 1 60 0 65
surfaceparm sky
surfaceparm noimpact
surfaceparm nomarks
notc
q3map_nolightmap
skyParms textures/skies/pra6 256 -
}
regarding the amount of lightinfo:
I reduced the lightmapscales quite a bit (doubled the value) to see what it looks like (compiling...). Maybe (just maybe) I overdid it.
I also wanted to change the gridsize, but i think i can't. The default being 64 64 128], and I've got multiple floors, so I can't scale the z value up. I've got quite narrow hallways inside the building, so I think i better keep x and y values too. The lightgrid is wasted on the empty sky of course, but there is no way to scale it only in one specific region is there?
thnx
fraco
SCDS_reyalP
29th October 2003, 09:37
The lightgrid is wasted on the empty sky of course, but there is no way to scale it only in one specific region is there?
thnx
fraco
You can use a common/lightgrid brush to keep it from extending up into the sky, assuming there is no way for your palyers to get up there. The lightgrid brush should define the area in which you want the grid defined. If players can't go outside the fence, you could exclude the whole area with the trees too.
fraco
29th October 2003, 09:50
that's a really interesting bit of help.
SOF2 doesnt have the shader
i got this from the GTKradiant cvs for wolf:
textures/common/lightgrid
{
qer_trans 0.5
surfaceparm nodraw
surfaceparm nolightmap
surfaceparm nonsolid
surfaceparm detail
surfaceparm nomarks
surfaceparm trans
surfaceparm lightgrid
}
I suppose thats the one? I definately should be able to save a lot of bsp size. Can it be a complex area, like not just one brush?
thnx
fraco
ydnar
29th October 2003, 15:51
It could be as complex as you like, but the total box volume of the lightgrid brushes determines its size.
y
gynec
29th October 2003, 17:25
apropos 'light-emitting'
i played Splinter Cell and saw the genius light coronas.
It seems to be an OpenGL effect cause my geforce2 :D is able to present it.
Is such a thing realizable per q3map2 ydnar?
http://free.pages.at/gynec/SPLINTERCELL 1.jpg
http://free.pages.at/gynec/SPLINTERCELL 2.jpg
http://free.pages.at/gynec/SPLINTERCELL 3.jpg
chavo_one
29th October 2003, 18:01
whitespace and the web don't mix.
http://free.pages.at/gynec/SPLINTERCELL%201.jpg
http://free.pages.at/gynec/SPLINTERCELL%202.jpg
http://free.pages.at/gynec/SPLINTERCELL%203.jpg
ydnar
29th October 2003, 18:41
No. I answered this before. It's not a compiler related effect. It's done entirely in the renderer.
y
Emon
30th October 2003, 01:18
You can do that in Jedi Academy. :D
wudan
1st November 2003, 17:46
No. I answered this before. It's not a compiler related effect. It's done entirely in the renderer.
y
Are you sure? It seems like you could do some polygon offset autosprite dirty hackness to create something similar? It won't be the *exact* effect, but it *could* happen, no? (well, i guess you really wouldn't get the 'full' effect - ie if you block the 'corona' image, you'll blot out sprites that you block, but you won't get that 'bleed-over' that you get with the authentic corona-ness)
ALso, is there a way that vertex colors could get applied to brush polygons? Could this be shader supported (like a keyword to specify vertex colors)? - could be used to save texture memory, if my thinking is right - (and I'll warrant it might not be so)...
- i realize that the shader won't know how many vertices a polygon has (quake3 only does triangles, though, right?), i meant vertex colors for *all* vertices.
]UBC[ McNite
4th September 2005, 14:51
Try Q3Map2 -info sometime on a BSP.
I m using Q3map2build by bobdev as a front end tool for all my compiles which is just perfect.
My q3map2 version is q3map_2.5.16_win32_x86 and i can't get -info working with my front end. Can anybody plz post the code for the .bat when i want the info?
Thx a lot.
kamikazee
4th September 2005, 15:31
I use q3map2 -game ET -info <bsp> and it works.
If you don't supply the -game parameter q3map complains the bsp is a wrong version.
Detoeni
4th September 2005, 15:32
hacked from my user.proj
<key name="bsp_Q3Map2: (info) BSP -info " value="! "C:\.....path_to.........\q3map_2.5.16_win32_x86\q 3map2" -v # -game et -fs_basepath "C:/Program Files/Wolfenstein - Enemy Territory//" -info $"/>
edit: Blast! got betten to the submit button
]UBC[ McNite
4th September 2005, 15:49
That works... only... how can i make it log the results? The black window closes pretty fast :disgust:
And, yea, i m a noob regarding this :D
Twisted0n3
4th September 2005, 16:00
q3map2toolz can monitor the compile and log the results in its own window.
kamikazee
4th September 2005, 19:00
You could start it using q3map2 -game ET -info mylevel.bsp > levelinfo.txt
If you want to add the last run to the log, use >> instead of >
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.