View Full Version : Too many physics props, causing missing models
HellaLouYaah
02-01-2011, 12:09 PM
The problem is that I have too many prop_physics in my map, and it's causing one of my own models to not show up(parented to func_door/move or rotating), yet they are there and can be interacted with. Sometimes, depending on what I have hidden for that test, it is replaced by random brush entites(triggers or func_breakables) that are elsewhere in the map.
Sometimes even stock models get replaced. I know the issue is phys props because I've tested extensively. Though it's not just them in general, because if I remove most of them but leave some, and that fixes it.
I really dont have that many, so I'm not sure what the issue is with the number. I have ~200 on the map, and if I remove >120, the problem goes away. It's not a particular prop, because I've removed different ones in different areas.
Anyone else had this problem with phys prop numbers, and missing/invisible models? Could it be a hardware thing? I have a decent computer.
zapwizard
02-01-2011, 01:43 PM
This limit was very tough to work around when making Fan Feast. I hit the limit at least four times making the map and constantly had to cut back on little dynamic details. I had some of the same symptoms you mentioned.
The limit isn't just on prop_physics. It is on any dynamic entity. That means physics props, dynamic lights, doors, breakable objects, in-game NPCs, the actual survivors, particles, sounds, ropes and more. Basically anything that can move, or be turned on and off dynamically. All add to the total count.
It is not a hardware limit, I was making my map on a SLI, 6-core, 64-bit, 16GB system. It is a pure game engine limit and is a rather small limit these days, just a sign of the Source engine showing its age.
Custom mappers typically use more dynamic props then valve does in their maps. Valve spreads around lots of physics props, but they typically don't mess with dynamic props except in important areas such as crescendo events.
HellaLouYaah
02-01-2011, 02:11 PM
So all the good things have limits? Yeah, should of figured.
That does make sense, since I have many dynamic_props, named entities, some ropes, particles, etc., compared to a valve map.
Thanks for the conformation, I think I usually run into this problem, and it breaks my maps. I remember Crysis sucked at rendering brushes, and that kiboshed that. I wonder if/when source engine 2 will be out... we need it, baaad...
ThaiGrocer
02-01-2011, 06:03 PM
This topic on engine limits is really interesting and I thank you guys for bringing it up.
What's quick way to tell that we've reached our limit for dynamic entities? For example, is there some warning I can find in the compile log, debugging tool, or do I have to look for missing things while in-game? Maybe I can add up a the number of certain entities and see how it compares to official maps and push the limits from that? http://developer.valvesoftware.com/wiki/Dissection_of_Official_L4D2_Campaigns
It's curious that the largest number of prop_physics was 594 in Dark Carnival,.
Keldorn
02-01-2011, 06:35 PM
The limit isn't just on prop_physics. It is on any dynamic entity.
Like the issue if you put too many func_breakables some of them stop working and the zombies can't break them anymore.
HellaLouYaah
02-01-2011, 08:53 PM
The weird thing is I'm pretty sure I haven't went over any of the individual maximums per entity type from the valve ones, and definitely not over 594 prop_physics like in dark carnival. I wonder if there is a compile parameter they use to overcome the limits.
In fact, I just checked and not including func_details(644), I have 2350 entities, 737 not including prop_static, and 284 prop_physics.
zapwizard
02-02-2011, 08:07 AM
I haven't been able to get a hard number on the maximum number of dynamic objects in a map. If anyone know how please speak up.
Currently I just add up the numbers on items I do know and try to keep it in check.
However be aware that in-game generated dynamic objects also count, for example break a func_breakable, and there will be a dozen or new dynamic objects for the shards a few seconds until they are removed from the game. This is why the effects of this limit can be hard to pin down. A door might work one time, then you break a few windows, and for some reason that door doesn't work anymore because its entity was somehow pushed out of memory.
advarp
02-02-2011, 06:13 PM
I hit the limit too... and I posted a thread asking how I could gradually spawn entities... the hard truth is I guess.. you can't.
All entities are there when the maps starts - and especially REstarts. I only had a prob when the maps restarted after - say in coop mode - the team had been killed... This is why I only realised the prob when I was approx 40 entities over the limit..
Renaming the entities to shorter names, grouping entities using same name did not make a difference. Turning off lights to start with, etc etc - I looked up all advice to 'free up' space - no joy. Simply put, I had to DELETE some entities. I mean of crs NAMED entities of all sorts, physics and dynamics. Even deleting entities that had the same name as others helped. Deleting unnamed entities made no difference. I just went by trial and error and eventually came under the 'threshold'. I believe this is not a fixed number as there may be other factors.. However I wanted my maps to work in survival / versus as well - all these entities you spawn using point_template - they are still there even if the gamemode is coop and not survival for example... So even making point_templates in the hope they will not be spawned until later did not work - which really sucks, but this is what we have to work with now I guess...
I still kill most entities I don't need after an event - but this is more out of coding 'best practice' - I do not believe any space is freed up actually. Re explosions - I make all shards / concrete pieces etc live only 8-12 secs, then forcibly remove them...again hoping to free up stuff...
Would have been so nice to be able to spawn stuff (as in creating entities!) as players go along, even if this looked weird in versus from infected viewpoint - if you played vs in L4d2 maps you will see that as an infdected, the CI/SI spawn in pl;ain sight and fires start out of nothing as well so in versus really the emphasis is on gameplay not perfect effects...
HellaLouYaah
02-02-2011, 06:35 PM
One thing I did was change all my func_ladders to func_details, and that helped a lot I think. I'm not sure if that affects anything, but they still worked for me.
Acermors
02-02-2011, 07:42 PM
One thing I did was change all my func_ladders to func_details, and that helped a lot I think. I'm not sure if that affects anything, but they still worked for me.
Be careful with that. Last time I tried making ladders func_brush--sorta similar to func_detail, in some ways I guess--Survivors were able to climb Infected-only ladders.
Oilcake
02-12-2011, 01:17 PM
Hmmm, good discussion, guys. I've never hit this limit, though I think it might be close in the first map of the campaign I'm working on. Reading this makes me want to keep it that way! ;)
advarp
02-13-2011, 01:14 AM
Sofar I have only had probs with named point entities. Removing them eliminated the problem. Even removing copies of entities (i.e. entities with same name) helped!
Apparently scavenge / swap team is the most demanding, then coop / death of player, then coop / start, then versus... I haven't tried true versus (ie with human players connecting) tho.
I write this because I had a map crashing (alloc) on coop start. I eliminated some entities, then it kept crashing on coop restart (after team members died). Eliminating more entities fixed that too - but I tried scavenge and at 2nd round start... crash. Deletedd some more entitiers... fingers crossed.
So people, test in all game modes you design your maps for...
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.