Fundamental Concepts in 3D graphics (work in progress)

This articles talks about apis, meshes and more

Updated over 2 years ago

(still in progress)

Overview

  • Graphics api

  • Mesh Skelatal Meshes

  • shader

  • Shader model

  • Anti aliasing methods

  • gpu pipeline

- Grapics api's

The first concept when it comes to computer graphics is the grapics api, since all commands are given from the cpu, the programmer needs to be able to tell the gpu what code to run, you can either talk to the gpu through the graphics driver, in a language like cuda for invidia or HIP for amd, but thats fairly low level, so insead we can use a framework spesificly designed for 3D programms, thats where graphics api's come in to play. Api's like DirectX3D, Vulkan, OpenGL. Give the programmer the ability to use a set of commands/functions to create there program

Since the graphics api just gives a set of commands to be used, a graphics api in of it self has no overhead, the performance impact depends on the functunality that is beign used by the programmer, which means that its not recommended to use older versions of an existing api since they offer more functionality for better visuals and performance and more support for newer hardware features

The only two reasons to use a past version of the same api is when facing compatibilty issue, or when functionality that was previously used has ben cut in newer versions, this happens mostly to remove of legacy features

Overview of some api's

  • DirectX3D

This Api is a windows exclusieve developed by microsoft, you might hear the word DirectX beign used to refer to this graphics api, which is incorrect since DirectX is a larger set of apis for all kinds of things, like sound, video, mulitmedia etc, and directX3D is only one spesific api of that tool set. (even though its allot easier to say directx)

  • Vulkan

Vulkan is a newer api, which unlike directx is crossplatform, and can be used in windows, linux and andriod when it came out it had a reputation for beign low level, giving the programmer more tools for high performance, but directx has ben cathing up with the latest version directx12, despite that on platform that it doesent support like andriod, vulkan has allot of capability for performance, the problem is that there semm to be only a small amount of phones that support vulkan

  • OpenGL The OpenGL project is no longer in active development, and has ben getting replaced by vulkan, despite that OpenGL is still is beign wideliy used for andriod game development https://en.wikipedia.org/wiki/OpenGL

  • Metal

Is exclusive to apple platforms

- Mesh Skelatal Meshes

A Mesh is a set of data which is beign used to describe a 2d or 3d object, it uses three types of data: Vertices, edges, faces

Vertices

A vertex is just a coordinate, which containes 2 or 3 numbers (depending on 2d or 3d) to describe its postion is space for example (10,42,67). X coordinate is equal to 10, Y = 42, and Z = 67, if you have more then one vertex there called vertices In the context of a mesh these numbers are relitive to the origin of the mesh, and this completly depends on how the mesh was made in 3d modeling tool like blender or maya

vertexes.PNG

Here you can see a cube made out of coordinate/vertices, you can also see the x and y line, the z line isent visible, if i where to select all verteces on this cube and move it far to the left, the cube would still hold its shape because the distances between the points relative to each other is still the same, but in abosulute values they will be completly different, so when i take this cube out of blender and to unreal, the cube will be shifted away to the left from wher i place the widget which says where i place the object

vertex metadata

a vertex can contain extra data, for example a direction

This helps keep the lights on