Valve Hardware Day 2006 - Multithreaded Edition
by Jarred Walton on November 7, 2006 6:00 AM EST- Posted in
- Trade Shows
The Future of Gaming?
The first thing that Valve had to do was look at the threading models available: how can they distribute work to the cores? Having decided on hybrid threading, the next step was to decide what sort of software tools were needed, and to create those tools as necessary. Most of that work should now be done or nearing completion, so the big question is with the threading in place, how are they going to apply the power available? Up to this point we have primarily been concerned with what multithreading is and how Valve has attempted to implement the technology. All this talk about multi-core support sounds good, but without a compelling need for the technology it really isn't going to mean much to most people.
We've already seen quite a few games that are almost entirely GPU bound, so some might argue that the GPU needs to get faster before we even worry about the CPU. As Valve sees things, however, the era of pretty visuals is coming to an end. We have now reached the point where in terms of graphics most people are more than satisfied with what they see. Games like Oblivion look great, but it's still very easy to tell that you're not in a real world. This does not mean that better graphics are not important, but Valve is now interested in taking a look at the rest of the story and what can be done beyond graphics. Valve also feels that their Source engine has traditionally been more CPU limited anyway, so they were very interested in techniques that would allow them to improve CPU performance.
Before we get to the stuff beyond graphics, though, let's take a quick look at what's being done to improve graphics. The hybrid threading approach to the rendering process can be thought of as follows:
At present, everything up to drawing in the rendering pipeline is essentially CPU bound, and even the drawing process can be at least partially CPU bound with tasks such as generating dynamic vertex buffers. The second image above shows the revised pipeline and how you might approach it. For example, spending CPU time building the vertex buffer makes the GPU more efficient, so even in cases where you are mostly GPU limited you can still improve performance by using additional CPU power. Another item related to graphics is the animations and bone transformations that need to be done prior to rendering a scene. Bone transforms can be very time consuming, and as you add more creatures the CPU limitations become more and more prevalent. One of the solutions is to simply cheat, either by reducing the complexity of the animations, cloning one model repeatedly, or by other methods; but with more processor power it becomes possible to actually do full calculations on more units.
A specific Half-Life example that was given is that you might have a scene with 200 Combine soldiers standing in rank, and the animations for that many units requires a huge chunk of time. All of the bone transformations can be done in parallel, so more CPU power available can directly equate to having more entities on screen at the same time.
With more computational power available to do animations, the immersiveness of the game world can also be improved. Right now, the amount of interaction that most creatures have with the environment is relatively limited. If you think about the way people move through the real world, they are constantly bumping into other objects or touching other objects and people. While this would be largely a visual effect, the animations could be improved to show people actually interacting with the environment, so to an onlooker someone running around the side of a house might actually reach out their hand and grab the wall as they turn the corner. Similarly, a sniper lying prone on the top of a hill could actually show their body adjusting to the curvature of the ground rather than simply being a standard "flat" prone position. Two characters running past each other could even bump and react realistically, with arms and bodies being nudged to the side instead of mysteriously gliding past each other.
One final visual aspect that CPU power can influence is the rendering of particle systems. Valve has given us a benchmark that runs through several particle system environments, and we will provide results for the benchmark later. How real world the benchmark is remains to be seen, as it is more of a technology demonstration at present, but the performance increases are dramatic. Not being expert programmers, we also can't say for sure how much of the work that they are doing on the CPU could actually be done elsewhere more efficiently.
Besides the benchmark, though, particle systems can be used to more realistically simulate things like flames and water. Imagine a scene where a campfire gets extinguished by real dynamically generated rain rather than as a canned animation: you could actually see small puffs of smoke and water as individual drops hit the fire, and you might even be able to kick the smoldering embers and watch individual sparks scatter around on the ground. The goal is to create a more immersive world, and the more realistic things look and behave, the more believable the environment. Is all of this necessary? Perhaps not with conventional games that we're used to, but certainly it should open up new gameplay mechanics and that's rarely a bad thing.
The first thing that Valve had to do was look at the threading models available: how can they distribute work to the cores? Having decided on hybrid threading, the next step was to decide what sort of software tools were needed, and to create those tools as necessary. Most of that work should now be done or nearing completion, so the big question is with the threading in place, how are they going to apply the power available? Up to this point we have primarily been concerned with what multithreading is and how Valve has attempted to implement the technology. All this talk about multi-core support sounds good, but without a compelling need for the technology it really isn't going to mean much to most people.
We've already seen quite a few games that are almost entirely GPU bound, so some might argue that the GPU needs to get faster before we even worry about the CPU. As Valve sees things, however, the era of pretty visuals is coming to an end. We have now reached the point where in terms of graphics most people are more than satisfied with what they see. Games like Oblivion look great, but it's still very easy to tell that you're not in a real world. This does not mean that better graphics are not important, but Valve is now interested in taking a look at the rest of the story and what can be done beyond graphics. Valve also feels that their Source engine has traditionally been more CPU limited anyway, so they were very interested in techniques that would allow them to improve CPU performance.
Before we get to the stuff beyond graphics, though, let's take a quick look at what's being done to improve graphics. The hybrid threading approach to the rendering process can be thought of as follows:
At present, everything up to drawing in the rendering pipeline is essentially CPU bound, and even the drawing process can be at least partially CPU bound with tasks such as generating dynamic vertex buffers. The second image above shows the revised pipeline and how you might approach it. For example, spending CPU time building the vertex buffer makes the GPU more efficient, so even in cases where you are mostly GPU limited you can still improve performance by using additional CPU power. Another item related to graphics is the animations and bone transformations that need to be done prior to rendering a scene. Bone transforms can be very time consuming, and as you add more creatures the CPU limitations become more and more prevalent. One of the solutions is to simply cheat, either by reducing the complexity of the animations, cloning one model repeatedly, or by other methods; but with more processor power it becomes possible to actually do full calculations on more units.
A specific Half-Life example that was given is that you might have a scene with 200 Combine soldiers standing in rank, and the animations for that many units requires a huge chunk of time. All of the bone transformations can be done in parallel, so more CPU power available can directly equate to having more entities on screen at the same time.
With more computational power available to do animations, the immersiveness of the game world can also be improved. Right now, the amount of interaction that most creatures have with the environment is relatively limited. If you think about the way people move through the real world, they are constantly bumping into other objects or touching other objects and people. While this would be largely a visual effect, the animations could be improved to show people actually interacting with the environment, so to an onlooker someone running around the side of a house might actually reach out their hand and grab the wall as they turn the corner. Similarly, a sniper lying prone on the top of a hill could actually show their body adjusting to the curvature of the ground rather than simply being a standard "flat" prone position. Two characters running past each other could even bump and react realistically, with arms and bodies being nudged to the side instead of mysteriously gliding past each other.
Click to enlarge |
One final visual aspect that CPU power can influence is the rendering of particle systems. Valve has given us a benchmark that runs through several particle system environments, and we will provide results for the benchmark later. How real world the benchmark is remains to be seen, as it is more of a technology demonstration at present, but the performance increases are dramatic. Not being expert programmers, we also can't say for sure how much of the work that they are doing on the CPU could actually be done elsewhere more efficiently.
Besides the benchmark, though, particle systems can be used to more realistically simulate things like flames and water. Imagine a scene where a campfire gets extinguished by real dynamically generated rain rather than as a canned animation: you could actually see small puffs of smoke and water as individual drops hit the fire, and you might even be able to kick the smoldering embers and watch individual sparks scatter around on the ground. The goal is to create a more immersive world, and the more realistic things look and behave, the more believable the environment. Is all of this necessary? Perhaps not with conventional games that we're used to, but certainly it should open up new gameplay mechanics and that's rarely a bad thing.
55 Comments
View All Comments
primer - Tuesday, November 7, 2006 - link
it's a nice article. i'm anxious to see what develops out of Valve in the near future.how about using some Athlon FX, Opteron 100/1200 series or higher speed Athlon X2s for crying out loud. i know that here is a performance gap even with the higher AMD models currently, but please show us an attempt at not being as one-sided.
jm20 - Tuesday, November 7, 2006 - link
The tests at 2.0 and 2.4 Ghz for the AMD chips are there, you can plot how it 'should' improve. Here are my scaling projections based on the data given for the 939 platform.AMD Speed single dual
2.0 14.0 27.0
2.2 15.5 29.5
2.4 17.0 32.0
2.6 18.8 35.0
2.8 20.8 38.2
3.0 23.1 41.7
I just hope this will show up correctly :/
Very interesting article, I'm very excited to see an almost linear improvement from single to dual core.
yacoub - Tuesday, November 7, 2006 - link
Your Tested Systems details on page 8 - the last three show a CPU of a Venice 3200+ oc'd to 2.4GHz (hey that's what I run too!), but the headings suggest they should really show Intel chips. :)yacoub - Tuesday, November 7, 2006 - link
Yes please make it only visual and not actually a part of the game, because much like trying too hard to make graphics look realistic, it really just adds more frustration for the player than anything else. It's already annoying in HL2 getting caught up on the edge of prop_physics related objects. The last thing we need is also getting caught or bumped by another player ;)
JarredWalton - Tuesday, November 7, 2006 - link
If the world is more interactive, there might not actually be a need for "prop physics" objects. There's also the potential to make a game with different gameplay mechanics depending on how the character interacts with the world. It sounds like initially Valve will make it a visual enhancement, to make entities look more lifelike in their behavior, but down the road others could potentially do more. Like most of the enhancements, what we want to see is how they can actually change and improve gameplay beyond just being visual.yacoub - Tuesday, November 7, 2006 - link
"You're doing a disservice to the customer if you're not using all of the CPU power."okay so that alone shows the need for dual-core so the customer can offload background tasks to a second core so the game can truly get 100% of a core. ;)
timmiser - Tuesday, November 7, 2006 - link
Background tasks?? I agree with Gabe that I want all of my CPU working the game. I'm sitting here with an Athlon X2 4800+ and I can't run Flight Sim X at an acceptable frame rate all the while I watch the graph that shows CPU#2 at idle while CPU#1 tries to run the entire program by itself!On another note, how about Microsoft develope some type of new API (DirecThread?) that automatically takes care of utilizing multiple cores so that game companies like Valve don't have to employ entire multi-threaded R&D divisions just so their games use both cores.
It seems like we are going back to the caveman days before DirectInput, DirectSound, & DirectX etc. Remember when you had to choose your sound card, joystick, and video card from a list within the game?? Let's not go there again!!
-Tim
JarredWalton - Tuesday, November 7, 2006 - link
That was a direct quote from... Gabe I think. Others might disagree, but I thought it was an interesting take on things. As for background tasks, they usually only need a bit of CPU time (less than 5% in most cases), so unless you really want to encode videos and play games at the same time....yacoub - Tuesday, November 7, 2006 - link
What a worthless attempt at sarcasm:Why not just say something normal like:
It's not omg-witty, but at least that sentence doesn't end with a preposition. @___@
JarredWalton - Tuesday, November 7, 2006 - link
Which obviously ruined the whole article. Seriously yacoub, a little tact with posting would be nice. Rather than stating:You could have just said something normal like:
We are real people, and derogatory adjectives like "worthless" tend to irritate more than help. You may not intend it that way, but imagine for a second someone talking about what you worked on for a couple days last week and describing it as "absolute garbage". The key word in "constructive criticism" is to actually make it constructive.
Now, thanks for the suggestion, and I'm more than happy to change things a bit to appeas people. Like most people, I just appreciate a bit more consideration, even if I'm just doing my job here. :) As the old cliche goes, you can catch more flies with honey than with vinegar. (Well, my grandpa used to say that anyway.)