PCGH Technical Q&A: DirectX 10 in S.T.A.L.K.E.R.: Clear Sky
PCGH had the chance to make a technical q&a with the makers of STALKER: Clear Sky about the DirectX 10 support of the upcoming sequel. All questions are answered by Igor Lobanchikov.
PCGH: Many of your fellow developers argue that by supporting DX 10 you limit your audience or that the performance of DX 10 is still poor and not optimized. In spite of that you very early announced that the next iteration of the X-Ray Engine in Clear Sky will support the new vista API. Why did you decide to integrate DX 10 support into your game? Why was the migration to DX 10 inevitable?
DX10 is not so bad. Drivers are stable and more optimized now than they were a year ago. Tools are available. Supporting DX10 doesn't limit our audience unless we drop DX9 support. In fact we still support all older renderers and improved our DX9 renderer a lot.
DX10 is our long-term investment. We've chosen to get used to a new API early, to make experiments today, to save time for the research for future projects transforming DX10 revolution into the X-Ray evolution. And I'd like to mention, that transition to the next API (DX11) should be much smoother for us.
PCGH: For you as a developer what are the technical advantages of the DirectX 10 API? In what way does it optimize or simplify the rendering process in S.T.A.L.K.E.R.: Clear Sky? Can you please give examples?
DX10 is much cleaner in terms of programming. We were able to remove additional paths, necessary to support optimizations of different IHVs. It's less CPU - consuming, which can give advantage in CPU-bound scenes. However, we are still working on optimizations so, hopefully, you won't see any FPS difference between DX9 and DX10 pathes.
Implementation of some of volumetric smoke simulation phases using DX9 could use too much CPU resources necessary for rendering of the rest of the scene as well as AI, game logic and so on. In DX10 it takes only a few rendering calls due to the possibility to render into a volumetric texture using geometry shaders.
There are still lots of things that are not so obvious. For example, much cleaner shadow map rendering path using new sampler filtering functionality, fewer render state setup API call using render state structures and batch setup functions for textures and render targets. It's not about doing something really new. It's about the simplicity and efficiency.
PCGH: In a previous interview you told us that the integration of DX 10 support requires a refactoring of the X-Ray Engine although it is designed to support multiple renderers. Can you please explain what you mean by refactoring the engine? Do you have to program new parts from scratch? How do you overwork/reprogram the existing technology?
X-Ray Engine supported different renderers, but DX9 abstraction level was integrated into the common part of the engine too deeply. We just had to split the existing code to be able to switch between renderers that rely on DX9 and renderers that use another API, DX10 for instance. This means that existing technology was left pretty the same, with some portions of code moving from one module to another, introducing only a really small interface part. We were lucky enough to have several renderers before!
PCGH: Was it very time consuming to develop the DX10 version? What were the major difficulties you faced during the developing process?
Porting to DX10 appeared to be really straight-forward. Since our renderer relies on the API abstraction layer, after engine refactoring we just had to implement abstraction layer for DX10 and adapt shaders to get the first runnable. Constant tables and render states fit extremely well into our existing rendering ideology.
So the most challenging was to get exactly the same picture for both DX10 and DX9 renderers. I had to carefully check all the render states, the shaders, implement some of the FFP (fixed function pipeline) functionality and so on.
PCGH: After experimenting with the new rendering techniques the DX 10 API has to offer like Geometry Shader or Virtual Texture Management: Have you made your final decision which features are integrated in the final version of X-Ray. Can you furthermore explain how the new rendering techniques are utilized?
Feature list for current iteration of X-Ray is closed. Most of the new techniques were shown on latest conferences and/or expos. However, there're still a couple of features that could appear in the release or one of later patches, or they can make their way into the next iteration of our engine.
We used rendering to volume texture technique to pack updating all volumetric texture layers into the single call, which effectively saves us CPU cycles and allows us to use as many obstacles for smoke as we need, making it really interactive. Most of the other things are not so interesting since it all about doing the same things we did in DX9 but in the different way.
We examined DX10.1 carefully. It's only a minor update of DX10 interface, and has even smaller install base than DX10. Since we've are focused on delivering a picture to the gamer, the previous version of rendering API, DX10 was enough to implement our ideas.
PCGH: Can you please describe in detail the visual differences between the DX 9 and DX 10 version of S.T.A.L.K.E.R: Clear Sky? In other words what are the visuals that can only be rendered with a Shader Model 4 card and that players without DX 10 hardware will miss? Can you supply us with a visual proof/new screenshots?
First of all, those effects are volumetric smoke and dynamic wet surfaces. Still you'll need DX10 class hardware to be able to see all new effects that were added to game at a reasonable frame rate and high resolution.
Smoke was introduced to add more density to our underground levels. It interacts with walls, boxes, trying to get everywhere. It envelopes NPC's walking through it.
Dynamic wet surfaces effect is used to make user believe that it's a real rain, which interacts with everything you can see. Water splashes on the ground, water streaming down the walls, boxes, tanks, everything, dry areas under the roofs. This technique is completely dynamic and it didn't need any level designer work at all.
There's one more nice visual feature, but we are still not sure when it will be released, so it's too tempting to let you guessing what it could be.
PCGH: Is the DX10 render path faster than the DX9 (Vista) or the DX9 (XP)? Do even you utilize DX 10 to enhance the performance?
Our DX9 renderer API usage is greatly optimized, so we didn't expect to get higher frame rates for DX10. Still DX10 API is less CPU-consuming, so you could experience speedup in scenes that are CPU-bound.
PCGH: Have you already tested how much of a performance hit the optics of DX 10 will incur? Will even players with a first gen DX 10 card like the 8800 GT (G 80, 320 MB Video RAM) or the HD 2900 XTbe able to play Clear Sky with all details and a decent resolution of at least 1.280x1.024? What hardware would you recommend?
We didn't make wide performance testing across the whole range of videocards yet, but it is definitely in our plans. However, I can give you some clues which I hope would be useful: 320 MB of memory is definitely not enough to play at maximum texture quality, however it seems, that 512 would be. 8800 GTS 640 could be enough to play with all options on, but not at maximum quality. For us maximum quality means using the latest hardware for the best possible picture.
PCGH: Have you already tested the new generation of Nvidia and AMD cards supplied with a dual GPU (AMD Radeon HD 3870 X2/Geforce 9800 GX2)? Can this technology noticeably speed up the rending process in the DX10 version of S.T.A.L.K.E.R. Clear Sky?
We developed new effects keeping in mind MGPU rendering. And tests show that you could get good scaling for high resolutions and all options on. You'll definitely notice it.
PCGH: Finally: From a developer's point of view, can DirectX 10 be generally seen as a milestone in game development?
DX10 is definitely a milestone in the industry. It introduced new shader model, resource-view concept, unified list of the features supported by all hardware vendors and used a new driver model of Vista.
However, the results won't be immediate (and you can see it on the current gaming market with most of the games being just ports from DX9 to DX10). DX10 introduced just too much for a single step. Probably DX11 release will be the point when the results of DX10 appearance will hit the market. We just need to get greater install base of DX10-enabled systems, and, probably, more, than one generation of similar APIs to be able to use all DX10 benefits and tune our production pipeline more towards new API.
PC-Spiele 2017: Games-Liste mit Release-Terminen [Update: Mass Effect: Andromeda, Project Cars 2, Conan Exiles]