|
Level Size/Number of Objects Problem
#68531
03/29/06 00:13
03/29/06 00:13
|
Joined: Aug 2005
Posts: 336 Connecticut
Galen
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2005
Posts: 336
Connecticut
|
I was just placing some more sprites into my (rather large) level, and I got error e011, "too many objects".
Well, in my object view window, the one furthest down is number 7105, so I assume I have 7105 objects?
In any case, my nexus is already maxed out at 500 and won't let me increase it further. I tried changing the "max Level Size" in the build options, all the way from 250000 to 500000 and then to 1000000, even 10000000, with no difference when trying to compile. I even added the max_entities= script into my main level script (before the level_load) with various numbers, none of which seem to help.
Am I missing anything here? The level was able to compile no problem with about 75 fewer objects in it, but now all of a sudden it won't. I have plenty of RAM to work with (see sig below) and a decent computer... Can anyone see a solution here that doesn't involve chopping my level up into smaller pieces? I'm constructing a virtual walthrough of a real building wit lots of windows, and it has to look right from any given direction, thus my extreme hesitation at doing anything other than 1 level.
Thanks in advance.
|
|
|
Re: Level Size/Number of Objects Problem
[Re: Galen]
#68533
03/29/06 07:54
03/29/06 07:54
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
Senior Expert
|
Senior Expert
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
|
Increase max_entities (add at the very top of the main function):
max_entities = 8000;
However, you should never use that many entities as it would have a major impact on your frame rate.
It may say that it has 7105 objects, but this is not always true. I've had the count in my (otherwise empty and small) experimental level past 10,000 even though only 4 objects are in there. The best way to find out is to just build your level. It'll say "placing xxx entities". This would give a very good idea to how many entities you have. The exception is if you have a build error (such as too many portals).
"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip
My 2D game - release on Jun 13th; My tutorials
|
|
|
Re: Level Size/Number of Objects Problem
[Re: ulillillia]
#68534
03/29/06 13:36
03/29/06 13:36
|
Joined: Aug 2005
Posts: 336 Connecticut
Galen
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2005
Posts: 336
Connecticut
|
Hi ulillillia , thanks for replying.
I just increased the max_entities line to 8000 as suggested. My main function now appears as such: ------------------- Function Main() { max_entities = 8000; freeze_mode = 1; level_load("GLMain.wmb"); wait(3); freeze_mode = 0; } -------------------
However, I'm still getting the e011 error. In fact, I didn't notice this before, but the entire error message includes a "map" reference, as such:
----CRITICAL ERROR---- E011:Map size-too many objects
I have no idea if that makes a difference. Is there anything else I can do to fix this?
I currently have the Max. level size during the build set at 250000. Nexus is still 500.
Thanks... error e011
Last edited by Galen; 03/29/06 13:37.
|
|
|
Re: Level Size/Number of Objects Problem
[Re: Galen]
#68535
03/29/06 14:18
03/29/06 14:18
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
Senior Expert
|
Senior Expert
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
|
That's just it. You have too many objects in your level for the map compiler to handle. There is, however, quite a few tricks:
1. Break up your level into chunks and build map entities then import the map entities into the engine. I don't know if this'll work solve the problem, but in 6.31.4, entities in a map entity don't show in WED. Use a logical grid or a system you can understand (such as objects within a given room or set of rooms). 2. Don't use a bunch of sprites. Use models and merge everything into one single model (or a model of no more than 5000 polygons). Having tons of entities nearly kills the frame rate turning 500 fps into 2 fps or lower. That's one of the many performance tips. Oh, and have the objects in the same vicinity too rather than scattered all over your level.
As an important note, do not have the nexus much above 200. Unless your target system can handle 500+ MB, I strongly advise you don't go above 200. 100 is high enough for almost any level.
"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip
My 2D game - release on Jun 13th; My tutorials
|
|
|
Re: Level Size/Number of Objects Problem
[Re: ulillillia]
#68536
03/29/06 18:44
03/29/06 18:44
|
Joined: Aug 2005
Posts: 336 Connecticut
Galen
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2005
Posts: 336
Connecticut
|
Okay, I think I see now what to do. So, first thing is to take the many sprites I have for groundcover, plants, etc, and turn them into models... Do I basically just take the tga file and apply it to a block (a simple slab in the case of groundcover), then import as an entity into MED and save as a model? And instead of having, say, 20 of these individual models side-by-side, I should just construct them all as 1 model and place it in my level in areas where they would naturally be in the same vicinity (cluster of similar plants, etc)? Second, I already have parts of my level pre-built as entities, but they weren't done in a grid, but rather in concentric circles, so I'm guessing that's a frame-rate killer and I should deconstruct those and reconstruct the level so that I can "chunk" the entire level into grid components, that I can then re-assemble in my main level. Does it matter that I also have a bunch of windows, etc, that I'm loading in as entities multiple times into my level? Should those windows be models instead of entities? And after all that I'll try lowering my nexus. Many thanks! Quote:
That's just it. You have too many objects in your level for the map compiler to handle. There is, however, quite a few tricks:
1. Break up your level into chunks and build map entities then import the map entities into the engine. I don't know if this'll work solve the problem, but in 6.31.4, entities in a map entity don't show in WED. Use a logical grid or a system you can understand (such as objects within a given room or set of rooms). 2. Don't use a bunch of sprites. Use models and merge everything into one single model (or a model of no more than 5000 polygons). Having tons of entities nearly kills the frame rate turning 500 fps into 2 fps or lower. That's one of the many performance tips. Oh, and have the objects in the same vicinity too rather than scattered all over your level.
As an important note, do not have the nexus much above 200. Unless your target system can handle 500+ MB, I strongly advise you don't go above 200. 100 is high enough for almost any level.
|
|
|
Re: Level Size/Number of Objects Problem
[Re: Galen]
#68537
03/29/06 19:21
03/29/06 19:21
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
Senior Expert
|
Senior Expert
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
|
I can make a field of grass (as models) cover a very large area and still get an extremely high frame rate. Actually, you don't need to chunk your level into grid components. The big frame rate killer is your high number of sprites/entities. Blocks do not support transparency from alpha channel. You have to use models with alpha channel in their texture (32-bit TGA). The best way to do this is to have your plants put into a grid arrangement from 2 to 16 quants apart (depending on detail level). I can make a quick sample to help explain, however, you'll have to wait until when I wake up about 10 hours later since I'm quite tired. I did an experiment a long while ago to find out what effect multiple entities had on the frame rate. My May 3, 2005 blog entry (see news item #2) has these details which cover the impact high entity counts have on the frame rate. When all were not visible, the frame rate was past 500, but when all were visible, it was just 5 fps. I don't have the exact results for 2048 visible objects, but you can get an idea from what I have.
"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip
My 2D game - release on Jun 13th; My tutorials
|
|
|
Re: Level Size/Number of Objects Problem
[Re: Galen]
#68539
03/29/06 23:18
03/29/06 23:18
|
Joined: Aug 2005
Posts: 336 Connecticut
Galen
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2005
Posts: 336
Connecticut
|
Okay, I selected a whole field full of sprites & models of plants that I had, and ended up copying them out and building them as one entity, which I then loaded back into my level, replacing the mass of single sprites and models that were there before. Success! The level compiles, no problems. In fact, it compiles even faster than before (as expected). In preview mode, the framerate doesn't appear to drop noticeably, except when I swing the view around on a line with the rest of my level, where there are many more single sprites. I think if I therefore combine as many close sprites as possible, then load them back in as entities, that will definitely keep my object count down. The only issue I've seen so far with this is that when using sprites alone (with no blocks), I don't see anything as far as placing the items, except unless I render the entitiy as a "box", then there's some trial and error in lining it up correctly. But that's fairly minor, as compared to having to build and place all those sprites again (they are on uneven ground, at uneven angles, and there are many of them, so I'd rather avoid re-orienting them all again). I think my level has slowness because it is one really big building with lots of open space and windows. I don't know what I can do to get around that; the manual says build rooms with line-of-site in mind, use twisting hallways, etc, but I don't have that option because this is based on a real building, and people would not like it if I started changing the architecture on them.  Can I do anything else to get framerates down in my level? I've read a few things about clipping distance, but I'm not sure how that's going to look...
|
|
|
Re: Level Size/Number of Objects Problem
[Re: Galen]
#68540
03/30/06 11:32
03/30/06 11:32
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
Senior Expert
|
Senior Expert
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
|
My favorite screenshot from my 3D game runs at 20 fps and this is with bad design. If I optimized it, I could easily exceed 100 fps, even with nearly 2400 buildings and the whole level in view. This was with Windows 98 and with XP Pro now, it's 50% faster adding another huge impact. With the use of LOD, my experiment results, and other tricks, I can make a level spanning 200,000 quants in diameter and still get a monster frame rate. I'm waiting for bug fixes (especially the crash in MED when passing 16 groups) before I resume my 3D game. My 2D game is nearly done so that's my top priority. The best way to optimize is to learn optimization tricks and, most importantly, run experiments. There's a thread in the engine forum about performance tips and tricks, of which I posted a graph showing the effect on performance.
"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip
My 2D game - release on Jun 13th; My tutorials
|
|
|
|