10 ms·
GTA V – Graphics Study
- gdubs 11y agoReally neat to see a big hairy problem broken up into so many small chunks. Multi-pass rendering, level of detail culling, soft-shadow blurring. It reminds me of the Arthur C. Clark quote that "Any sufficiently advanced technology is indistinguishable from magic". There's a phenomenal amount of processing steps happening here, on a frame-by-frame basis. I feel old thinking of how many hours this type of rendering took running 3D Studio Max back in 2002 on a network of Windows NT boxes.
- bd 11y agoYup, modern game engines are complex systems with many parts. Getting nearer to photorealistic graphics [1] isn't just about doing "more of the same and faster" (Moore's Law), it's increasingly also about "division of labor" across many subcomponents. I like this rendering passes breakdown for Battlefield 4 (there are 54 passes): http://imgur.com/N4gJkbm http://imgur.com/N4gJkbm (Frostbite engine by DICE, started as Battlefield franchise backbone, now it's becoming the engine for EA, sharing tech across many games - Battlefield, Dragon Age, Mass Effect, Need for Speed, Star Wars: Battlefront, Mirror's Edge) ----- [1] See e.g. here how close to photo sources Frostbite engine can get today (latest Need for Speed game): http://static1.gamespot.com/uploads/original/1539/15391776/2909917-2479418915-Qt2s3.jpg http://static1.gamespot.com/uploads/original/1539/15391776/2...
- LesZedCB 11y agoI will say it took me an uncomfortably long time to determine which pictures were real. The pavement is a pretty good giveaway, but incredible nonetheless.
- Keyframe 11y agoYeah, they got really good. For the rest - two pictures on the left are from the game engine and two pictures on the right are photographs.
- deleted 11y ago[deleted]
- Thaxll 11y agoFrom what I saw, Frostbite is the most impressive engine out there.
- shahar2k 11y agoa lot of 3d work can be as much determined by stylistic choices and level of artist talent.. frostbyte is likely able to replicate quite a wide range oh physical phenomena and photographic artefacts much like GTA5 but it also heavily depends on the tiny tweaks made to the particular methods used and the assets fed into it to make it truely "photo realistic" honestly these days I'd much rather play a game with good style and direction rather than perfectly repicating reality. it's impressive and will continue to get better for a while, but I like my art a little less like a photo :) (I'm a 3d artist myself, and have to deal with the tradeoff between quality and time on a daily basis)
- SixSigma 11y agoThis took us minutes per frame in 1997 in 3DS4 on a couple of Pentium Pro 180s. https://www.youtube.com/watch?v=kU8pfwlPF4I https://www.youtube.com/watch?v=kU8pfwlPF4I I had to dump the rendered frames off on to the video playback server every 4 hours for about a week over Christmas 1996 because the local disks would be full. That was a weird week !
- jdub 11y agoWow, long time since I've heard that. (I loved "C'mon Kids"!)
- SixSigma 11y agoI met the Boos a few times but I don't really know their music. We had their heads scanned in at a specialist place in London and went to one of their shows. I got on with Martin and I particularly enjoyed the sequence flying around inside his psychedelic head. I made the animated textures and mapped them with C++ and then 3DS did the rendering. The walking tiger is from a plastic toy. I took a scan on an A4 flatbed scanner, rotated it, took another scan until I had a full rotation. I then turned the outlines into vectors with the same number of vertices and made those into a triangulated solid. The three minutes of video took about three months of very long days.
- _nedR 11y ago>"Any sufficiently advanced technology is indistinguishable from magic". I am a software engineer, and I think its black magic. Probably inside your nvidia chip there is a ouija board summoning spirits to conjure images onto your screen. Why else would cards have names like Voodoo?
- nitpickifying 11y ago> ... it’s a real technical prowess. That sentence could be re-worded as: > ... it’s a real display of technical prowess. or > ... it’s a real technical achievement.
- swampthinker 11y agoThe interactive cube demonstration is remarkably well done Adrian. Love it!
- ntaylor 11y agoGTA V's rendering engine has been fascinating to me since I bought it on the Xbox 360, then the PS4, and now the PC. It manages to improve significantly each time. Truly an incredible technical and artistic accomplishment. This series of blog posts is excellent.
- supercoder 11y agoAnd it all happens in 16ms...
- sscotth 11y ago33ms (at best)... There's a max 30fps on consoles. https://www.youtube.com/watch?v=y_XREfxf4ds https://www.youtube.com/watch?v=y_XREfxf4ds
- LeoNatan25 11y agoOn PC it reaches 60 frames quite easily on moderate hardware, and quite beyond as the hardware improves.
- corysama 11y agoThis is the third game that the author has dissected. The previous two are also very nice :) http://www.adriancourreges.com/blog/2015/06/23/supreme-commander-graphics-study/ http://www.adriancourreges.com/blog/2015/06/23/supreme-comma... http://www.adriancourreges.com/blog/2015/03/10/deus-ex-human-revolution-graphics-study/ http://www.adriancourreges.com/blog/2015/03/10/deus-ex-human...
- MasterScrat 11y agoHow does he know so much about the engine internals? Reverse-engineering?
- lispit 11y agoHe used Renderdoc, which lets you pick a frame apart draw call by draw call, inspect shader bytecode, etc. https://github.com/baldurk/renderdoc https://github.com/baldurk/renderdoc
- franzb 11y agoI suspect he's using graphics debugging tools like RenderDoc: https://github.com/baldurk/renderdoc https://github.com/baldurk/renderdoc
- robbies 11y agoHe calls out Renderdoc for picking out rendering internals in the third part of the series: http://www.adriancourreges.com/blog/2015/11/02/gta-v-graphics-study-part-3/ http://www.adriancourreges.com/blog/2015/11/02/gta-v-graphic... You can poke around D3D11 and OGL games, though I haven't tried out the OGL functionality. Next-gen api support is coming as well. If you've poked around other engines, either via debuggers or actual engine development, you actually run into a lot of the same concepts as far as piecing a frame together. The interesting parts come in the details of those sub-passes, which is what gets analyzed by the article author.
- bigdubs 11y agoThis is a great breakdown even for a novice who doesn't know much about how rendering engines typically function. It gives me a new appreciation for games, the amount of work and creativity that goes into the final experience for the player.
- strayptr 11y agoThis is a great breakdown even for a novice who doesn't know much about how rendering engines typically function. What would you like to know? I have some time, so if anyone was hoping to learn more about this, ask me.
- omginternets 11y agoThe only graphics programming I've ever done has been with pygame. What should I read next?
- strayptr 11y agoThis domain is unique in that it's not a good idea to read. The most effective way to navigate this territory seems to be: Think of a simple goal, then force yourself to solve it. Don't look up how to solve it until you're so frustrated that you want to throw your monitor across your room. Actionable advice: Set up a program such that you have an array of pixels. Say, 512x512. Now write a while loop which randomizes those pixels. Finally, figure out some way to "create a window and put those pixels on the screen." You now have a game loop. This is roughly how every game works at a basic level. The next step is to realize that a triangle is the fundamental way to draw shapes quickly. Want to draw a square? That's two triangles. Want to draw a humanoid? Sounds complicated, but artists approximate humanoids with a combination of spheres, cylinders, cubes, etc. And all of those can be divided up into triangles. So a triangle is therefore the first place to start in understanding graphics in general. What's the goal? "Create a data structure to represent a triangle. Now try to draw a white triangle into your little pixel array." It's going to be tough. But tough work is good. I remember how difficult it was for me to even get a basic white triangle up on the screen. But the rewards are worthwhile, because at this point a lot of other things will start to click. A "vertex buffer" will no longer be mysterious, for example, because you'll immediately see that your triangle structure (whatever you came up with) was really just "a vertex buffer with three vertices." And then you'll start to wonder why graphics programmers came up with such complicated words to describe such simple concepts... At this point, you'll have the ability to go in one of two directions: "Notch" or "Carmack." It depends entirely on what you find interesting. If you like the idea of making games, concentrate on creating Pong. (You have everything you need, because you just got a triangle up on the screen, after all.) If you like more along the lines of what the article talks about, then concentrate on creating a software rasterizer. "Software rasterizer" is another one of those terms that turn out to sound scary, but is way easier than you'd expect. It's hard in the same way that learning to ride a bike is hard: it'll take awhile, but you'll never forget it. After that, nothing else you ever do (in graphics) will ever seem even slightly mysterious. I have some thoughts on how to learn the latter, if anyone's interested.
- mmosta 11y agoGreat article regardless of your familiarity with computer graphics or draw pipeline. The supporting media and presentation are as exceptional as the bespoke game engine (RAGE)[0] used in in the GTA series. [0] https://en.wikipedia.org/wiki/Rockstar_Advanced_Game_Engine https://en.wikipedia.org/wiki/Rockstar_Advanced_Game_Engine
- dkns 11y agoNot only a great article but also superbly presented. I really liked all the screenshots showing before and after difference.
- kazinator 11y agoThe "cube map" looks exactly like what Google StreetView does to represent views of the environment from given geographical coordinates.
- blt 11y agoThis is a great article, really amazed at both the computational power of modern hardware and the skill displayed in getting the most out of it. Too bad the game industry sucks to work in or I'd be a game engine programmer for sure.
- jordanthoms 11y agoGTA V's performance and graphics quality when driving around on the PS3 was truly amazing given the hardware, neat to see how they achieved that.
- LeoNatan25 11y agoAstonishing achievement. Now take a look at Batman Arkham Knight on PC and the marvelous technical failure it is.
- TrevorJ 11y agoIf anything, that article gives an inkling of the infinite multitude of ways to screw it up. It's amazing games work as well as they do.
- dates 11y agoHow did the author figure all of that information out?
- elliottcarlson 11y agoThe author works in the games industry, specifically for a company that builds game engines and gaming middleware. Seems to be very knowledgable in his field.
- lispit 11y agoFrom part 3: >Links >The tech that built an empire: how Rockstar created the world of GTA 5 featuring an interview of Aaron Garbut. http://www.techradar.com/news/gaming/the-tech-that-built-an-empire-how-rockstar-created-the-world-of-gta-5-1181281 http://www.techradar.com/news/gaming/the-tech-that-built-an-... >GTA V NVIDIA Performance Guide with details about the different graphics settings. http://www.geforce.com/whats-new/guides/grand-theft-auto-v-pc-graphics-and-performance-guide http://www.geforce.com/whats-new/guides/grand-theft-auto-v-p... >Renderdoc which made picking into GTA V internals a breeze. https://github.com/baldurk/renderdoc https://github.com/baldurk/renderdoc
- 13thLetter 11y agoGreat article. The author did a fantastic job of making the techniques understandable and bringing them down to earth, without dumbing them down -- people who are experienced in graphics are going to learn a few tricks as well from reading this.
- aaronsnoswell 11y ago"Then, to simulate a real-world camera, a lens-distortion is performed on the image by using a small pixel shader. It does not only distorts the image, it also introduces small chromatic aberrations on the edges of the frame, by slightly distorting more the red channel compared to the green and blue ones." Why would the engine do this? Is it to try and give a 'cinematic' feel to the game? Do our eyes suffer Chromatic aberration?
- kgabis 11y agoThey do, but it's removed in post processing :) I like how movie-like GTA V feels and things like that help to achieve this effect.
- johntb86 11y ago> "I believe this mode is used for meshes very far away or transitioning between LOD levels, it allows to save on fillrate and shading calculation by discarding certain pixels." I think this is a better answer for why they use checkerboarding: http://gamedev.stackexchange.com/questions/47844/why-are-some-games-using-some-dithering-pattern-instead-of-traditional-alpha-for http://gamedev.stackexchange.com/questions/47844/why-are-som... Summary: Alpha doesn't work in deferred shading, so they use screendoor transparency instead.
- bd 11y agoYup, Witcher 3 does the same thing (thanks to that GameDev StackExchange link it finally clicked for me why Witcher 3 has that dithered look when moving around). In case it still isn't clear after reading both descriptions of what's going on: that method and a bit weird look comes from using transparency via dithering/checkerboarding when doing LOD levels transitions in deferred rendering pipeline. When rendering levels-of-details, you need to render both higher-level and lower-level quality models at the same time and blend between both, not to have sudden visual discontinuities. In deferred pipeline transparencies are tricky / costly, so doing dithering is a clever workaround, basically piercing holes in a opaque solid models. This would be quite ugly for regular transparent surfaces like glass / windshield / water, so those are rendered in a different way (usually forward pass). But for LOD transitions, which are short in duration, it can look quite acceptable (imagine superimposed images of two versions of one tree, one low-poly model, one high-poly model, further away you are from the tree, more pixels of low-poly tree you see).
- shinymark 11y agoI love computer science and have been attracted to all aspects of it for years. But I still continue to gravitate towards games and this article reminds me of why. Thank you to the author. Practical application of cutting edge graphics tech to both make a beautiful image and create an immersive world is so compelling to me. I also really like the tight visual/audio iteration loop games provide for day to day work. It's incredibly rewarding to me to conceptualize how to solve a problem and have a playable prototype in the next few hours that a real player can test. I can imagine myself working in various fields but I'm always drawn back to games for better or worse. While it's just as likely as a developer you'll incite gamer rage with some small mishap there is also the opportunity to make a piece of entertainment people love and remember. That's the goal I keep striving for in my work.
- Impossible 11y agoIt's nice to see an honest, positive post about the game industry on HN.
- oxide 11y agoReading about how optimization is handled in games is extremely interesting. It really makes me appreciate some of the more well optimized games, it sounds like solving a very difficult puzzle.