Jump to content
The Dark Mod Forums

What are current max limits for the following:


Bikerdude

Recommended Posts

  • Replies 63
  • Created
  • Last Reply

Top Posters In This Topic

There's no limits for:

 

* Brushes

* Patches

* Skins

* Shaders (material defs)

 

The Entity Limit is 8192 so you're getting close.

Models limit is 65537

"Collision Models" limit is 4096

 

http://wiki.thedarkmod.com/index.php?title=Limits

 

Anything beyond that? Try to make sure the map doesn't consume more than 3.5GB when loaded :P

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Don't forget there are sometimes tricks to combine entities to reduce the count, especially for the inert scenery sorts.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

  • The Entity Limit is 8192 so you're getting close.
  • "Collision Models" limit is 4096
  • Anything beyond that? Try to make sure the map doesn't consume more than 3.5GB when loaded

  • yeah I did wonder hence why I asked etc.
  • hmm, so how do I check how many CM's I have..?
  • TDM only starts cracking the 1.5GB during compiling, with DR sitting at 1gb. when played its a only a few hundred MB.

Don't forget there are sometimes tricks to combine entities to reduce the count.

I do that be default as I build a map, this map is very detailed. That said, another pass cant hurt.

Yep, and SEED is your friend.

Cant use SEED as its too random, this is a city based mission.

Link to comment
Share on other sites

 

hmm, so how do I check how many CM's I have..?

 

 

I believe that "listCollisionModels" is the console command for that.

 

There's also "CollisionModelInfo" but I think that just shows you details about a collision model you are looking at.

 

 

 

Cant use SEED as its too random, this is a city based mission.

 

 

I think you can still use seed_combine and seed_watch_brethren on models even if you don't use the random portion, Tels has done this to Johaness Burrock's test map

in the SVN repo. You may wanna ping Tels to get pointers.

 

http://wiki.thedarkm...tching_entities

 

See?, no random at all.

Edited by nbohr1more

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I believe that "listCollisionModels" is the console command for that.

 

There's also "CollisionModelInfo" but I think that just shows you details about a collision model you are looking at.

 

The CM limit could be raised, if there is need, I think. (It depends if we have another bit free).

 

Basically, every moveable has a CM. So you can't have more than 4090 or so moveables (player spawned arrows, absence markers and so on would also have a CM).

 

As for the other limits, the entity limit on the webpage says not more than 6000 or 7000, but you have 7700 so that would be the limit that can be reached (you loaded the map with TDM, right)? We should adjust the wiki. However, don't go much higher. During runtime, entities will be spawned, Like the combo entities, arrows and so on. If the game runs out of entity slots, it will crash. That could be quite well during the mission.

 

I think you can still use seed_combine and seed_watch_brethren on models even if you don't use the random portion, Tels has done this to Johaness Burrock's test map

in the SVN repo. You may wanna ping Tels to get pointers.

 

http://wiki.thedarkm...tching_entities

 

See?, no random at all.

 

Yes, exactly. I guess this part should have had a different name, as people seem always to confuse these two :huh:

 

"Watching entities" with SEED also has the advantage that the entities are removed during the runtime, meaning you have more entity slots free.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Well i was read this post that take my attention because im sart a new map. When you say "that the entities are removed during the runtime" you mean when you are playing a mission? If so lets say i have a large building with 3 floors with 500 entities, i enter te build finish my mission in there get out and know that i will never come back to that build, so im game i can make disapear that 500 entities and put another ones..?

Link to comment
Share on other sites

No, that's not what it means. It means that although DR might tell you that you have 7000 entities, the SEED system can merge some of those entities while the map is loading, so you end up with fewer entities while the map is running.

 

NB you are unlikely to hit any limits in your first map so don't waste energy trying to avoid them! Only the most prolific mappers on the planet -- e.g. Biker -- are likely to run into the problem being discussed in this thread.

Link to comment
Share on other sites

Should be v1.08 and higher. I think some virtual entities are loaded at map start so that may be a problem when you are so close to the limit.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

The world and player take up 5 entities.

 

On top of that you have things like torches that are 1 entity in DR but 3 in game (torch model + flame particle + light), and AI are 1 in DR but 2-3 in game (they each spawn a head and sometimes a sword or lantern or whatever).

Link to comment
Share on other sites

I think a console dump (condump example.txt) will pickup the entity count but you should also see it with "listEntities" I believe.

 

Time to start using seed_combine methinks ;)

Edited by nbohr1more

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Is there a way to get an entity count in game from the console? Hopefully so. I'll take a look if no one knows. And if there isn't, adding the console command to svn would be a quick job.

 

I think just outputting the number after the map has loaded to the console would be enough.

 

If it is >8192, the game will crash, anyway, and if less, the mapper can simply load the map once to see the number.

 

(The amount that is in the map shown by DR doesn't need to be printed - afterall, DR shows it directly. But the amount after loading can vary plus (torches, AI) and minus (SEED and LOD and other things that remove entities directly before spawn like the "random_spawn").

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Is the figure shown on the console before or after def_attached entities get spawned? If before, it won't help much.

 

I meant it should be added, not that it is already implemented :)

 

Outputting one line with some statistics after map load like:

 

Map NAME loaded: 123 entities, 12 models, 6 lights, 3 AI, 5 triggers

 

That wouldn't hurt (its a simple counting over all entities once) and there would no need to remember a command etc.

 

About the spawn: I don't know offhand wether the combo entities are spawned right during mapload, or in or after frame 1. Good question.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

If everything else fails, you could also consider splitting the mission into two different maps. It's not a very liked approach, especially since T3, but it is a possibility.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

If everything else fails, you could also consider splitting the mission into two different maps. It's not a very liked approach, especially since T3, but it is a possibility.

 

I think the entity count can be brought down a lot by a combination of:

  • comine multiple func_statics into one (with SEED or manual)
  • exprot often-used stuff as ASE model and avoid the func_statics, instead make them a model (ok, this has the same entity count, but it saves memory and loading times)
  • If you useda lot of vinepatches, vegetation etc, it might be worthwhile to create special models for that. Likewise for arches, where you can combine multiple patches into one ASE model.

Btw:

 

  • Entities - 7779

  • Models - 595

 

Each model is one entity during runtime, so you probably already crossed the 8192 entity limit.

 

Technically, we could double it (I think), but blindly doubling the limit will expose other limits in the engine, like the CM limit. ALso, a lot of operations in the engine assume that there is a small number of entities and will be slower (not much,but they will be slower) if you have a lot of entities.

 

E.g. if the engine wants to get every AI, even if there are only 2 in the map, it will run through the entire entity list. Likewsise trigger_touch entities will compare themselves against every entity, not only the ones that are close and so on. All these things will take a tiny amount of time longer if you double the entity amount. So I'd say try to stay under 8000 for this map.

 

If you need help, I could have a look.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I've looked at the map and talked with Biker and also thought a bit about the limits.

 

The entity limit is posing a real problem - even for a medium-sized map like Bikers (I wouldn't call it large in TDM terms, in Thief terms it's of course massive).

 

Although Biker might have found a emp. workaround with the bottles, the limit might still be reached and the map isn't even finished. The real problem is that the engine treats almost everything as its own entity, even tho you might need it only for simple reasons like "define the position easily in DR". A "full" entity has of course advantages, like you can toggle it on or of, query it, run scripts on it, have scripts refer to it etc. But in some cases it is superflous. Here are a few examples:

  • lights + models. Some of our streetlamps are a light with a visual model (1 entity). Biker often used a light + a model and here the entity def is just a reference to a model. But not in all cases can you combine these two.
  • light haze. These are all particle emitters with a single haze particle. So in some cases you have light + model + haze (3 entities)
  • static models. These are basically just a "place the model x at position xyz" references. The might not need an entity after loading the map anymore. But the engine makes no distinction.
  • location separators (esp. the ones that just set the sound on a portal): I'm not sure if the engine removes them after loading anyway, but if not, that might be something to look into. Larger maps can easily have a few dozend of these and all they basically do is set some parameters on the visportal they touch.
  • Door handles are their own entity, so a standard door is already 2 or 3 entities.
  • It looks like the map uses scritped scenes with blue rooms with entities (I might be wrong,tho). But that also means you have a few hundred entities that are kept after frame #1 and no longer serve a purpose.

Looking at the map, there are almost no single places where you have a massive amount of entities and thus could save a few hundreds in one place (except the wine bottles). Instead its literally dozends of different entities for different things in almost every corner. Sounds, locations, lights, AI paths, haze, moveables, movers and so on.

 

I see a few possibilities here:

  1. Remove unnec. entities after map loading. This might be difficult, because some script could refer to any entity, and then it must be kept. But likely candidates are portal info, difficulty info, shop info, starting inventory (I believe these are already removed). Another difficulty is that removing the entity might not be enough, the entity must not even be spawned - otherwise it uses up one entity slot during frame #1 and the map would still reach the limit. Might not gain enough.
  2. Build more light+model entities, and make the mapper use them. Educating mappers seems to be the issue here. Might not gain enough.
  3. Add the ability of a "haze" to lights. Lights already have the ability to display a model (and a different when off), adding the haze has the advantage that the haze particle could also be turned on/off with the light, a possibility currently not available. Needs a lot of coding support, mappers need to be aware and might not gain enough.
  4. Double the entity limit. Probably the easiers solution. We also should look into the engine code and see if we can identify places where the code loops through all entities and change these to a "loop only through entities of type X". This means also we need to keep a second list(tree) of entities sorted by type. One of these bottlenecks where (are) the trigger_touch, but I'm sure other code places want to look at all lights, and instead inspect every entity until they found all the lights. f.i.This would gain enough to allow bigger maps for a while.
  5. Other complicated schemes involve SEED, more intelligent engine management of entities (combine them in the back, automaticaly), but they are all complicated to code, and depending on the type of map, won't help. I'm pretty sure the next map will be even bigger and involve 10000 moveables and we are back at the beginning again.

 

Edit:

 

The new "blend light" to simulate dropshadows make the situation for 3. worse, they spawn one additional entity for each moveable candle. That change could even theoretically break large maps by adding entities and pushing it over the limit. I think having a better renderer that automatically creates soft shadows and ambient occlusion and light haze would also solve this issue because these elements would not need an entity.

Edited by Tels

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

  1. Double the entity limit. Probably the easiers solution. We also should look into the engine code and see if we can identify places where the code loops through all entities and change these to a "loop only through entities of type X". This means also we need to keep a second list(tree) of entities sorted by type. One of these bottlenecks where (are) the trigger_touch, but I'm sure other code places want to look at all lights, and instead inspect every entity until they found all the lights. f.i.This would gain enough to allow bigger maps for a while.

I vote for this as its been done before, but that said once I have had TDM open for a while with the above map and done a few DMAP runs I occasioanly get a malloc crash whioch on smallers maps I don't. maybe at the same time we make darkmod.exe 64bit native with 32bit legacy mode.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...