{"id":12569,"date":"2011-08-08T07:00:11","date_gmt":"2011-08-08T12:00:11","guid":{"rendered":"http:\/\/www.shamusyoung.com\/twentysidedtale\/?p=12569"},"modified":"2011-08-08T02:57:13","modified_gmt":"2011-08-08T07:57:13","slug":"john-carmack-2011-keynote-annotatedpart-1-of-3","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=12569","title":{"rendered":"John Carmack 2011 Keynote Annotated:<br\/>Part 1 of 3"},"content":{"rendered":"<p>On Friday, August 5th, John Carmack gave the keynote address for Quakecon 2011. He does this every year, and always has interesting and important things to say about the industry. <\/p>\n<p>This year, I thought I&#8217;d give my own commentary on what he said.  His talk lasted for about an hour and a half, so there&#8217;s a lot of ground to cover here. I apologize for the awkwardness of this.  Ideally there would be a way to seamlessly have my comments available during his talk, or a link to my comments, but instead we have to do this the other way.  This might be a bit of a pain to watch.  I&#8217;d suggest simply watching the whole thing, rather than trying to pause-and-play your way through it, but whatever works. <\/p>\n<p>First is the talk in full, followed by my comments, with links to the individual timestamps in question. <\/p>\n<p><table class='nomargin' cellspacing='0' width='100%' cellpadding='0' align='center' border='0'><tr><td><iframe loading=\"lazy\" width=\"1024\" height=\"576\" src=\"https:\/\/www.youtube.com\/embed\/4zgYG-_ha28\" frameborder=\"0\" allowfullscreen class=\"embed\"><\/iframe><br\/><small><a href='http:\/\/www.youtube.com\/watch?v=4zgYG-_ha28'>Link (YouTube)<\/a><\/small><\/td><\/tr><\/table><\/p>\n<p>Before we begin: Man, that thumbnail view of Carmack is really unfortunate.  The guy spent an hour and a half looking calm, measured, and thoughtful, and the thumbnail managed to capture this expression of wacky, comedic bafflement.<\/p>\n<p><!--more--><\/p>\n<h3><a href=\"http:\/\/www.youtube.com\/watch?v=4zgYG-_ha28#t=3m45s\">3:45<\/a><\/h3>\n<p> It&#8217;s interesting that he mentioned Skyrim.  Remember that <a href=\"http:\/\/www.escapistmagazine.com\/news\/view\/92641-ZeniMax-Media-Acquires-id-Software-UPDATED\">ZeniMax now owns id Software<\/a>. ZeniMax also owns Bethesda, so he&#8217;s talking about a product from a sister development studio.  <\/p>\n<p>I&#8217;ve belabored in the past the systemic development problems I see inside of Bethesda with regard to technology, but the basic list is:  <\/p>\n<ol>\n<li><strong>Bugs, or dysfunctional QA process<\/strong>.  I don&#8217;t know what it is, but their games are always wonky and unstable.\n<\/li>\n<li><strong>Inefficient coding<\/strong>. The system specs for Oblivion were about a graphics card generation ahead of where they should have been, as <a href=\"?p=491\">Oldblivion<\/a> demonstrated.\n<\/li>\n<li><strong>Haphazard art assets<\/strong>.  Oblivion had 3,000 polygon boulders and 28 polygon tufts of grass.  This is a waste even by 2011 standards, and was criminal in 2006.  In the same game, they were using 128&#215;128 textures for character faces, which was shockingly <em>low<\/em> for the times.  This could be a management problem. It could be a tools problem. It could be a problem in the company culture. I don&#8217;t know, but the behavior has persisted through several games.\n<\/li>\n<li><strong>Horrible development tools<\/strong>.  The Elder Scrolls Construction Set (the editor for Oblivion) is just a terrible tool.  Yes, it can DO everything it needs to do, but the interface is horrible, it eats a ton of resources, and it&#8217;s agonizingly slow and unresponsive.  Compare this with Doom 3, where the editing process consists of opening up the console, typing &#8220;ed&#8221;, and immediately being able to edit the world seamlessly in a responsive, intuitive environment.\n<\/li>\n<\/ol>\n<p>The point is, the things that Bethesda does poorly are things that id Software does exceptionally well. (Probably better than anyone else.)  id Software nails the system specs (sometimes they&#8217;re higher than what might be ideal in a market sense, but they&#8217;re never higher than they need to be from an engineering standpoint) they have incredible tools, and their software is usually quite stable.<\/p>\n<p>I don&#8217;t know how much cooperation or technology sharing we&#8217;ll see between these two companies, but I dream of a day where I can get Bethesda gameplay and id technology. Hopefully the next game (after Skyrim) will have some id Tech under the hood.<\/p>\n<h3><a href=\"http:\/\/www.youtube.com\/watch?v=4zgYG-_ha28#t=7m20s\">7:20<\/a><\/h3>\n<p>When John Carmack says something is &#8220;dismayingly complicated&#8221;, it&#8217;s like Lance Armstrong saying something is &#8220;exhaustingly strenuous&#8221;, or Bill Gates calling something &#8220;bankruptingly expensive&#8221;.<\/p>\n<p>The megatexture tech does strike me as being that complicated, although it would have been a lot easier to pull off if this was a world where they could still ignore the consoles and go PC-exclusive.  A lot of the complexity and effort seems to have  centered on the challenge of getting the technology to work in a slow-reading, low-memory environment of the consoles. <\/p>\n<p>I&#8217;ll explain megatextures in more detail below.<\/p>\n<h3><a href=\"http:\/\/www.youtube.com\/watch?v=4zgYG-_ha28#t=9m40s\">9:40<\/a><\/h3>\n<p>&#8220;Like any good engineer&#8221; &#8211; I think this problem extends beyond engineers.  I call this &#8220;artistic myopia&#8221;, and I suffer from it now and again.  It&#8217;s really easy to examine a piece of work in such detail that all you can see are the flaws, and you end up burning a ton of time polishing things that only a tiny fraction of players (most of whom will be fellow industry artists, scrutinizing your work) will ever notice. It&#8217;s kind of like how photographers and models look at photos and all they see are pores, wrinkles, and skin blemishes, and end up photoshopping them out, when most viewers will be too caught up looking at the beautiful face to notice.  It takes a good bit of mental discipline to force yourself to see the work as the consumer would see.  You need to be able to switch from &#8220;professional view&#8221; to &#8220;consumer view&#8221;, and know when it&#8217;s time to stop fussing with it.<\/p>\n<p>If you manage to do this, please tell me how.<\/p>\n<h3><a href=\"http:\/\/www.youtube.com\/watch?v=4zgYG-_ha28#t=10m35s\">10:35<\/a><\/h3>\n<p>Here he begins his talk on the megatexturing system, which is the technological &#8220;hook&#8221; of this game.  Here is what megatexturing is all about, as far as I&#8217;ve been able to work out:<\/p>\n<p>In all other games, there are separate and distinct texture maps for all the various bits of scenery. I mentioned Oblivion before, where they would have a 128&#215;128 texture for each face in the scene.  Here is a 128&#215;128 texture, just to give you an idea of how little data that is:<\/p>\n<p><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/quakecon1.jpg' class='insetimage'   alt='Note that this is a random face texture I found through Google. It&#8217;s not a texture from Oblivion.' title='Note that this is a random face texture I found through Google. It&#8217;s not a texture from Oblivion.'\/><\/td><\/tr><tr><td class='insetcaption'>Note that this is a random face texture I found through Google. It&#8217;s not a texture from Oblivion.<\/td><\/tr><\/table><\/p>\n<p>In another part of the scene you&#8217;ll have a piece of fruit with another texture. And another for the bowl holding the fruit, the table holding the bowl, the silverware on the table, the furniture in the room, the clothes people are wearing, the walls, the windows, and so on.  You can have hundreds of textures in play at any given time.  If done well, objects will be textured according to how large they are, and how closely the player will examine them.  Walls are huge, so they need lots of texture data. Silverware is tiny and you only see it at a distance, so it needs very little data.  Faces are small, but the camera zooms in on them, so they need lots of data.  <\/p>\n<p>The problem is that in wide open spaces, you can end up with a lot of texture maps in memory.  You have ten buildings in the distance. They&#8217;re too large to simply not render them, and their textures are immense.  (Because when you get close, you need a ton of pixels.  This is a building after all, and the player will expect to be able to walk right up to the front door without the building turning into a blurry mess.)  Some people mistakenly think that <a href=\"http:\/\/en.wikipedia.org\/wiki\/MIP_mapping\">mip-mapping<\/a> solves this, but mips are used to make those huge textures look good when reduced to a small space, as on the buildings in the distance.  Mipmaps can&#8217;t actually help with the problem that the base texture is gigantic and takes a ton of memory, whether you need it all or not. <\/p>\n<p>See, you can use 99.9% of the graphics memory with no penalty.  You can fill the graphics card up with texture data as much as you like, but the moment your memory usage exceeds 100% &#8211; even by a little bit &#8211; your framerate is going to drop like a rock.  You should not be surprised to find yourself in single digits when this happens. <\/p>\n<p>It&#8217;s very hard for artists to manage this texture data properly, because they generally don&#8217;t have the technical knowledge to understand the nuances of the problem. There&#8217;s a lot going on as the player swings their camera around and brings new elements into view and pushes other elements out of view. It&#8217;s hard to understand why one building will occlude the others behind it (thus removing them and their memory-sucking textures from the rendering) while a hill of the same size will not. It&#8217;s hard to look at the game and see where video memory might be going to waste.  In the end you end up with with your <em>artists<\/em> sweating over esoteric <em>technical<\/em> details, which is not what you want.  Artists make art.  Programmers make technology. Try to avoid requiring too much cross-discipline work, because programmers are usually rotten artists and artists have no patience for technological fussing that requires they understand the details of GPU memory management. <\/p>\n<p>The other disadvantage of traditional texturing systems is that they involve texture tiling. The artist takes a picture of a brick wall, and repeats it over the face of a building.  If there&#8217;s a great big crack in the bricks, or some graffiti, then that same bit of detail will be repeated every (say) 16 meters.  You can make textures tile more often, which will make them more detailed at the expense of making them more repetitive.  Or you can go other other way, and have less repetition at the expense of everything looking a bit blurrier. Adding more cracks, graffiti, water stains, scorch marks, or discolorations will make the wall much more interesting to look at, but it will also hurt you because the player will see that same bit of interesting detail being repeated again and again.<\/p>\n<p>Megatexturing attempts to solve all of this by letting the artists paint directly onto the world, without worrying about texture memory or tiling at all.  They paint everything at a fixed resolution.  (So you don&#8217;t have the Oblivion problem where some nutter slaps a huge 1024&#215;1024 texture onto a teaspoon, or some other nutter puts a dinky little 64&#215;64 texture onto a wall. If you download a enough user mods, you can probably see both of these problems in action.) The editor takes all of this high-resolution data and saves it to disk. They can put all the cracks and scorch marks and other detail anywhere they like, with no performance penalty or need to repeat the same detail elsewhere. <\/p>\n<p>Carmack seems to describe the engine as having a single texture for the whole world,  stored at varying resolutions depending on how close you are to any given bit. Josh likened it to Google Earth, which is a pretty good analogy.  You can view Fresno in sharp detail without needing to have the data for Helsinki  in memory.  Like Google Earth, you can scroll from one location to another, and it will add detail where you&#8217;re headed and remove detail where you&#8217;ve been.  Unlike Google Earth, Rage needs a lot more (concurrent) texture data, and it needs it in a tremendous hurry. <\/p>\n<p>At run time, the game engine has to load in all of this data for the area around you.  You end up with most of the scenery being drawn from a single texture, which is cut up into little bite-sized chunks.  It sort of looks like the Minecraft texture:<\/p>\n<p><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/quakecon2.jpg' class='insetimage'   alt='quakecon2.jpg' title='quakecon2.jpg'\/><\/td><\/tr><\/table><\/p>\n<p>Except in Rage, the megatexture is 4096&#215;4096.  (That&#8217;s 16 times wider than the example image you see above.) Unlike Minecraft, the individual chunks are constantly changing.  Higher detail bits are pulled in as you get close to surfaces.  The biggest hurdle isn&#8217;t making all of this work, but in getting the data off of the disk (especially if we&#8217;re dealing with a DVD or Blu-Ray) and into memory in a timely manner.  A lot of Carmack&#8217;s talk centers around this challenge.<\/p>\n<p>When complete, we have a system where the artists won&#8217;t have to worry about the technology at all. Well, except for&#8230;<\/p>\n<h3><a href=\"http:\/\/www.youtube.com\/watch?v=4zgYG-_ha28#t=13m20s\">13:20<\/a><\/h3>\n<p>&#8230;this.  <\/p>\n<p>The interesting thing is that now the artist is not limited by texture count or resolution as before (since those are now managed by the engine) but by <em>surface area<\/em>.  Assuming I&#8217;m following his talk, the amount of texture data in use is dependent on how much surface area is being drawn.  More importantly, each little bit of scenery pays a minimum cover charge to get into the scene.  Maybe a one-meter crate uses a 128&#215;128 patch of texture.  However, the little lunchbox next to it also eats a 128&#215;128 chunk, even though most of it is going to go to waste.  Some of these tiny &#8220;lunchbox&#8221; items can be merged and share a 128&#215;128 patch. But this will introduce a bunch of expenses that are not obvious to the busy artist.  Making one of those &#8220;lunchboxes&#8221; more than a half meter wide will cause this object to nudge out its texture neighbors, suddenly hogging a patch to itself.<\/p>\n<p>I&#8217;d love to know how he handles the uv addressing.<\/p>\n<h3><\/h3>\n<p>We&#8217;ll continue to work our way through this presentation tomorrow.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On Friday, August 5th, John Carmack gave the keynote address for Quakecon 2011. He does this every year, and always has interesting and important things to say about the industry. This year, I thought I&#8217;d give my own commentary on what he said. His talk lasted for about an hour and a half, so there&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[],"class_list":["post-12569","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/12569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12569"}],"version-history":[{"count":0,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/12569\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}