r/GraphicsProgramming • u/Co_Mahan • Feb 21 '21
Video Game Graphical Coding?
Howdy!
I dont even know if this is the proper subreddit for this question, and I don't even think my question is proper, so I'll try my best to lay it out as simple as possible...
From my own record of playing and seeing video games within the past 5 years or so, I've seen graphics programmers give the ability of a game, at the lowest settings, to appear as those it seems to the naked observer, that the settings are all the way notched up when in fact it isn't.
I'm wanting to know the actual science behind it. What have these programmers found at their disposal that wasn't previously?
1
Upvotes
14
u/GraphicsProgrammer Feb 21 '21
Culling, LODs, shadow cascades, and good art, probably.
Culling is an umbrella term for anything that reduces the amount that has to be drawn - in most modern games this means not bothering to do any graphical calculations for things that are not within the camera's field of view (view frustum culling), as well as culling objects in different rooms/segments of a much larger environment (occlusion culling).
LOD refers to a level of detail, which is a term applied to geometry (models) and images (textures) both. Simply, you reduce the quality (number of polygons for geometry, image resolution for textures) based on a number of factors, mainly the distance from the camera. This is based on the principle of perspective projection that distant objects are smaller, and therefore less discernible - consider a high resolution sphere like a planet model; close up you can see all the details of the sphere, but when you're a great distance away, it's barely a speck on your screen - at that distance, there's no different between a low resolution object and a high one, nor a low resolution and high resolution image. This is used in non-CGI films too, as low quality props are given to actors that are distant from the camera.
Shadow cascades are a clever way of applying LODs to shadows. Shadows are often determined by comparing depth maps drawn from the perspective of a camera and from the perspective of a light source, with the resolution of said maps determining the quality. Cascading is a way of allocating more resolution to nearby objects, and less to distant objects - as explained before, quality is only discernible close the the camera.
These methods combined with the continual improvement of graphics hardware mean that techniques used to render games are catching up with the highest-fidelity visuals any studio can produce, meaning that we're getting so good at discarding useless detail that a portable platform like the Nintendo Switch can run Legend of Zelda BOTW at a really acceptable framerate. It's getting harder to push the hardware to its limits, because it's already so good at drawing what most artists can create.