Jump to content
The Dark Mod Forums

Brush limit for TDM.


Bikerdude

Recommended Posts

Following on from nbohr1more's comment -

Where did you get 14k as the brush limit? If that's confirmed in testing then we should add it to the limits wiki.

I found that figure after several days work & testing on the very large city map, when the map hit 33k it would instantly crash to desktop with malloc errors. had to get it down to 15k before it would stop crashing.

 

As Goldwell pointed out I have created other large maps that have gotten close to 33k but they were fine, so as Obs pointed out the conclusion is that the engine is splitting brushes at compile time exponentially increasing the number of brushes.

Edited by Bikerdude
Link to comment
Share on other sites

I wasn't able to find any specified limit in the code, so I would guess that the issue is only system dependent. Maybe the computer simple runs out of memory when dealing with that many primitives. Another explanation could be the following. All primitives are indexed with an integer. If the number grows too high you get an overflow (not sure on the name, been a while) and you restart with negative numbers. I am almost sure though that the limit is way higher with integers.

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

Is the limit really 14,000 brushes?

 

I've never heard of a brush limit, I looked through my release folders and found a few released maps with higher brush counts that aren't crashing:

 

Behind Closed Doors: 26,273 brushes

A House of Locked Secrets: 24,930 brushes

Penny Dreadful 3: 19,923 brushes

Requiem: 18,134 brushes

 

Even my current WIP has over 15 thousand brushes and doesn't crash.

Link to comment
Share on other sites

Another aspect that may play a role here might be the amount of intersections between the brushes and patches. They split up each other. Also, why are we talking about brushes only? It appears odd to me that there should be a limiting factor applied to brushes that isn't affected by the amount of patches used.

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

Another aspect that may play a role here might be the amount of intersections between the brushes and patches. They split up each other. Also, why are we talking about brushes only? It appears odd to me that there should be a limiting factor applied to brushes that isn't affected by the amount of patches used.

 

The only limit i've ever known about was the 7k entity limit. I've seen maps with as many as 10k patches, however that's quite rare as most maps have only a few thousand patches, usually under 5k.

Link to comment
Share on other sites

Behind Closed Doors: 26,273 brushes

Well spotted, it never occurred to me that these maps would be that big

Another aspect that may play a role here might be the amount of intersections between the brushes and patches. They split up each other.

Hmm, that could be whats happening in my case then - how do we check to see what the final brush count is at map runtime..?

Edited by Bikerdude
Link to comment
Share on other sites

doom 3 turns all brushes into flat surfaces, so a box in darkradiant becomes 6 flat surfaces when run in the engine, if a side has caulk on it, or nodraw, then it becomes 5 flat surfaces. eg visportals in darkradiant are a cube but in the engine its one flat surface.

Link to comment
Share on other sites

You are all talking about the number of brushes, but from my experience it is also related to the size of rooms - i.e. if you have a room 30k/30k in diameter it will run ok, but if enlarged to 50k it will start crashing (And it is not related to AI path finding - there wasn't any in area).

S2wtMNl.gif

Link to comment
Share on other sites

You are all talking about the number of brushes, but from my experience it is also related to the size of rooms - i.e. if you have a room 30k/30k in diameter it will run ok, but if enlarged to 50k it will start crashing (And it is not related to AI path finding - there wasn't any in area).

How would I tell how big in diameter a map is, to see if it s that causing the issue for me atleast

Link to comment
Share on other sites

The splitting doesn't increase the brush count. Brushes are used as an intermediate representation for the map to be used in the editor. The engine works with BSP leafs and the tris contained there. So the splitting generates tris. I am not sure whether a high overall tris count could really cause a crash, as tris are rather small objects (the amount of data required to represent them is rather small) and you really would need a huge amount of tris to fill your main memory. You could compare the size of the cm and proc files to the ones in the fms mentioned above, though and check whether they are extraordinary high.

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

You could compare the size of the cm and proc files to the ones in the fms mentioned above, though and check whether they are extraordinary high.

BCD -

  • Cm - 78,961
  • proc - 85,695
  • Map - 46,159

SH WIP -

  • Cm - 67,720
  • Proc - 60,460
  • Map - 41,973

The SH Wip is small across the board, yet crashes on compile. its only when I got this map down to 15k brushes it stopped crashing <_<

Edited by Bikerdude
Link to comment
Share on other sites

wip SotL:

 

cm - 141,299

proc - 118,434

map - 68,035

 

packed map - 120,061

 

This version is playable but crashes if I just load saved game, but not if I start a new game and THEN load a save.

In attempts of optimising it came out that turning brush/patch func_static into .ase models cause even worse effects, precisely in dmaping crashing.

Edited by ERH+

S2wtMNl.gif

Link to comment
Share on other sites

In attempts of optimising it came out that turning brush/patch func_static into .ase models cause even worse effects, precisely in dmaping crashing.

Im not surprised the map is crashing, its the largest one to date.

 

You can use the export to model function of DR 2.5.0, to get the numbers down (it noticeably reduce brush and entity count on my SH wip). Just don't do it on cylindrical models, as the export function remove the smoothing.

Edited by Bikerdude
Link to comment
Share on other sites

Im not surprised the map is crashing, its the large one to date.

 

You can use the export to model function of DR 2.5.0, to get the numbers down (it noticeably reduce brush and entity count on my SH wip). Just don't do it on cylindrical models, as the export function remove the smoothing.

You are not paying attention, I said brush-based f_s work better than .ase .

From the other side - same model in .ase format weighs 800 and in .iobj 109?? That sounds promising...

S2wtMNl.gif

Link to comment
Share on other sites

I added entries about: MAX_SHADOW_VERTS and MAX_SHADOW_TRIS to the wiki.

 

It's unclear what they are limiting but it seems to be the number of shadow tris or verts a single model

can have when Dmapped.

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 vertices and tris the shadow frustrums contain of are stored in arrays of constant size. Those sizes are defined by those constants (and are fairly large). However, as I read the code overstepping those boundaries would cause the game to throw an error informing the user about the fact that those boundaries have been exceeded. So I guess it is unlikely that these are causing any issues.

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

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...