1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice

What is Vulkan - And why you should care?

Discussion in 'General Discussion' started by Stian Aarskaug, Aug 13, 2015.

  1. Stian Aarskaug

    Stian Aarskaug
    Expand Collapse

    Joined:
    Sep 16, 2013
    Messages:
    172
    glnext-logo.png

    Have you ever heard about OpenGL? Well, Vulkan is the successor to that API, built from the ground up.
    I wrote this little guide to explain to you what it is. Why? Because I'm interested in the subject and I think it's a big deal.
    The more well known Direct3D from Microsoft tend to get the attention, as many people don't really know what OpenGL, Vulkan or Khronos is.
    I intend to play teacher and do something about that.


    What is an API (Application Programming Interface)?
    "a set of functions and procedures that allow the creation of applications which access the features or data of an operating system, application, or other service."

    An API (Application Programming Interface) is a bridge that gives you access to hardware resources, software or services. An example of an API is a software package that lets you access a database and use it in your own software or website (Airlines have APIs that let developers check flight information and booking information, that third-party sites can use to make e.g. price comparison sites). Sometimes you have to pay for the API, other times the API is free. Another example of an API is a graphics API. This is the software that the developers use to render graphics on your computer. It's basicly the middle-man between the game and the hardware. Both the prosessor (CPU) and the graphics card (GPU) can be used to make 3D graphics.

    Examples of graphics APIs are:
    - Direct3D: This is the graphics API in DirectX. Perhaps you thought this was called DirectX, but what that is, is a collection of APIs that govern audio, graphics, controls and more. This API is made by Microsoft and is proprietary.
    - OpenGL: This is an open standard API made by Khronos Group. It's actually 22 years old, and still in use, well at least an updated version of it.
    - Vulkan: The successor to OpenGL, it's an open standard API by Khronos Group.
    - Torque 3D: This is a game engine with tools for graphics, world-creation, controls, audio, GUI and more. It's basicly a tool to make games. BeamNG.drive uses this API.


    Khronos Group is behind Vulkan, but who is that?
    It's an American not-for-profit member-funded association. It was founded by several companies including 3Dlabs, ATI, Intel, NVIDIA and more.
    The association have members all over the computer industry that can contribute to Khronos work. In short, they are Khronos.

    Khronos make open, royalty free standards like for instance graphics API, compute API or audio API.

    members.png


    What is Vulkan?
    It is the successor to OpenGL that Khronos is currently working on, a graphics and compute API. It started as a project called "next generation OpenGL initiative" and the code name for this project was "glNext". Later they created the official name (yep.. you guessed it..) Vulkan.

    The project started and was announced in 2014 where they asked for participants. Vulkan is based off of Mantle, the graphics API project by AMD. What AMD will do with the Mantle project remains to be seen, but they do intend to continue the project in addition to Vulkan.

    The path of this API is quite similar to that of Direct3D 12 (and Mantle). Low-level communication with the hardware and decreased overhead is the main focus. The goal with Vulkan besides being a low-level API is to take better advantage over the hardware resources, reduce overhead, utilize multi-core prosessors better and be more reliable and consistent than OpenGL. It's no secret that OpenGL didn't have strong footing, and was simply just following Direct3D. This time around the story looks quite different, which leads me to the next key point:


    Why should we expect Vulkan to stick around?
    Valve Corporation, the company behind the legendary Half-Life, Counter-Strike and more. They run Steam and they have started the projects SteamOS (a linux gaming distro), Steam Machine (a console-like prebuilt PC running SteamOS), Steam controller and SteamVR (competitor to Oculus Rift). They are a big deal in the gaming industry. Some years back Valve was experimenting with OpenGL and Linux and showed demos where their games run faster on Linux with OpenGL than on Windows with Direct3D. They continue to heavily invest in SteamOS and Steam Machines, and Vulkan is a big part of that. Their new game engine Source 2 will support Vulkan and there's no doubt future games from Valve will be built around this engine using Vulkan. Vulkan will also support VR headset and Valve has already confirmed they will release a VR headset on fall 2015. It will be manufacturered by HTC and it looks to be the best VR project at the time being, with some really interesting hardware implementations.

    The Steam Machine initiative will as I said mean a lot for Vulkan. These products will need to support Vulkan for the years to come, that means that the hardware manufacturers need to provide necessary drivers. And they are committed to this.

    Google are also on board with defining Vulkan support on Android (they will choose and define feature set). This means we will undoubtedly see many games using this API, and believe it or not, the phone industry is one industry that is leading the way for technological advances. This market is where big companies invest big dollars. You cannot say the same for the decreasing PC market. Mobile chip makers are already experimenting with Vulkan.

    Several developers have already indicated they will support Vulkan. Valve's Source 2 that support Vulkan will be royalty free and provided to developers that want to use the engine in their game. Below, you can see the contributers and supporters to the project:

    (imported from here)


    On what platforms and hardware will Vulkan run?
    One of Vulkans biggest advantages is that it will run on a large amount of platforms: Windows XP/7/8/10, Linux (Ubuntu, SteamOS etc.), Android, PlayStation 4, Xbox One.

    It will support graphics cards from as far back as 2010/2011. Intel's integrated GPUs will be supported also.


    What about Direct3D 12 (DirectX 12)?
    This new API from Windows is expected to be pretty similar in many ways, but it's Windows 10 exclusive. It's performance and features will be great. Which of the APIs will be best in regards to performance remains to be seen. It seems though that Microsoft's API will boost sligthly better performance, due to the fact that Microsoft have full access to resources for Windows and only need to optimize it for that particular OS, while Vulkan will work across many different platforms. But this is just an assumption, that's not to say Vulkan will perform poorly. In fact, we just have to wait and see. Nonetheless, both will perform great.


    So why should you care about Vulkan?
    There's many reasons, aside from the indications that it will be a pretty darn great API.
    - It's cross-platform, as opposed to Direct3D 12 that will only support Windows 10.
    - It's an open-standard API, while Direct3D is not.
    - You can be sure there's support for many years to come. Microsoft will not support older versions of Windows, they always make their new APIs exclusive to their newest Windows.
    - It's developed by the industry in a neutral manner, while Microsoft can make decisions that serve them, but not necessarily others.
    - It's arguably the best choice for BeamNG.drive (or in particular Torque 3D) in my opinion, and would make it easy to support Windows XP, 7, 8, 10, Linux and maybe even consoles if they really revamp the rest of Torque 3D engine to support consoles.


    Are there any tech demos?
    Not many at this point, but there's some.

    Here's a tech demo that compare Vulkan to OpenGL, and it's run on Android. The demo is conducted on the Nexus Player.

    More: http://blog.imgtec.com/powervr/gnomes-per-second-in-vulkan-and-opengl-es

    Imagination, the company behind PowerVR graphics chips tries out Vulkan API on their GPUs (note: mobile GPU):

    More: http://blog.imgtec.com/powervr/trying-out-the-new-vulkan-graphics-api-on-powervr-gpus

    Here's Intel showing us some brief demos on... drumroll... Intel hardware:



    If your brain crave more information on the subject, I'd recommend this:
    http://www.anandtech.com/show/8363/khronos-announces-next-generation-opengl-initiative
    http://anandtech.com/show/9038/next-generation-opengl-becomes-vulkan-additional-details-released
    http://anandtech.com/show/9509/vulkan-status-update-will-use-feature-sets-android-support-incoming


    Glossary:
    API: Application Programming Interface. Explained above.
    GPU: Graphics Processor Unit. You graphics card has a GPU-chip. Intel Processors occationally do. Your phone has one. Maybe even your car.
    CPU: Central Processing Unit. Every PC have this. You phone has one, your calculator has one, and most likely your car. Actually, there's coffe machines with a CPU.
    Direct 3D: A graphics rendering API included in DirectX.
    DirectX: An API related to audio, graphics, controls, networking and more. Basicly a tool to make games in.
    Torque 3D: The game engine BeamNG.drive uses.


    Please send me an PM or post a comment if you have any thoughts, or if there's something missing in this post. The same goes if you think there is room for improvement or content to include.
     
    #1 Stian Aarskaug, Aug 13, 2015
    Last edited by a moderator: Oct 21, 2015
    • Like Like x 1
  2. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,804
    Thank you for posting this. I'm a bit of a "graphics whore in learning" and stuff like this is cool. I have heard here and there about Vulkan and the devs
    thinking about implementing it. I really like how this API is aiming to get away from the centralized and proprietary Direct X hegemony.
     
  3. randomshortguy

    randomshortguy
    Expand Collapse

    Joined:
    Aug 9, 2013
    Messages:
    1,562
    Very good post, I'm also really into computer graphics as well.

    Vulkan seems really promising especially towards an ambitious project like BeamNG, and perhaps the next step for BeamNG is a truly powerful engine, like Torque3D running on Vulkan? At this point it's not about FPS anymore, it's more about expanding what BeamNG could be. If we had vulkan, a moderate gaming computer could probably run much more dense maps with live traffic, AI and other more intensive things long ago shot down in the name of performance. Just imagine.

    Pity I know so little about integrating APIs into engines. It was a rather quick and seamless upgrade to DX11 from DX9 but that's within the same product family so it's nothing alike to Vulkan. Perhaps I need to take a peek into BeamNG's altered version of Torque3D and how D3D is integrated into an engine, to truly understand if something like this is realistic to expect for BeamNG, or really any other game.
     
  4. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,958
    You'd be surprised at how little DX11 and DX9 have in common
     
  5. randomshortguy

    randomshortguy
    Expand Collapse

    Joined:
    Aug 9, 2013
    Messages:
    1,562
    Surprise me. I'm interested in learning.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice