Ever wondered how a 3D game is rendered? Here’s the scoop

software engineer deus ex rendering deusexheader
Ever stopped at a beautiful scene in a video game and wonder how it works underneath? Adrian Courrèges, a software engineer living in Tokyo, took the time to reverse-engineer the 2011 game Deus Ex: Human Revolution to find out exactly what happens to each and every frame to turn it from code into a video game world.

The first step is just to build the physical objects of the room, creating a normal map and depth map. The normal map is just a physical layout of the space – the engine traces larger objects first, then smaller and smaller until everything is represented.

The depth map is the room as seen from the point of view of the player, with objects that are closer appearing darker, and getting lighter as they get further away.

Then the rendering engine creates a map of the shadows in the room, one for each light. To keep the rendering time low for this step, only the largest objects in the room cast a shadow as seen from a major light source, and only the largest lights are used. These shadow maps are combined with the depth map, and different areas are assigned values based on how lit they are.

Using ambient occlusion, the rendering engine gives definition to the edges of objects in the room. This gives the surfaces and objects that weren’t counted by the major light sources soft shadowing, and will be used later to refine the textures.

Any smaller point-lights in the scene are now computed as well. Not a lot of calculations are done with those numbers yet, but their brightness and color information are noted for every pixel.

Now it’s time to actually start creating the image the player sees. The final color of every pixel is determined by using all of the light and shadow values from the steps before, the material and texture of the object itself, and sometimes a small texture with the patterns of the room on it to improve reflection quality.

The next step is to render any flat or transparent objects, as well as volumetric lights, like the halo given off by smaller light sources. These are the small touches the flesh out the video game world, and give it added immersion.

Just like in real life, lights glow, so the rendering engine creates a bloom effect on any light sources strong enough to warrant it.

Next, anti-aliasing is used to smooth the jagged edges on the edge of objects. It takes a bit of graphical processing power to make this happen quickly, but it’s worth the effect if you can support the overhead.

Now any gamma and color correction is done. That’s mostly at the will of the game designer, if they want the shadows of the game to be darker so you can’t see well, or want to brighten things up for a happier scene, this is when that happens.

Finally, the user interface is drawn on the screen. That doesn’t take very long at all, since it’s usually a static, or at least not very dynamic, image.

Courrèges also includes this nice timeline that shows roughly how long it takes for each piece of the process. There’s a lot more technical info in his full write-up on the process, and it’s worth a read if you’re interested in the exact process that happens with each step.

Gaming

Playing ‘Battlefield V’ on an $800 Nvidia card is stunning. And disappointing

‘Battlefield V’ is the first game to use Nvidia’s ray tracing support, now available with the RTX 2080 and 2080 Ti graphics cards. The feature can, in an ideal scenario, make the game look better, but the performance hit may not be…
Home Theater

The seven best TVs you can buy right now, from budget to big screen

Looking for a new television? In an oversaturated market, buying power is at an all-time high, but you'll need to cut through the rough to find a diamond. We're here to help with our picks for the best TVs of 2018.
Emerging Tech

Warm up or cool down with the press of a button on the wrist-worn Embr

We review the Embr Wave, a personal heating and cooling wearable designed by a team of MIT engineers that’s now on Kickstarter. Our thoughts? It’s a little bit addictive.
Cars

2020 Toyota Corolla sedan aims to offer sharper handling, better tech

The 2020 Toyota Corolla sedan gets the same upgrades as the recently-introduced Corolla hatchback, including a firmer foundation, new engine, and more tech features. Will that be enough to keep the long-lived Corolla nameplate relevant?
Computing

Service restored after glitch locks out Microsoft Office 365 business users

Microsoft reported that a problem with its system caused some users to be locked out of their accounts. Because the multifactor authentication system went down globally, some Office 365 and Azure users were unable to log in.
Computing

Need a free alternative to Adobe Illustrator? Here are our favorites

Photoshop and other commercial tools can be expensive, but drawing software doesn't need to be. This list of the best free drawing software is just as powerful as some of the more expensive offerings.
Smart Home

All the best Amazon Black Friday deals for 2018

Amazon may be an online-only retailer, but that doesn’t mean its Black Friday sales are anything to sniff at. In fact, due to its online status, Amazon has huge flexibility with the range of products and deals it can offer. Here's our…
Deals

The best Walmart Black Friday deals in 2018

Walmart has historically been the undisputed king of Black Friday deals. The mega-store is known for offering deals on products in almost every category, from smart TVs to children’s toys. We're combing through every deal as it is…
Computing

Want to game on your Chromebook? Here's where to start

Chromebooks aren't great for gaming, but there are a few titles that most machines can run. There's a surprisingly diverse crowd that includes role-playing games, action side-scrollers, and puzzlers.
Computing

All the best Apple MacBook deals for Black Friday 2018

Shoppers looking for a new Apple laptop could find huge savings on a new MacBook come Black Friday. Retailers are offering discounts as much as $650 on select MacBook, MacBook Air, and MacBook Pro models this holiday season.
Computing

Save a heap with these Black Friday 2018 graphics card deals

The Black Friday 2018 sales period is finally here and it's brought with it a tonne of great component deals. We've been scouring websites and catalogs for days to find you the best graphics cards deals for Black Friday 2018.
Computing

HP takes $100 off of leather-clad Spectre Folio 13 bundle for Black Friday

HP is offering a discount to Black Friday shoppers for a bundle that includes its leather-wrapped answer to Apple's MacBook Air. HP is offering a $100 discount on the Spectre Folio 13 when bundled with a mouse and leather sleeve.
Deals

The best Target Black Friday deals for 2018

The mega-retailer opens its doors to the most competitive shoppers at 6 p.m. on Thursday, November 22, and signs indicate that the retailer means business this year. We've sifted through all of the deals, from consumer electronics to small…
Deals

Black Friday 2018: The best deals so far

Black Friday 2018 is the biggest shopping holiday of the year, and some of the best deals have already arrived. We've scoured the web to find discounts from Amazon, Walmart, Best Buy, Target, and more. Don't miss out.