|
|
Re: Lots of entities = low frame rate
[Re: Matt_Aufderheide]
#45061
05/10/05 00:46
05/10/05 00:46
|
Joined: Sep 2003
Posts: 3,236 San Diego, CA
Marco_Grubert
Expert
|
Expert
Joined: Sep 2003
Posts: 3,236
San Diego, CA
|
Quote:
Now through lots of optimizations i have managed to get my game running very smoothly. For one thing i made my tree model a group of trees, and placed far fewer.. but this is still annoying.. if an entity isn't visible, and has no action, is passable, and has dynamic off, it shouldn't take any CPU cycles at all should it?
The engine still has to iterate over every entity in order to check whether you have made changes to its state (e.g. changed the passable or polygon flags, set its xyz coordinates etc). Trace also has to check all entities in case you did not specify IGNORE_PASSABLE. I don't know though which function takes up most of the time and causes these slow-downs.
|
|
|
Re: Lots of entities = low frame rate
[Re: jcl]
#45067
05/18/05 05:31
05/18/05 05:31
|
Joined: Jun 2003
Posts: 1,017 Germany
Thomas_Nitschke
Senior Developer
|
Senior Developer
Joined: Jun 2003
Posts: 1,017
Germany
|
JCL, although this sounds quite sensible... It can not excuse the framerate produced by many entities in A6 compared to other engines. Yes, once again someone comparing engines, even at the risk of becoming very unpopular in this place here! Let's have an example. The background-level for my current game project's main menu has got a lot of grass/vegetation models. These have the alpha-test material (->wiki) applied and all of them have actions running. When opening up the control panel via [F11], it shows me: Script exec time: ~1ms Entity render time: ~25ms Ref (I believe this one shows the calc time for the alpha-test): ~0.3ms This is the scene, by the way (please ignore the water shader, as switching it off made a difference of about only 2-3 frames): Here you can see that most of the calculation time is consumed by the entities themselves, not by the alpha-test material or the scripts. Nevertheless I tried to explore this further on. I rewrote my scripts, so that the models don't have any action at all now, the alpha-test material is still in but does nothing but alpha-testing (e.g. no dynamic deformation or sth. similar). So what I finally got is a level with nearly all actions removed, featuring about 500 entities with alpha test and small skins (64x64 and 128x128). Except for the script exec time that changed to ~0.2ms, nothing happended and all those measures brought a plus of one single frame. There must be something wrong there! I'm using a Geforce 4 Ti 4200, which even does the job for, say, Farcry (if you reduce some details), where many many vegetation models are in the view. And I strongly believe this has to be an A6-issue as even making all the grass models use the same texture (mtlSkin1 instead of entSkin1 in the alpha-test effect) brought nothing but one more single frame. Correct me if I'm seriously missing something here, but this sounds very strange to me.
Last edited by The Matrix; 05/18/05 05:36.
Formerly known as The Matrix - ICQ 170408644
I've been here for much longer than most people think. So where's my "Expert" status?
|
|
|
Re: Lots of entities = low frame rate
[Re: DARKLORD]
#45069
05/18/05 08:30
05/18/05 08:30
|
Joined: Oct 2003
Posts: 4,131
Matt_Aufderheide
Expert
|
Expert
Joined: Oct 2003
Posts: 4,131
|
Quote:
Even an entity that is not rendered because it's hidden behind the camera or a wall, can have a small impact on the rendering time because it's bounding box is clipped against the frustrum.
ahh this makes sense.. i didnt think about it.. thnx. So basically if you have a lot of ents, you should make them invisible if they are not on the screen?
|
|
|
|