CryENGINE 3

  • CGSociety :: Technology Focus
    15 April 2011, Paul Hellard

     


    The third generation of Crytek's proprietary CryENGINE is the only all-in-one game development solution for the PC, Microsoft Xbox 360 and Sony PlayStation 3 that is truly next-gen ready.

    Generating a games engine that not only ran lightning fast on a PC but equally quickly on both an Xbox and a PlayStation 3 has been one of the most incredible technical achievements of Crytek's professional life.

    This involved developing a new streaming system, refactoring the physics, animation and renderer modules, as well as bringing online low level CPU/GPU and multi-core optimizations.

    "This development took our team a little over three and a half years, building on our experiences with CryENGINE 1 and 2," says Tiago Sousa, Principal R&D Graphics Engineer at Crytek. "Console specific know-how was already being developed within R&D and that knowledge came to fruition with the start of CryENGINE 3 and the development of Crysis 2."



    The development of HDR Rendering of a sufficient high quality and correct gamma to suite all outputs on PC and consoles, was a huge challenge.

    Where studios used LDR Rendering, an inferior result came when high-end lighting effects were called for.

    Using the CryENGINE 3 and HDR rendering, a multitude of physically-based post processing effects, such as eye adaptation, bloom, flares/streaks, motion blur, depth of field and grain became possible.



    In CryENGINE 3, all lights are dynamic and deferred. Therefore, the Crytek crew engineered a very slim G-Buffer, composed of normals/depth, used later in the 3D pipeline for several other purposes.

    The deferred lighting accumulation is done in HDR on all platforms. Among several other techniques, every surface has reflection maps applied to it through deferred specular HDR cube maps.



    Post MSAA is an efficient way to perform anti-aliasing, particularly when doing HDR rendering at a multi-platform scale. This is done by amortizing anti-aliasing cost over frames, reprojecting previous frame sub-samples into the current frame.
    Another way of saying this is a form of amortized MSAA reminiscent of OpenGL accumulation buffer approaches.
    It has several benefits over the usual hardware MSAA. For example, it can efficiently handle alpha tested surfaces and shader anti-aliasing. Particularly on consoles, it is probably the fastest solution offering sub-pixel accuracy, when compared to post process techniques. It also allows for anti-aliasing on alpha blended surfaces on PS3, which is not possible on the hardware when handling HDR rendering correctly, like CryENGINE 3 does.

    Click For Larger View


    Crytek's invention, the Screen Space Ambient Occlusion (SSAO) is back, much improved. This is where ambient occlusion is approximated in screen space. The SSAO uses temporal accumulation for enhanced quality on consoles.

    Such approximation is beneficial because it can be efficiently mapped to GPUs, so it is computed in real time as opposed to the usual offline methods. It works the same way on consoles, but the cost and quality is distributed over many frames.

    For CryENGINE 3, Crytek switched to a deferred lighting solution, which means they also output the scene normals to depth. This serves several purposes: besides lighting, they are also used for adding high frequency scene normal details to further increase the quality in this latest SSAO solution.



    "Our water rendering techniques are quite similar to the solution we used in Crysis 1," explains Tiago Sousa. "They are still based on Jerry Tessendorf's seminal work.

    The biggest difference in the latest version, besides performance optimizations that allowed us to maintain most of its look on consoles, is that dynamic interaction is efficiently handled on all platforms."

    There are also a couple of per-platform differences. For example, on PC specs we use vertex displacement, while on consoles we do a parallax approximation on the pixel shader. The different look is not due to the rendering approach itself, but a result of differences in the environment i.e. a tropical environment with a very strong blue sky, versus an apocalyptic cityscape.





     Go to page 2



  •  



    Character rendering now takes advantage of the deferred lighting. Crytek also developed the engine to allow skin rendering with screen space sub-surface scattering and self-shadowing.

    Another improvement is the alpha tested smoothing for hair rendering with anisotropic shading for all platforms. Makes the hair actually look natural instead of like pasted blocks of texture. [right]


    The camera motion blur effect has been greatly improved over Crysis 1. The CryENGINE now does a proper re-projection instead of a 'sphere' approximation.

    This allows for a far more accurate motion blur result based on how much a pixel has moved. Object motion blur is supported on all platforms as well as bokeh depth of field.

    All post processes are done in HDR, before tone mapping. This allows the retention of bright streaks, which are not commonly used in current-gen games, besides Crysis 1.

    This is performed on every platform and implemented for optimal performance by batching all techniques together, which takes about 1ms on console platforms.



    Although it is common for multi-platform engines to disable certain rendering features depending on hardware strengths, in CryENGINE3 most rendering code is designed to be general; and optimised for consoles. All post processes use exactly the same code path, then the quality is scaled up for higher PC specs.

    Using the cryENGINE 3, every spec on PC should mostly play at 60 fps at 1080p assuming the user selects the right spec for his machine and has a fast enough CPU. Back in the days of Crysis 1, a relatively brute force approach was used, where all features on lowest settings would be completely turned off, including HDR rendering, shadows and all post processes. Users would have to use lower resolutions for improving performance. In fact, running Crysis 1 at HD resolutions on highest end hardware in 2007 was simply not possible.




    All post processes are done in HDR, before tone mapping. This allows the retention of bright streaks, which are not commonly used in current-gen games, besides Crysis 1.

    This is performed on every platform and implemented for optimal For Crysis 2, Crytek has focused a lot of effort to optimization. All features are present across all system specs, including HDR rendering, shadows, motion blur, SSAO, Depth of field and post MSAA.

    Anisotropic filtering is also used on every system spec, and users can now experience a great gaming experience at 60 fps on PC at HD resolutions, including stereo mode.
    "Other games," suggests Tiago, "rely on having completely pre-baked lighting, no HDR rendering and dynamic shadows limited to a few items such as characters, in order to offer a 60 fps experience. This effort made our lowest specification equal in many aspects and even superior to CryENGINE 2 High specs.

    "The biggest differences from Crysis 1 to Crysis 2 are the vastly improved dynamic lighting and shadowing and highly improved image quality. For this reason, the lowest available spec on PC in Crysis 2 is 'High Spec' and the highest spec is 'Extreme'."



    © EA



    "Our novel multi-platform solution provides a higher image quality on consoles when compared to many competitive titles," explains Tiago.

    "To keep the frame rate stable when rendering the scene twice for stereo, it is usually necessary to lower the resolution and object detail dramatically.

    To avoid this loss of image quality, our solution uses the image depth to reconstruct the second eye view with minimal cost, thus avoiding the inefficiency of rendering the scene a second time."


    Due to the improved image quality and the very careful placement of elements in 3D space to avoid depth conflicts, the stereo experience in Crysis 2 is one of the most comfortable so far.

    Also, the CryENGINE 3 supports real dual stereo (also anaglyph mode for debugging), which is likely to be exposed for Crystis 2 in later patches for PC specs.





    Crytek
    Crysis 2
    Tiago Sousa
    Jerry Tessendorf

    Discuss this article on CGTalk


    Previous pageMore Articles