Search code examples
unity-game-engine3d2dlow-level

Graphic Computing: What lies behind Unity that makes it so powerful?


I've been studying Unity for some time, but I've always been curious to understand a little more about how everything works ... coordinates, lights, 3D polygons and, in the end, incredible results ... How does it work at low level? How are computer graphics concepts applied by the Unity engine?


Solution

  • I am a Advanced Graphics Programming Masters Student, so I might be able to shed some light on the subject.

    Firstly, if Engine and Graphics programming is something you are interested in I highly recommend reading 2 books:

    • Game Engine Architecture by Jason Gregory
    • Real-Time Rendering Tomas Akenine-Möller (et al.)

    These books will pretty much tell you everything you need to know to understand how game engines work, although learning how to program one is a bit harder!

    It would be an essay to try and summaries the whole of a game engine so instead I will give you useful topics that you can look into.

    • Fixed-Function and Programmable Pipelines
    • Shaders (mainly Vertex and Fragment Shaders, most of lighting and post-processing is done in the shaders)
    • Rasterization (Barycentric Coordinate system, Depth and Z Buffer)
    • Geometry (Points, Vectors, Normals and Matrices)
    • More Math! (Homogeneous Coordinates, Quaternions, Euler's Method)

    Extra tip, Calculus is at the root of all low-level graphics, you will need to know how to do 5 times nested integrals for simulating real-time lighting (well only if you want to simulate every photon!)

    This stuff will get you started on the rendering side. The Game Engine Architecture book will introduce most of this as well as everything else (Audio Engines, Physics etc.) Good luck!