View Full Version : v0rt3x21 - Thousands of calculations, increase FPS?
Deathspike
10-03-2008, 23:13
The Goal
Smart system of rendering entities (players, grenades and more) resulting in increased FPS.
The Concept
Each entity in the Q3-engined platform is rendered whenever the data has been received on the client side. This is quite dependent on the mappers abilities to effectively use area portals; but then they are still limited. Generally, all the rooms without doors or opened doors are connected and entities are "visible" to each player, meaning they are rendered.
An obvious example would be using force sight, often you could even see from the DOTF main hall people standing on catwalk, if the large blast doors were opened. The concept it to add checks on each addition of an entity based upon the players view and position, as well as the enemies position.
First, the entity is checked based upon the player's FOV (Field of View) - if he's not in it, why render it? If force seeing is off, can we actually see this player? Why add a bunch of models when we can't even see him/it? Like this, some performance issues might be realized. It doesn't have to be only for MBII (or even JKA), but will mainly be focused upon special needs of this specific mod.
The Proof
Smart Entities, as the Proof of Concept is called, referenced as SE. Wallhack, a helper function to visually show engine functions, referenced as WH. Here are the screenshots taken from a random loaded JA+ server (What better place to find people to screenshot? They dont move!).
SE: Enabled, WH Enabled
[/URL]
SE: Disabled, WH Enabled
(http://imageshack.us)
SE: Enabled, WH Disabled
SE: Disabled, WH Disabled
[URL=http://imageshack.us] (http://imageshack.us)
The Conclusion
As we can clearly see from the images, the FPS drops drastically when the SE is disabled. Or better said, the FPS improves drastically when SE is enabled! To perform some math on each player will result in an average ~1 FPS increase when everyone (24+ people) is in your sights, due to the calculations required. To gain this kind of improvement for such small FPS on an impossible situation, i'd say this is going to be perfected (proof of concepts are never perfect) and implemented into the upcoming MB2 release.
Hope you like it, enjoy the shots and drool for its implementation!
Azuvector
10-03-2008, 23:18
Random out of the blue stuff. I'd kind've hope you're accounting for things like projected effects, and the audio component of having info about nonvisible players. As well as the potential impact of possibly not loading player model info until it begins to be drawn; conveniently when someone jumps out into your face and such.
Personally I'd rather just trust the engine to do such things, but if you think you can do it better....
Deathspike
10-03-2008, 23:28
Sounds are a separate issue from the actual rendering of a player model, check the events on how they work specifically (or think of Mind Tricking Jedi, still able to hear them - similar technique is applied). For things such as jumping out and shooting to the range of lightsaber glows around a corner, that wasn't accounted for as this is just a proof of concept. However, thats why i wrote down it has to be perfected to deal with such cases (and of course, allow sense).
Azuvector
11-03-2008, 00:22
I'm aware of how sound events work. :P There's also sounds triggered via animations and such though, which need data, since they can potentially depend upon the model in use. (See animsounds.cfg and animevents.cfg for examples of this.)
Plus there are things like dynamic light sources(muzzleflashes) and similar things, like lightsaber effects or models bolted to player models that might project into view from around a corner, etc...
*edit*
There's also the potential of different bottlenecks on different systems. Increasing the CPU load with these checks of yours may actually decrease framerates in systems that would otherwise be fine with rendering the nonvisible stuff.
Also, just as a minor point: Random new stuff should be at least mentioned to the rest of the team before being publicized to the community writ large. (Which is of course a reason for this particular section in the private forums(And not like I'm really one to complain about surprise new features.), but it would've been nice to hear something about this at some point. :P)
Deathspike
11-03-2008, 00:34
Animations are stopped in no way, however the actually rendering is the only thing that gets stopped. Meaning, taunts and such will still be heard. Muzzles are also unaffected by this technique (hence i love it so much already) since this data will never be stopped either, and effects are played as normal. The only thing that is gone is the light saber, but i haven't tried properly with dynamic light sources - i believe that ran trough a different function but i can't be sure until i test it. This is exactly why i like this technique.
As for CPU bottlenecks, i truly doubt it'll happen. The only problem that persists is the graphic load, which is far more extensive then simple CPU instructions. Also please note that "thousands" is a calculated average of 32 players all in perfect view, running at 60+ FPS. It will never reach thousands and will not even reach 1% of the load created in a normal CPU-processed player.
DarthNormaN
11-03-2008, 01:41
that feature is badly needed i'd say since people complain about fps problems because of their old pcs ^^ but this one here sounds really promising :)
MaceCrusherMadunusus
11-03-2008, 02:16
Indeed, the FPS increase looks huge comparing it to my fixing of the VIS work on DOTF, but each little bit helps of course. I'd like to see this if we can :P less wall hackers, and more FPS :D
So this would make wallhacks pretty useless in general?
AceVentura
11-03-2008, 21:45
So this would make wallhacks pretty useless in general?yeah. poor wh's
Emiel Regis
11-03-2008, 23:50
yeah. poor wh's
Well, until time when as proficient h4xx0r as Vortex comes to idea that intercepting system calls can be fun :p
Wildebeest
12-03-2008, 18:32
Well, until time when as proficient h4xx0r as Vortex comes to idea that intercepting system calls can be fun :p
That's why we have the anti-cheat that detects when something is trying to intercept such things. :P
Wow, that's almost a doubleing of the FPS. Nice. I wish something like that could be done to fix Dynamic Glow's monster FPS drain.
Shadriss
12-03-2008, 18:54
Out of the blue indeed... but like many such out of the blue announcements (*shoots a look at Azu*) this one is, indeed, exciting.
Keep up the good work.
Yes, please do. :p
Just wondering, would this mean that all hinting and APing would become obsolete?
Juggernut
13-03-2008, 00:53
Well, I dont think that this affects on the map itself. And that has polys too.
AceVentura
13-03-2008, 00:56
Just wondering, would this mean that all hinting and APing would become obsolete?no, it doesn't means that at all.
hawk..depends wot card u got..8 series nvidia dont support it anymore altho that optimizer thinga majig worked for some people. But if u dont then its your card lol..i had a 5500 FX which ran DG with only 10 less fps then without
Just wondering, would this mean that all hinting and APing would become obsolete?
It only hides entities I think so you would still have to hint and AP so that parts of the map arn't being drawn.
Deathspike
13-03-2008, 17:40
hawk..depends wot card u got..8 series nvidia dont support it anymore altho that optimizer thinga majig worked for some people. But if u dont then its your card lol..i had a 5500 FX which ran DG with only 10 less fps then without
It doesn't rely on any card; it works for everything. You'd be able to run on DG with more FPS after applying this technique to your game, its still in the progress being perfected tho - after which internal beta testers will validate the performance boost.
It only hides entities I think so you would still have to hint and AP so that parts of the map arn't being drawn.
Indeed, and it only hides player entities for the moment. The FPS gain from map objects just isn't worth the effort, its a more negative then positive effect (until i think up of a way to do that; anyway..). Hint and area portals do indeed hide parts of the map and is very important, this technique is just a supplemental of your efforts to gain even more FPS.
DarthNormaN
14-03-2008, 18:45
Indeed, and it only hides player entities for the moment. The FPS gain from map objects just isn't worth the effort, its a more negative then positive effect.
hm okay but what about effects?
Deathspike
14-03-2008, 19:13
That would be the next step, map objects and effects. However, tracing back effects is a hard job to do since there are so many and it isn't always an FPS gain. Most likely, i'm going to trace their position only to my FOV, not if i can actually see them. Either way, thats the next step - for now, player Smart Entities will go into beta.
I couldn't quite pick up some stuff, but you were testing this on a random JA+
server?
That means it's client-side and can be used on ANY SERVER?
That would be the next step, map objects and effects. However, tracing back effects is a hard job to do since there are so many and it isn't always an FPS gain. Most likely, i'm going to trace their position only to my FOV, not if i can actually see them. Either way, thats the next step - for now, player Smart Entities will go into beta.I think he meant map efx.. like smoke and stuff.. and impact efx.. those can really be FPS hoggs.. especially with enhancedefx on full..
Deathspike
15-03-2008, 12:57
I couldn't quite pick up some stuff, but you were testing this on a random JA+
server?
That means it's client-side and can be used on ANY SERVER?
Exactly. I'll release a stand-alone to be used on any server once RC2 is out. MovieBattles will incorporate it automatically, but you should be able to profit from it on JA+ (among others) as well.
I think he meant map efx.. like smoke and stuff.. and impact efx.. those can really be FPS hoggs.. especially with enhancedefx on full..
Ah yes.. thats actually a good one, didn't think of that one yet. I'll try to figure something out for that (Probably letting the shot continue and tracing to see if you can see the mark, e.g. the hit effect with smoke and stuff).
It'll be great, right? I mean, lately, my FPS has been pissing me off so I kinda stopped playing. YAY FOR FPS!
It'll be great, right? I mean, lately, my FPS has been pissing me off so I kinda stopped playing. YAY FOR FPS!
Indeed, better fps is always good. Hope it won't bug the game tho.
-=Amit=-
25-03-2008, 14:29
Good idea, as long as it doesn't bug sense :p
Indeed, better fps is always good. Hope it won't bug the game tho.
Good idea, as long as it doesn't bug sense :p
Lol...
One step forward then Two Back
Powered by vBulletin™ Version 4.0.0 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.