3 registered members (Akow, TipmyPip, tomaslolo),
788
guests, and 11
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
too many entities = sudden unexpected slowdown
#32972
09/09/04 17:43
09/09/04 17:43
|
Joined: Jan 2003
Posts: 710
Templar
OP
Developer
|
OP
Developer
Joined: Jan 2003
Posts: 710
|
Hi, I have noticed some interesting engine behavior and I would like to know if anyone else experienced this too. I'm using quite a lot entities (models) in my level - over 1300. The level actually uses almost no level geometry at all. I have found out that once entity count gets over a certain number, the fps starts to drop and jerks appear. The first strange thing is that the jerks appear even at fps where the game should run still smoothly (over 60 ), the second strange thing is that this behavior seems to be caused just by the fact that these entities exist - not by their behavior. It doesn't matter if their action is complicated or if there's none. It actually does not matter even if they're currently in the camera view! To put ir straight - if I put 1300 models in my level, without any action and they're out of camera view, fps goes down no matter what actions run or how many polygons are currently visible. Does anyone know why is this happening? T.
|
|
|
Re: too many entities = sudden unexpected slowdown
[Re: Templar]
#32978
09/10/04 00:28
09/10/04 00:28
|
Joined: Oct 2003
Posts: 1,258 Virginia, USA
qwerty823
Senior Developer
|
Senior Developer
Joined: Oct 2003
Posts: 1,258
Virginia, USA
|
While I can't answer for JCL, i think he means next beta (which will eventually make it to the public), but from the 6.30.3 beta.txt section: Code:
time_level Time in ms/frame consumed by level rendering.
time_sky Time in ms/frame consumed by sky rendering.
time_entities Time in ms/frame consumed by entity rendering.
time_effects Time in ms/frame consumed by particle rendering.
time_portals Time in ms/frame consumed by portal/mirror rendering.
time_panels Time in ms/frame consumed by panel rendering.
time_update Time in ms/frame consumed by screen refresh.
time_actions Time in ms/frame consumed by script execution.
time_pfuncs Time in ms/frame consumed by particle functions.
See also: time_physics.
For finding performance problems, the best thing to do is pull up the debug panel (F11, statistics section in the manual), and watch the ms column. When the framerate takes a nosedive, one of those values will go up. See which one it is, and start from there (or post a screenshot or the numbers from it). As to your other question, it all depends. How many polies your entities have, whether they all use the same mesh, texture sizes, their actions, etc, all effect how many you can have. 1300 cubes (12 triangles) with a 64x64 texture, all the same mesh with no real action, would use almost no resources. But 10 models, with 10K tris each, and 1024x1024 texture, all different meshes, and an action that computes PI to 100 digits will use substantial resources.
Never argue with an idiot. They drag you down to their level then beat you with experience
|
|
|
Re: too many entities = sudden unexpected slowdown
[Re: qwerty823]
#32979
09/10/04 01:26
09/10/04 01:26
|
Joined: Jan 2003
Posts: 710
Templar
OP
Developer
|
OP
Developer
Joined: Jan 2003
Posts: 710
|
Thanks for clearing thsi statistics panel thing for me!
Quote:
As to your other question, it all depends. How many polies your entities have, whether they all use the same mesh, texture sizes, their actions, etc, all effect how many you can have.
1300 cubes (12 triangles) with a 64x64 texture, all the same mesh with no real action, would use almost no resources.
But 10 models, with 10K tris each, and 1024x1024 texture, all different meshes, and an action that computes PI to 100 digits will use substantial resources.
Yes, that is true but no matter how complex the models are and how many of them are there, there should be no slowdown as long as they're out of the view and their actions are simple or none, right? ( and as long as there's no texture swapping happening) Why should their existence affect fps in any way when they exist completely elsewhere in the level? Maybe I'm doing something terribly wrong and they are somehow visible to camera ( even when they're obviously out of camera frustum) ....
EDIT: I'll wait and see if I can find out more with the new statistics... Thanks everyone!
|
|
|
Re: too many entities = sudden unexpected slowdown
[Re: Templar]
#32980
09/10/04 02:36
09/10/04 02:36
|
Joined: Oct 2003
Posts: 1,258 Virginia, USA
qwerty823
Senior Developer
|
Senior Developer
Joined: Oct 2003
Posts: 1,258
Virginia, USA
|
Quote:
Yes, that is true but no matter how complex the models are and how many of them are there, there should be no slowdown as long as they're out of the view and their actions are simple or none, right? ( and as long as there's no texture swapping happening) Why should their existence affect fps in any way when they exist completely elsewhere in the level? Maybe I'm doing something terribly wrong and they are somehow visible to camera ( even when they're obviously out of camera frustum) ....
W/o knowing the engine internals, its hard for me to answer this. As I said before, looking at the debug panel to see which value increases is the first step to understanding where the drop occurs. As you've stated, if the objects are indeed being culled, and not sent to the rasterizer, there shouldnt be a drop in fps just from them being there. Post a screenshot of your debug panel if you can, or the ms numbers when your framerate drops.
Never argue with an idiot. They drag you down to their level then beat you with experience
|
|
|
Re: too many entities = sudden unexpected slowdown
[Re: qwerty823]
#32981
09/14/04 02:02
09/14/04 02:02
|
Joined: Sep 2002
Posts: 1,604 Deutschland
ChrisB
Serious User
|
Serious User
Joined: Sep 2002
Posts: 1,604
Deutschland
|
I noticed an also strange fps drop. On my level all entitys are ent_created. I use a code which calculate every frame a new universal scale (nothing special, only one line). Every entity has an action which updates his own my.scale with the univeral scale every frame (the level looks much bigger with this trick ). But this process kills my fps!!!! It runs nearly smooth without this code (setting the universall scale to 1), but with the calculation its unplayable. The calculation of the scale its not the problem, but the update of entity scales. So my question: How fast is my.scale_x=value;???? Note: every frame for 500+ entitys ChrisB
|
|
|
|