Live data from Hacker News

How Unreal Renders a Frame

interplayoflight.wordpress.com

11–20 of 167 posts

Re: How Unreal Renders a Frame

#11
post #3

Sheesh. How many engineer-hours have gone into Unreal?

A hell of a lot, the engine itself was in development for around three years IIRC

Which is why there is the games industry saying that one either builds an engine or a game.

Also why commercial game developers usually don't whine about 3D APIs like FOSS indie devs do.

Adding support for yet another graphics backend is a trivial task, compared to the overall feature set of a game engine.

Re: How Unreal Renders a Frame

#12
post #8
post #6

So all of this processing happens for one frame? And this is going on at 60 Hz?

Yes, and more. You’ve also got a rigid body (physics) simulation, ai/pathfinding, animation, networking, audio and gameplay logic all to run. If you’re making an open world game, you also need to have streaming code to load and unload parts of the game on the fly. It doesn’t always happen at 60hz (which is 16ms total processing time for all the above plus what’s in the post). Some games run at 30hz(33ms), some run un…

The situation has changed a little bit recently with the introduction of adaptive synchronization monitor standards(GSync and Freesync). On PC this means that framerates above some minimum target can drift without experiencing tearing or missed deadlines.

Re: How Unreal Renders a Frame

#13
post #6

So all of this processing happens for one frame? And this is going on at 60 Hz?

I'm completely fascinated that games can perform massive amounts of math and render 120 frames per second, while some business applications fail to do completely basic data manipulation in an reasonable time frame.

Re: How Unreal Renders a Frame

#14
This is why I don't get why the game industry has such a bad rep for overworking people.

It's genuinely hard to do this kind of code so you'd think they take care not to scare away the few people who can do it.

I recall at one point Goldmans was bragging to my team about how they'd hired a game dev to do their click-to-trade currency UI. Seemed like the guy found an easier job for more pay.

Re: How Unreal Renders a Frame

#15
post #6

So all of this processing happens for one frame? And this is going on at 60 Hz?

I'm completely fascinated that games can perform massive amounts of math and render 120 frames per second, while some business applications fail to do completely basic data manipulation in an reasonable time frame.

I think it comes down to requirements. If games aren't running smoothly, people simply won't play them.

Business apps have it a lot easier - the users are more forgiving, I guess either because they don't have a choice in the matter or any better options.

Re: How Unreal Renders a Frame

#16
post #8

Earlier quoted context omitted.

Yes, and more. You’ve also got a rigid body (physics) simulation, ai/pathfinding, animation, networking, audio and gameplay logic all to run. If you’re making an open world game, you also need to have streaming code to load and unload parts of the game on the fly. It doesn’t always happen at 60hz (which is 16ms total processing time for all the above plus what’s in the post). Some games run at 30hz(33ms), some run un…

The situation has changed a little bit recently with the introduction of adaptive synchronization monitor standards(GSync and Freesync). On PC this means that framerates above some minimum target can drift without experiencing tearing or missed deadlines.

Yes, but it still drops the frame as far as I know (works like a charm by the way, in my experience).

Re: How Unreal Renders a Frame

#17
post #6

So all of this processing happens for one frame? And this is going on at 60 Hz?

This mostly all translates to math equations, and with data oriented design a computer can crunch through this stuff extremely quickly. But this kind of stuff is why C++ is still popular - determinism is really important to get consistent performance at this low level. Also shader code is quite restrictive in order to keep performance up.

Edit: replaced 'driven' with 'oriented' - thanks Narishma

Re: How Unreal Renders a Frame

#18

This is why I don't get why the game industry has such a bad rep for overworking people. It's genuinely hard to do this kind of code so you'd think they take care not to scare away the few people who can do it. I recall at one point Goldmans was bragging to my team about how they'd hired a game dev to do their click-to-trade currency UI. Seemed like the guy found an easier job for more pay.

This is just capitalism at work; in the game industry there is no guaranteed reward at the end of the development cycle, so you have to keep up the pressure in order to beat out your competitors, and increase your chances of winning. This leads to crunching, 60 hour weeks and mass layoffs when you lose - lookup any of the top AAA game companies on Glassdoor and you will find they are awful places to work (Projekt Red, Rockstar, the now extinct Crytek, EA - consistently voted 'Worst Company', etc).

Re: How Unreal Renders a Frame

#19
post #8

Earlier quoted context omitted.

Yes, and more. You’ve also got a rigid body (physics) simulation, ai/pathfinding, animation, networking, audio and gameplay logic all to run. If you’re making an open world game, you also need to have streaming code to load and unload parts of the game on the fly. It doesn’t always happen at 60hz (which is 16ms total processing time for all the above plus what’s in the post). Some games run at 30hz(33ms), some run un…

The situation has changed a little bit recently with the introduction of adaptive synchronization monitor standards(GSync and Freesync). On PC this means that framerates above some minimum target can drift without experiencing tearing or missed deadlines.

Indeed, that's what I meant by "most hardware", but that hardware is definitely outside the reach of most people right now. Firstly, consoles don't support adaptive sync, and most tv's don't either, so that eliminates all PS4/XB1 (and their derivatives). Then to actually get a screen with GSync, you're talking ~350 pounds [0] for an entry level one, and realistically you're going to need a medium to high-end graphics card (looking on nvidia's website seems their support is actually far better than I expected it to be). Unfortunately, for the majority of people adaptive sync is still a few years off, and I'd be surprised if we saw it this decade.

[0]https://www.scan.co.uk/shop/computer-hardware/monitors/monit...

Re: How Unreal Renders a Frame

#20
post #6

So all of this processing happens for one frame? And this is going on at 60 Hz?

Yes? You're looking at an entire vertically integrated software-hardware business built to make this possible.

A GTX 1060 has 4.4 TFLOPs of processing power. 1920 * 1080 = 2073600 pixels per frame, or 125 million pixels per second. Divide that into 4.4T and you get a budget of max 35,000 operations per pixel. That's quite a lot. In practice you will often spend time waiting for textures to arrive from RAM.

The techniques themselves have also been built up over decades. There's a lot of giants to stand on.

Post reply on HN