Major vis problems.
-
- Posts: 12
- Joined: Mon Nov 13, 2006 7:05 pm
Major vis problems.
I was wondering if you guys could help me with a strange problem that I think is vis related with my map. It is a space map with two flying battleships that you can enter. When inside of the ships everything is fine, but when outside the ships (in the open) no weapon projectiles will draw (and certain entities too). This is a strange error I've never seen before.
Re: Major vis problems.
i'll let someone who knows more jump in... but i think...
sounds like you are running into a max entities problem. you probably have too many entities (projectiles, armors, healths) kicking around at one time.
sounds like you are running into a max entities problem. you probably have too many entities (projectiles, armors, healths) kicking around at one time.
Re: Major vis problems.
Yes, very likely. The limit is 1024. Check your console and compile logs for errors. I'm pretty sure you'll see a max_entities_something error in the console.
-
- Posts: 12
- Joined: Mon Nov 13, 2006 7:05 pm
Re: Major vis problems.
Strange, b/c the compiler seems to not be reporting any errors and I only have 561 entities. Any other suggestions?
(I am still very confused at why when I am outside of the ship, weapon projectiles will not draw)
(I am still very confused at why when I am outside of the ship, weapon projectiles will not draw)
Re: Major vis problems.
Any console error messages? Maybe post up the map and bsp so we can see what's going on?
-
- Posts: 12
- Joined: Mon Nov 13, 2006 7:05 pm
Re: Major vis problems.
The entities limit you may be hitting is a runtime one (in game) rather than a compile time one.
Some entities count as multiple ones at runtime - e.g. doors and platforms spawn a trigger to activate them. Every projectile (rockets/plasma/grenades) counts as a runtime entity as well, so does stuff like corpses and gibs. If there's too many on the go the engine won't let more be spawned. I remember way back when, Castle had the issue on his Water Giant map (remake/remix of Lava Giant from UT), basically once you fired off a bunch of rockets or whatever into the sky you had to wait until some hit the skybox before you could fire more!
Looking at the map, I think deleting 99% of the speakers would be a first step. If the sound you want to use is too quiet, then extract it from the pak file and make a copy of it, boost the volume ina sound editor, and save it as something like sounds/world/gbattleships/windnew.wav to avoid conflicting with the original.
Your skybox probably doesn't need to be anywhere near as high or as deep as it is. Give projectiles less space to hang around in!
I'm not sure how target_give works at run-time, it is possible that it is something else that might baloon the entity count. I sorta doubt it's a problem, but a test build with them removed may be worth trying.
Some other stuff you should look at fixing, not necessarily related to the problem:
- It looks like the skybox has just a texture on it, rather than a black space skybox shader?
- You have a LOT of structural brushes that have their corners off grid, and have faces at weird angles. That is a bad idea from a vis point of view, it's going to generate a big mess of portals and really unhelpful vis data. Many of these brushes also have overlapping textured faces. Admittedly in a map with this concept some of this is hard to avoid, but you should be able to keep the corners of brushes on grid if you try, which should at least stop the risk of degenerate brushes, and should not need to overlap textured faces.
- The engine tubes are made out of a mass of brushes with huge amounts of overlap and overlapping textured faces. It would perhaps be better to build these with patches, or at least to rebuild with brushes that taper towards the cylinder's cenre rather than away from it. On the plus side, at least you made them detail!
- The engine jet flames look like they could be made with a lot less brushes. Look up the deformvertexes sprite and sprite2 shader parameters, assuming you've dabbled in shader writing at all.
- Run brush cleanup once in a while. You had a few duplicate faces. To avoid getting these in the first place, be careful not to collapse faces with the edge or vertex manipulation tools, treat vertex manipulation with suspicion, and never use CSG subtract. Build complex brush shapes using the clipper tool as much as possible. 'Shearing' or skewing brushes is also quite safe and would help for the kind of shapes you are making here. You should be able to find tutorials for any technique I've mentioned that you're not familiar with.
A couple of general pointers for space maps:
- Make the triggers below the map really deep! If they are thin, then lagging players may move right through them between server frames.
- Unless your map has a flight powerup in it, don't use target_remove_powerups. I've no idea what CTF mods are still popular (if any) but quite a few had a grapple, so players might want to risk going down there, but target_remove_powerups will take the flag away from you! Instead, use a big brush textured in common/nodrop at the bottom of the skybox to stop dropped weapons and flags from sitting down there.
Some entities count as multiple ones at runtime - e.g. doors and platforms spawn a trigger to activate them. Every projectile (rockets/plasma/grenades) counts as a runtime entity as well, so does stuff like corpses and gibs. If there's too many on the go the engine won't let more be spawned. I remember way back when, Castle had the issue on his Water Giant map (remake/remix of Lava Giant from UT), basically once you fired off a bunch of rockets or whatever into the sky you had to wait until some hit the skybox before you could fire more!
Looking at the map, I think deleting 99% of the speakers would be a first step. If the sound you want to use is too quiet, then extract it from the pak file and make a copy of it, boost the volume ina sound editor, and save it as something like sounds/world/gbattleships/windnew.wav to avoid conflicting with the original.
Your skybox probably doesn't need to be anywhere near as high or as deep as it is. Give projectiles less space to hang around in!
I'm not sure how target_give works at run-time, it is possible that it is something else that might baloon the entity count. I sorta doubt it's a problem, but a test build with them removed may be worth trying.
Some other stuff you should look at fixing, not necessarily related to the problem:
- It looks like the skybox has just a texture on it, rather than a black space skybox shader?
- You have a LOT of structural brushes that have their corners off grid, and have faces at weird angles. That is a bad idea from a vis point of view, it's going to generate a big mess of portals and really unhelpful vis data. Many of these brushes also have overlapping textured faces. Admittedly in a map with this concept some of this is hard to avoid, but you should be able to keep the corners of brushes on grid if you try, which should at least stop the risk of degenerate brushes, and should not need to overlap textured faces.
- The engine tubes are made out of a mass of brushes with huge amounts of overlap and overlapping textured faces. It would perhaps be better to build these with patches, or at least to rebuild with brushes that taper towards the cylinder's cenre rather than away from it. On the plus side, at least you made them detail!
- The engine jet flames look like they could be made with a lot less brushes. Look up the deformvertexes sprite and sprite2 shader parameters, assuming you've dabbled in shader writing at all.
- Run brush cleanup once in a while. You had a few duplicate faces. To avoid getting these in the first place, be careful not to collapse faces with the edge or vertex manipulation tools, treat vertex manipulation with suspicion, and never use CSG subtract. Build complex brush shapes using the clipper tool as much as possible. 'Shearing' or skewing brushes is also quite safe and would help for the kind of shapes you are making here. You should be able to find tutorials for any technique I've mentioned that you're not familiar with.
A couple of general pointers for space maps:
- Make the triggers below the map really deep! If they are thin, then lagging players may move right through them between server frames.
- Unless your map has a flight powerup in it, don't use target_remove_powerups. I've no idea what CTF mods are still popular (if any) but quite a few had a grapple, so players might want to risk going down there, but target_remove_powerups will take the flag away from you! Instead, use a big brush textured in common/nodrop at the bottom of the skybox to stop dropped weapons and flags from sitting down there.
-
- Posts: 12
- Joined: Mon Nov 13, 2006 7:05 pm
Re: Major vis problems.
Thanks for the help. I will start by removing a mass amount of the speakers.
As for everything else, I understand everything that you have mentioned. Some things I just haven't done yet (such as aligning things to the grid better and changing the script on the flames), because I haven't gone back to fix tweaks , but a few things I actually didn't think about.
So anyway, thanks a lot and I will be sure to give an update on my map soon.
As for everything else, I understand everything that you have mentioned. Some things I just haven't done yet (such as aligning things to the grid better and changing the script on the flames), because I haven't gone back to fix tweaks , but a few things I actually didn't think about.
So anyway, thanks a lot and I will be sure to give an update on my map soon.
-
- Posts: 12
- Joined: Mon Nov 13, 2006 7:05 pm
Re: Major vis problems.
I used Windows sound recorder to increase the sound of wind2.wav from pak0. After doing this I did away with about 250 unneeded speakers and the map runs great. Now all I have to do is fix the other minor tweaks. Thanks a lot guys. 
