MAX_SHADERS bug ...
MAX_SHADERS bug ...
HI all
I hope someone be able help me out here, i googled already and no lucky find a sollution or at least a clear answer abotu this bug
When I compile map with light support, it play fine in1.32 no bugs at all, but when I play in 1.16n, I get this bug:
"Warning - General Permanentshader - Max_shaders hit"
over and over and map auto-shutdown even before start game (I call console scroll up and see that error message spammed til map crash)
I searched on web, and the clearest answer I found was abotu to use less textures, right now i'm using 66 new textures (including shaders wich I think is some 7)
so any idea how fix the bug, or how many 'new' textures/shaders I can use in one single map? (IF it fix the bug)
Thanks
I hope someone be able help me out here, i googled already and no lucky find a sollution or at least a clear answer abotu this bug
When I compile map with light support, it play fine in1.32 no bugs at all, but when I play in 1.16n, I get this bug:
"Warning - General Permanentshader - Max_shaders hit"
over and over and map auto-shutdown even before start game (I call console scroll up and see that error message spammed til map crash)
I searched on web, and the clearest answer I found was abotu to use less textures, right now i'm using 66 new textures (including shaders wich I think is some 7)
so any idea how fix the bug, or how many 'new' textures/shaders I can use in one single map? (IF it fix the bug)
Thanks
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
It should be made clear that it's not strictly the number of shaders you use in the map that hits the limit. At runtime the game generates a specific shader for each unique combination of a scripted shaders (or textures with no shader) and a lightmap. Its these runtime shaders that count towards the max shaders limit.
(If programmer could help me with terminology here it would be appreciated - I like using the right names for things)
So you need to reduce the number of unique shader+texture to lightmap combinations. Reducing the number of shaders and textures you use can help. Converting surfaces to be vertex lit can help more - if you have any terrain in your map this would be a good candidate. Using a lower than normal lightmapscale on some geometry might help too - it should increase the amount of faces that get packed onto each lightmap.
If you have any textured faces within the map hull that will never be visible to the player, make sure you caulk them so they are not wasting lightmap space.
EDIT: Also, any patches that have a decent amount of subdivisions might look OK vertex lit so consider that too.
If you have any complex models that you are lightmapping, don't, it's pointless. On most mapmodels the vertex density is better than the luxel density would be.
(If programmer could help me with terminology here it would be appreciated - I like using the right names for things)
So you need to reduce the number of unique shader+texture to lightmap combinations. Reducing the number of shaders and textures you use can help. Converting surfaces to be vertex lit can help more - if you have any terrain in your map this would be a good candidate. Using a lower than normal lightmapscale on some geometry might help too - it should increase the amount of faces that get packed onto each lightmap.
If you have any textured faces within the map hull that will never be visible to the player, make sure you caulk them so they are not wasting lightmap space.
EDIT: Also, any patches that have a decent amount of subdivisions might look OK vertex lit so consider that too.
If you have any complex models that you are lightmapping, don't, it's pointless. On most mapmodels the vertex density is better than the luxel density would be.
Last edited by Shallow on Wed Sep 06, 2006 12:29 pm, edited 1 time in total.
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
i made one small test while u hadn't replied, test was simple:
add JUST .bsp file to .pk3 and test map with just pak0 and pak2 (both pk3 for 1.16n only), map worked
then added the floor textures => worked
then added trims textures => worked
then added sfx textures=> worked
then added mat textures => worked
then added misc textures => worked
when added wall textures => crash, here is he problem ;-)
so i started adding 1 by 1 a wall texture and launchign game til it crash in 2 textures, 1 of those textures I can eplace by one of the working ones without problem
the second one, was weird ..., was the 'lower' wall of whole map I use this since i began making map, but since then i added several curves, and map always crash when load this texture so i remvoed it from pk3 and map work fine (besies a texture be missing :P)
in this precise moment i'm re-compiling map with workign textures replacing those, for see if map work well, if it do then this may be a work-around for this problem, otherwize I need to check deep as you said on your post, and about caulk i stil didnt' caulked all oposed walls because I never thought they could be such an issue... go do it as soon as I test this compiling
i'll edit or post later for say if this got solved (I relay hope so :P)
but thanks a lot for the help
add JUST .bsp file to .pk3 and test map with just pak0 and pak2 (both pk3 for 1.16n only), map worked
then added the floor textures => worked
then added trims textures => worked
then added sfx textures=> worked
then added mat textures => worked
then added misc textures => worked
when added wall textures => crash, here is he problem ;-)
so i started adding 1 by 1 a wall texture and launchign game til it crash in 2 textures, 1 of those textures I can eplace by one of the working ones without problem
the second one, was weird ..., was the 'lower' wall of whole map I use this since i began making map, but since then i added several curves, and map always crash when load this texture so i remvoed it from pk3 and map work fine (besies a texture be missing :P)
in this precise moment i'm re-compiling map with workign textures replacing those, for see if map work well, if it do then this may be a work-around for this problem, otherwize I need to check deep as you said on your post, and about caulk i stil didnt' caulked all oposed walls because I never thought they could be such an issue... go do it as soon as I test this compiling
i'll edit or post later for say if this got solved (I relay hope so :P)
but thanks a lot for the help
-
- Posts: 2237
- Joined: Sat Mar 12, 2005 10:49 pm
no caulk??
Caulk is the greatest thing since sliced bread
Typically, everybody that I know builds their maps in just caulk. Then they texture individual faces (only the ones that would be visible ingame)
Caulk is your best friend. Be good to it and it'll be good to you.
Another thing I see a lot of people do is make every brush that isn't part of the structual hull into a detail brush. When I did this (and raised the value of _blocksize)on one of my maps I lowered vis compile time by a considerable amount (30 minutes vs. 3 minutes)

Caulk is the greatest thing since sliced bread

Typically, everybody that I know builds their maps in just caulk. Then they texture individual faces (only the ones that would be visible ingame)
Caulk is your best friend. Be good to it and it'll be good to you.
Another thing I see a lot of people do is make every brush that isn't part of the structual hull into a detail brush. When I did this (and raised the value of _blocksize)on one of my maps I lowered vis compile time by a considerable amount (30 minutes vs. 3 minutes)
all textures/shaders are good
map earlier used to crash when i had 1 of 3 textures in the .pk3
now after a long tiem cauling every outside wall, and faces wich were turned to each others, now game only crash when both textures r in .pk3
if i add texture a wihotu texture b in pk3 map work (but 1 texture is missing)
if i add texture b withotu texture a in pk3 map work (but 1 texture is missing)
if i add texture a and b in .pk3, map crash
but this error is very stupid thing, now i'm just wondering, is there any limit for use the same texture?!, I mean like only can use texture a in 500 faces or so, is there any limit specialy for default q3??!
well I go try caulk a lil more, specialy the texture b, since is the less used texture so might be easier caulk the remaining of it for test again, but mean while, would someone mind tell me, how make one specific curve or brush work as "vertex" as someone said earlier, and what exactly is the 'strucural hull' ?!?
EDIT: ok map works great now, i caulked a LOT :P, all works great now
so thanks very much for the help
map earlier used to crash when i had 1 of 3 textures in the .pk3
now after a long tiem cauling every outside wall, and faces wich were turned to each others, now game only crash when both textures r in .pk3
if i add texture a wihotu texture b in pk3 map work (but 1 texture is missing)
if i add texture b withotu texture a in pk3 map work (but 1 texture is missing)
if i add texture a and b in .pk3, map crash
but this error is very stupid thing, now i'm just wondering, is there any limit for use the same texture?!, I mean like only can use texture a in 500 faces or so, is there any limit specialy for default q3??!
well I go try caulk a lil more, specialy the texture b, since is the less used texture so might be easier caulk the remaining of it for test again, but mean while, would someone mind tell me, how make one specific curve or brush work as "vertex" as someone said earlier, and what exactly is the 'strucural hull' ?!?
EDIT: ok map works great now, i caulked a LOT :P, all works great now
so thanks very much for the help