|82 posts found|
11/20/12 11:10:41 AM#81
Originally posted by Karteli
You may not realize this, but you're basically saying that EA is using all of the graphics optimization methods that are available. They may or may not be using them well, but there aren't any obvious fixes that they're ignoring. Let's break it down.
1) Not drawing some things on the screen. Every game engine has to do a hefty dose of this unless it's a very, very small game world. Think "Asteroids" small, not "only one zone" small. Probably the simplest is "that's too far away, so we're not going to draw it"--or perhaps rather, not even going to load it into memory until it gets closer.
Sometimes saying, "we're not going to draw that" is more problematic than others. The best time to do it is for things that wouldn't have appeared on the screen anyway. If you can determine that a particular object isn't going to be on the screen that particular frame, then you can just ignore it and move on to the next, rather than passing it on to the rendering thread, which would have to switch to the right program (actually, you can usually get around this one by collating objects that use the same program), texture(s), and vertex data, upload the uniforms, run the vertex shaders, clip each triangle separately, observe that one of the six clipping planes completely killed the entire triangle so that nothing makes it to the pixel shader, and then not draw anything. It's impractical to always determine whether an object will appear on the screen without trying to draw it and see what happens. But if something is way off to the side or behind the camera or whatever, you can detect that and skip it.
But sometimes, there's still too much to draw in a single frame, and that's going to kill your performance. Trying to draw 50 characters at once, each of which is animated and has customized his looks (different textures for all, and likely different vertex data, too) is necessarily a ton of work, and that means a huge performance hit. You can sort and say, we're going to cap the number we draw in a given frame and only draw the closest ones, and sometimes you have to do that in order to get acceptable performance. Yes, it does look bad when nearby characters are disappearing and reappearing, but when there's too much to draw, there aren't always good alternatives.
2) Customizing the game engine. You're making a big deal about how EA started with a beta version of the Hero Engine, then changed it so that it's not the officially supported version anymore. But if they had started with the latest version, they'd still have had to change it so that it's not the officially supported version anymore. Off-the-shelf graphics engines are built to do certain things, and to do them in certain ways. It never exactly coincides with what you want to do in your game.
For that matter, even if the graphics engine was built for your particular game (Hero's Journey, in this case), as you actually build the game, you'll inevitably discover that you need some things you hadn't planned for, and that you're not using some things that you had built in. And if the graphics engine wasn't built specifically for your particular game, you'll probably come up with even more examples of both.
So what do you do about it? You modify the game engine, of course. If you discover that you need the capability to do something that the engine doesn't already support, the best option is to modify the engine to support it. At that point, it's no longer the standard, officially-supported version of the Hero Engine, but that's okay--and necessary, even.
One alternative is to try to cram what you want into the way the engine wants to do things, but this is highly inefficient. It's something akin to eating soup with a fork. The other alternative is to simply not do what you need to do for your game, i.e., chop out features that you were planning on adding. You'll sometimes need to do this anyway as things turn out to be impractical to implement, but you'll have to do a lot more of it if you're not going to customize the game engine.
On the other side, if the game engine supports things that you're not going to use, then you want to cut them out. On the processor side, it's often not that big of a deal if some code goes unused. But pixel shaders need to run hundreds of millions of times per second. If your pixel shader takes a microsecond longer to run than it "should", then you have a big, big problem. (I'm glossing over details of how a graphics card will have many copies of the same pixel shader running simultaneously on different data, but you get the point.) You have to go through it operation by operation (line by line is too coarse here) and make sure that it's as efficient as you can possibly make it. If there's functionality that you're not using and not going to use, then chop it out.
3) Breaking things into zones. This is really just a more efficient way of structuring your data. This doesn't only mean different planets in SWTOR, but also different zones within planets. It's highly probable that the game world is broken into zones in several different ways that are mostly invisible to players--and not necessarily that one subdivision is a refinement of another.
For example, in order to load the entire game into video memory all at once would surely take at least tens of gigabytes of video memory, and likely hundreds of gigabytes. So how does the game engine decide what to load? Well, it loads the stuff that is near you, of course. But how does it decide what is near you? It could check every single object in the game, determine how close you are to it, and then load it if you're close enough. But that would take too long.
Instead, the data is broken into zones that are never drawn on your screen. You're in some particular zone, and several other zones are near enough that the game might conceivably need to load stuff from them. It checks everything in those few zones, but skips the other hundreds or thousands of zones that are too far away. It's much quicker to check a zone once and determine that it's too far away than to loop through every single object in the zone and determine that each particular object is too far away to be loaded.
Or for another example, let's suppose that a mob somewhere in the game world attacks. The server has to determine which players will be informed of this. Informing every player every single time anything in the game world moves is impractical for bandwidth reasons. For the server to cycle through every single player online and check whether they're near enough would work, but would bring an unnecessary performance hit. So it breaks the game world into zones and only checks players in the zone that the mob is in and a few other zones nearby. Some players who are in such zones may still not be notified of the attack, but the idea of zones is that you can very quickly eliminate 99%+ of the players from needing to know, and only do more detailed processing on a few.
And more to the point, the zones for checking what texture and vertex data to load into video memory probably aren't the same zones as for checking which players need to be notified that a mob has attacked. There can be a number of other purposes for which players are divided into zones, too.
4) Drawing objects faster. Ideally, if you can find a way to compute exactly the same finished screen in less time, you do. But there's only so much of this available. Sometimes, you have to ease the load by making it simpler for the video card to draw a given object. This can mean lower resolution textures, and SWTOR famously had a big dust-up over this. It can mean fewer vertices in your models. It can mean reusing programs and textures and vertex data more, so that you can collate things and have to switch data less often. It can mean chopping out some graphical effects entirely, especially computationally expensive things such as shadows.
Ideally, you give players some graphical options to allow them to turn settings up or down themselves. That way, people with the hardware to handle it can get the full graphical effects, while people who don't have it can turn settings down and still make the game playable. But it does sometimes take some additional work to make sure that your code is optimized both for having settings on and having them off, as it doesn't do any good if turning graphical settings off doesn't ease the load on hardware. And, by the way, that's optimization work that you may not be able to do if you're using the standard game engine and not customizing things yourself.
So what's the point of this? Most of the claims of "SWTOR has a bad graphics engine because of X" on this thread are completely spurious. It's like claiming that it's cold today because the sun rises in the east. Maybe it is cold today, and maybe the sun does rise in the east, but it's not cold today because the sun rises in the east.
In particular, that EA customized the game engine rather than using the bog-standard Hero Engine is a good thing, not a bad thing. If they hadn't, then you could claim--correctly--that it was a bad graphics engine for the game because it wasn't customized for the game in question.
Furthermore, optimizations of the sort that you describe aren't "tucking all the internal graphics engine issues under the rug". They're the stuff that graphical improvements are made of.
The thing that you need to understand about 3D graphics is that it's all completely fake. The way that the graphics work internally does not correspond to anything in the real world. It's really just a quest to make something that looks nice and lets the player feel like he can control what is going on, while drawing it as fast as possible. Any movement in that direction constitutes making the graphics engine better, not "tucking things under the rug".
11/20/12 11:58:21 AM#82
The graphics engine is alright, it's about on par with a game from 2008 or so. The backend engine on the other hand is terrible, HeroEngine wasn't finished when Bioware bought it and shortly after Bioware obtained it, the engine was stated to be designed for free2play games. Things like this makes you go "hmmm....", almost as if Bioware planned this game to go F2P on purpose.