Live data from Hacker News

How Unreal Renders a Frame

interplayoflight.wordpress.com

101–110 of 167 posts

Re: How Unreal Renders a Frame

#101
post #62
post #57

Earlier quoted context omitted.

Its kind of amazing how Unity forced change on Epic though. In the X360-PS3 era they absolutely _dominated_ the market, the list of games built on UE during that time is insane. However, after that, Unity started to come up as it had much nicer licensing and as a response to that Epic made UE almost free to use for small studios and more palatable for big ones.

I don't think Unity forced change on Epic, Unity targeted the nascent indie market very well and was a great replacement for the deprecated XNA. I can't think of a AAA Unity title aside from Microsoft's Recore - which launched with problems at $40. Epic's AAA market ended up with bigger budgets and a demand for more control, so many of them simply created their own engines. So most UE games seem to be big budget indi…

At that point Epic were offering the UDK as the indie alternative. Unity absolutely showed them the way things were going in terms of monetizing technology. Especially given the at the time exorbitant license fees for UE3. Same thing happened at Crytek too.

Part of the continuing split of Unity indie and UE4 'AA/AAA' is less to do with the capabilities of each engine and more to do with who has the longest experience with each. They both are creeping in on one anothers turf in that respect.

Re: How Unreal Renders a Frame

#102

I'm a little surprised at how surprised people are here, at how much work is done per frame! Sure, game engines are really complex and impressive, but the same is true of a lot of other kinds of software. If you work on websites, have you thought about how much processing goes on when loading and rendering a page?

I think people just aren't used to what a GPU does. Most devs are familiar with CPU loads and doing all this work as a CPU task would be pretty tough.

Re: How Unreal Renders a Frame

#103
post #90
post #63

Earlier quoted context omitted.

It's not going to be a simple constant factor. The ideal case will be the same - ultimately the CPU is doing the same work (so provided the JIT picks it up correctly it'll be executing the same instructions) and the GPU is running literally the same shaders, so performance should be identical. It's more a question of how much work you have to do to hit that happy path, and what edge cases pull you off it.

The CPU is going to do some more work because WebGL can't allow the GL app to crash the machine or break into the OS kernel, which regrettably current OpenGL (And DirectX, And Metal, and Vulkan...) drivers allow.

Allowing a userspace application to crash the machine or break into the OS kernel is also a security violation that needs to be prevented; the consequences are less severe than when a web page does it, but it still shouldn't happen. So that should also be the same work in either case.

Re: How Unreal Renders a Frame

#104
post #74

Earlier quoted context omitted.

Different hardware setup - that business might have a database that is dealing with millions of other users at the same time too. In which case they need to invest more in their infrastructure.

It's not always though. Lots of businesses _aren't_ dealing with millions of other users, they're dealing with a handful at a time, and still manage to be painfully slow. Our Jira instance in work is laughably slow despite being hosted on-site on bare metal and used by 20 people (usually not concurrently).

Our Jira instance is shared across multiple academic institutions and is hosting hundreds of active projects and I still find page loads to be pretty much instant, so mileage varies I guess!

(Not to negate your point though. The crappy HR systems are painfully slow and incredibly frustrating to use, in comparison)

Re: How Unreal Renders a Frame

#105
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.

Data IO and actually having to be correct is why business logic is so slow. Sure, there's megabytes of textures but its already uploaded to fast ram on heavily pipelined and massively parallel device.

If you had to look up CRUD vertex and texture data as database rows from another machine through the internet you wouldn't see a very smooth game.

Re: How Unreal Renders a Frame

#106
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.

Data flow, data flow, data flow.

It's all about structuring your data such that don't don't cache miss on your fetches and you don't stall your pipelines by doing operations that flush/occupy the same pipe.

You can easily see 10-50x performance boosts on the same dataset with the right approach.

Look up Data Oriented Design, Mike Acton talks about it a ton.

Re: How Unreal Renders a Frame

#107

I'm a little surprised at how surprised people are here, at how much work is done per frame! Sure, game engines are really complex and impressive, but the same is true of a lot of other kinds of software. If you work on websites, have you thought about how much processing goes on when loading and rendering a page?

[deleted]

Re: How Unreal Renders a Frame

#108
post #60

Earlier quoted context omitted.

The recently released Doom game is using OpenGL (and Vulkan).

id has always made opengl engines. They get to deal with endless driver breakage. When Rage came out I believe AMD cards didn't work at all for over a week.

Bioshock was a DirectX game and I recall that shadows were broken on AMD at launch. There are some OpenGL-specific problems with driver breakage, but AMD would be in much better shape today if that's all it was.

If you read through the patch notes for your video card drivers, you'll probably notice that every major game release gets special support right in the driver.

NVIDIA has three advantages:

1. Most PC gamers have NVIDIA cards, so developers test primarily against NVIDIA cards.

2. NVIDIA has a boatload of driver developers to hack game-specific fixes and improvements right into their driver. They work around game bugs, rewrite slow shaders, and other stuff like that. I assume that's part of why the graphics driver is now well over a hundred megabytes.

3. NVIDIA sends developers to major game studios to optimize and add graphical effects to their games. For instance, volumetric lighting in Fallout 4 was added by an NVIDIA employee.

I think AMD does much of the same, but they just don't have the money to do it to the same extent. That means more breakage and slower fixes.

Re: How Unreal Renders a Frame

#109
post #57

Earlier quoted context omitted.

Its kind of amazing how Unity forced change on Epic though. In the X360-PS3 era they absolutely _dominated_ the market, the list of games built on UE during that time is insane. However, after that, Unity started to come up as it had much nicer licensing and as a response to that Epic made UE almost free to use for small studios and more palatable for big ones.

Wikipedia's insane list of Unreal games: https://en.wikipedia.org/wiki/List_of_Unreal_Engine_games

Imagine the royalties.

Re: How Unreal Renders a Frame

#110
post #99
post #46

Does anyone know of a good book or course that does a deep dive into unreal engine source? I'm trying to level up my graphics programming skills and that seems like it would be an amazing reference, but I don't currently have the knowledge to navigate it myself.

Like the other commenter said, game engines are a huge topic. The game engine architecture book has a nice overview (even though it's hefty), you would probably want an equal size book on each aspect of a game engine; graphics, networking, dynamics, audio, ai, etc. I haven't read it, but also heard good things about the real time rendering book. I did look at the game engine architecture book looking for info about d…

I agree, each topic in the game engine architecture book could be another book on its own. However, it does give a good introduction and briefly touches on most of the topics in this diagram https://i.imgur.com/SxydAoF.png

(diagram is from the book)

Post reply on HN