Powered by Blogger.

RSS FEED

Blog Archive

Saturday 10 September 2011

In Depth: The death of DirectX

In Depth: The death of DirectX

The death of DirectX

Time was, the latest version of DirectX would render previous versions outdated and redundant, but lately things have changed.

The first version of DirectX 9 appeared way back in December 2002 (older than most Justin Bieber fans, then) and yet we're still seeing the most eagerly anticipated big budget releases built around DX9 almost a decade later.

It isn't as though DirectX 10 and 11 have nothing to offer. You only have to load up Crysis to see what's possible when a development studio goes to town with the new features a graphical API has to offer. The jungles of Crysis offered up motion blur, post-processing and lighting effects that we simply hadn't seen before. It caused quite a stir, you might recall.

Things looked bright in the early days of DX10. Bioshock's idiosyncratic graphics style made good use of the API, and Far Cry 2 made war-torn African tundra look appealing. No one matched Crysis' DX10 smorgasbord though.

Perhaps they were put off by the fact that no one had a PC that could run it. Developers seemed to be reigning in on DX10. Instead of making a game take a giant leap forward into post-console visuals, DX10 releases looked increasingly similar to those made with old man DX9.

There were bigger problems emerging, too. DirectX 10 was only available to gamers who'd taken the plunge and upgraded their OS to Vista. Many were perfectly happy with XP and felt they didn't need it; others bought it and found a myriad of problems from front end to driver support. DX10 then, was bound to an operating system few liked. The gaming world lost its appetite for Microsoft's new API.

The journey of an API

Unreal sam

In late 2009 DirectX 11 was released. It had a lot of wrongs to put right, and a lot of mistakes to avoid. This time it was tied to an operating system that people did like, and showed impressive potential for gaming graphics and performance… and yet we still haven't seen the standout DX11 title. What we have seen are some impressive DX9 games, and even the odd OpenGL title.

Throughout the nineties, DirectX and OpenGL locked horns. They scrapped to be the dominant application programming interface (API) to replace the proprietary interfaces that proceeded them. Each wanted to be the API that graphics card manufacturers would write driver support for, and that game developers would use as their toolset.

SGI's OpenGL had the upper hand until the end of the decade, thanks to an alliance with id Software and the Quake engine that powered Half-Life in a heavily modified form, not to mention its subsequent blockbuster sequels to the Doom and Quake franchises.

With each new game, the id Tech engines expanded their graphical features in parallel with OpenGL, and proved enticing engines for other developers to build their own games with.

As the decade ended, Microsoft muscled OpenGL off the API throne with DirectX 8. For the first time, it not only matched the latest OpenGL, but surpassed it by including vertex and pixel shader support.

Microsoft also launched its Xbox, hitting the shelves late in 2001, which ran on an operating system similar to Windows NT, and used a Windows API- DirectX 8.1. This opened the door for cross-platform releases. Developers had a shared toolkit across the PC and Xbox platforms that made programming easier.

Anyone who tried to play Resident Evil 2 or the like on PC will remember the calibre of cross-platform games - or console ports - developed with the console in mind, then re-coded for PC before this point. The vast majority were all but unplayable; controls were poorly translated to our beloved keyboard and mouse and game code was unstable and glitchy.

So, unsurprisingly console games never sold particularly well when they finally made their way onto PC.

The game that bucked that trend was Halo. It was originally developed for PC and Mac, but when Microsoft bought Bungie Studios they saw it made sense to use the buzz the game was getting to boost their fledgling Xbox. As a result, we had to wait two years for Halo to make its way to the PC, grinding our teeth as Xbox owners banged on about how freakin' good it was.

When it actually was released on PC in 2003, it came with DirectX 9.0 support. Perhaps Bungie felt bad about making the people who'd supported their game from the start wait so long, but the fact was the PC release offered more than the original console release - shiny new DX9 visuals that weren't possible on Xbox.

Halo's PC incarnation wasn't perfect. Frame rates were low and performance was often choppy - but it was playable, mouse-friendly and pretty, and that release set the protocol for cross platform releases through the next decade.

Sharing the DirectX API across platforms made for less buggier games. DirectX 9 was a quality API that allowed a lot of flexibility beyond standout visuals; OpenGL had been well and truly muscled out of the action while Microsoft sank its fingers into the warm pies of PC and console gaming.

Hard history lessons for DirectX

Crysis 2

The current generation of consoles also proved to be pivotal for DirectX, but this time for the worse. The Xbox 360 supports a modified build of DirectX 9.0c with Shader Model 3 support. Sony's PlayStation 3 natively uses a flavour of OpenGL.

Here in PC land, we're on DirectX 11, which is no big deal to us since we can easily stick in a new GPU and unlock a new generation of graphics technology, but on consoles, the native API is ruler for life. That means if a developer works hard on integrating DirectX 11's tessellation and multi-core rendering into a PC title, they then have to code it back out for the console version.

Whether or not that developer has built their engine from the ground up, that's an expensive and time-consuming undertaking. Given the small profit margins PC titles can expect to generate, it's simply not worth it for many game studios. Is that why we've seen even big-budget blockbusters like Crysis 2 and The Witcher 2 stick with DX9.0c?

Bartlomiej Wronski, graphics programmer for The Witcher 2 explains: "I think the main reason not all developers - including us - provide DX11 support is that supporting two totally different rendering APIs requires much more work and testing. It also creates pipeline difficulties. We would have had to decide which features have fewer fast DX9 fallbacks, which are rendered in lower quality, and which are totally dropped and this would have meant even more work for our artists, programmers and testers.

"The Xbox [360] uses an API similar to DX9, with only few extensions from DX10/11, like texture arrays or hardware tessellation, so to create a multi-platform engine, we had to base ours on DX9. We understand it's an ageing API, and that DX10 and 11 have new features and performance - it came down to balancing these and other considerations."

But there's more to consider than consoles, says Wronski. It's not as if every PC gamer has a DX11-ready machine:

"The main reason games still implement DX9 is to support the many players whose PCs run Windows XP and older graphic cards. Fortunately, DX9.0c with shader model 3.0 is still a pretty powerful API, which allowed us to create a rendering engine capable of creating beautiful locations, characters and scenes."

So developers are faced with a fairly small user base when developing a DX11 title, compared to the prospect of a cross-platform release and reaching gamers with dusty old XP machines by working with DX9.0c. The goalposts are constantly shifting, though, as gamers are able to upgrade their machines.

Lighting dx11

This makes for an uncertain future for DX11, as Wronski says: "While DX11 is already a very good and fairly mature API, many of its capabilities aren't widely used yet, so it's hard to speculate about new versions. All its cool features like geometry shaders, texture arrays and dynamic hardware tessellation are still awaiting broader implementation. Direct Compute could also help a lot: vendor-independent GPU computing is a feature not only graphics can benefit from, but also particle and physics simulation."

The number of DX11 gamers is growing, and they will dominate the market soon, so including it is an obvious, important next step in engine development.

"We believe that it may be up to the next generation of consoles. The usage of APIs in future games depends on the capabilities of the next-gen console GPUs," says Wronski. So from a developer's perspective, they'll blink when gamers do.

When there are enough DX11 end users open-mouthed for flashy games, it becomes commercially viable to make use of DX11 features - and if eighth gen consoles support DX11 natively, that viability more than doubles.

When Microsoft released Windows Vista, it's fair to say it took a bit of a kicking. There were driver issues, front end gripes, performance problems, all reflective of the enormous changes under the bonnet. But perhaps Vista's biggest problem was that Windows XP still worked just fine.

People weren't chomping at the bit for a new operating system, they were settled into XP as one settles into a comfortable chair. The incentive to jump from that comfortable chair onto the Indian bed of nails that many regarded Vista to be was DirectX 10. XP would never get DX10 support, if you wanted to play DX10 games, you were forced to buy Vista. That was something new for Microsoft.

Previously, new versions of DirectX had been unbound to any particular operating system. You also needed a new DX10 graphics card, and that was no small change. Suddenly, you'd gone from comfy old XP and a healthy bank account to an unfamiliar OS and empty pockets. Why put yourself through it?

Well, for one reason, Crysis. Remember how quickly things moved during the emergence of 3D gaming? How you'd sit there, gazing in wonder at Doom, wondering what kind of transcendent visuals Doom II would have? Well, Crysis looked like that to our 2007 eyes. It was simply one imperial unit of graphical quality higher than anything else.

It was clear Crysis was going to need a brute of a PC to play, and importantly it generated enough enthusiasm from PC gamers that they went out and bought those brutish PCs. It was only when the dust had settled after Crysis that gamers found faults with DX10 itself.

First, only Crytek seemed capable of drawing those cutting-edge visuals out of the API. It had set the bar high, but other developers didn't get near it. Second, DX10 wasn't a performance-enhancing API. In fact, all games that shared the API seemed to also share terrible frame rates. Gamers that bought into DX10 were hugely disillusioned.

Current climate

Battlefield 3

It would be understandable then if PC gamers had their trepidations about DX11. This time it isn't bound to a Windows OS, in this case Win7 as its predecessor was, but it does require a new generation of graphics card and the subsequent outlay.

And yet, the trusting, doe-eyed PC gaming community, never one to boycott a company or product based on even the slightest mishap or glitch and then spend months furiously typing obscenities about that company or product in their forums long after everyone stopped caring, did have faith in DX11. And they did buy into it.

Matt Ployhar is the president of the PC Gaming Alliance, Senior Product Planner at Intel and former Microsoft employee with experience in MS Games Studios and the Windows/DirectX team through the DX10-11 development phases. He's as informed as anyone on Microsoft's API, and explains that there are in fact plenty of DX11 gamers ready and waiting for DX11 games.

"The DX10 to 11 GPU-discrete Install base alone is now sitting somewhere around 250 million unique PC gamers across every segment and geography. The problem for DX10 and 11 isn't the Total Available Market (TAM) or install base, which incidentally is larger than all the seventh gen consoles combined, the problem is that it's more analogous to being like a largely untapped oil field."

So unlike CD Projekt's vision of the PC landscape, Ployhar sees DX11 as a graphics revolution about to happen if developers would only tap that oil field. So, why aren't there more DX11 games in development?

"Good question," says Matt Ployhar. "There should be. DX11 would likely be the most robust option available presenting the least amount of compromise to one's vision for a game.

"The real problem is probably the lack of incentives, carrots, whatever you want to call them, for making PC games in general. Your console manufacturers can spend 100s of millions a year to single digit billions for a specific platform; and that equivalent spend doesn't occur on the PC."

Battlefield 3

It seems that the only thing holding DX11 back is time, rather than any failing with the API itself. Perhaps it's predecessor DX10 didn't deserve its bad rep. It paved the way for DX11, for starters:

"Getting people to switch to a new API is never an easy thing to do. It took several years for Microsoft to get the foothold and market share it did with D3D. This obviously didn't happen overnight. Nor should we expect it to happen with DX10-11 and beyond," says Ployhar.

"DX10 didn't really fail. (The API) was going up against a large established DX9 TAM and Install base. DX9 is very mature in terms of support, familiarity, tools, and so on. Once DX10 - which has matured into DX11 - becomes more mature and prevalent we'll start seeing the ocean turn in favour of what is effectively the DX10 code path"

OK everyone, take a knee and let's gather our thoughts. DX10 got a tough time because it came tied with Vista, and at a time when the PC's financial ecosystem was - and is - being ransacked by piracy. Thus, cross-platform releases made for safer releases and that marginalized DX10 coding.

However, DX10 grew into the beautiful butterfly that is DX11, and it seems gamers are ready and waiting to see what developers can achieve with it. The past few years might have changed the way we look at DirectX, but it's still as important to PC gaming as ever.



0 comments:

Post a Comment

TOP PRODUCTS

Total Pageviews

PRODUCTS

Design by araba-cı | MoneyGenerator Blogger Template by GosuBlogger