{"id":10322,"date":"2011-01-07T09:34:20","date_gmt":"2011-01-07T14:34:20","guid":{"rendered":"http:\/\/www.shamusyoung.com\/twentysidedtale\/?p=10322"},"modified":"2011-01-07T09:34:20","modified_gmt":"2011-01-07T14:34:20","slug":"lets-code-part-7-video-production","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=10322","title":{"rendered":"Let&#8217;s Code Part 7: Video Production"},"content":{"rendered":"<p><a href=\"http:\/\/www.sea-of-memes.com\/LetsCode7\/LetsCode7.html\">This week Michael is talking about ray tracing<\/a>.  Ray tracing is an odd thing.  It&#8217;s both the most primitive and the most advanced way to create lighting in a scene.  It&#8217;s basically just a brute force solution.  You simulate the light.  It&#8217;s crazy expensive is terms of CPU power,  so I was shocked at how fast his lighting system is.  Apparently his program can render a single frame in just 2.4 seconds.  Now, that&#8217;s too slow to actually use in a game. But I remember messing around with ray-traced scenes in the early 90&#8217;s, back when a single frame would take over a minute.  <\/p>\n<p>I haven&#8217;t thought about ray tracing in a while, and I guess the progress from 60 seconds to 2.4 seconds sounds about right-ish for the CPU speed increases we&#8217;ve seen since then. (Allowing for the fact that our screens are now larger so we have more pixels to contend with. Perhaps it&#8217;s even possible to render a 640&#215;480 or 800&#215;600 scene at interactive framerates.) But it was still shocking to be reminded of how far we&#8217;ve come.<\/p>\n<p><!--more-->Keep in mind that most graphics technology is about lighting, and most lighting is about trying to get as close to the results of ray-tracing without having to do ray-tracing.  With ray-tracing, everything will cast shadows, and in a scene with lots of light sources you end up with many overlapping shadows around your feet, creating a dark area.  In the 90&#8217;s, someone came up with the idea of simulating this by putting a fuzzy shadow-ish dark blob under the feet of characters.  It simulated that shadow we&#8217;re used to seeing in the real world, thus getting us a tiny step closer to ray-traced appearance without needing to do ray-trace calculations.<\/p>\n<p>Since then, we&#8217;ve come pretty darn close.  When I talk about the rising cost of game development, I&#8217;m mostly talking about the cost of using the newer lighting models.  Setting up the lighting in a Crysis-like game can be very complex.  All the objects need many textures to describe their color, surface contours, shine, and a bunch of other stuff.  We&#8217;ve come close to the ray-traced appearance, but we&#8217;re spending twenty times as much money to do it.  Now all of a sudden I realize that just brute-force ray tracing would be perfectly feasible if it were possible to offload the work onto your graphics card.  (I don&#8217;t think it is.)<\/p>\n<p>And just to be clear, I&#8217;m just musing about how the technology has evolved.  I&#8217;m not not dreaming about a future when everything is ray traced.  Ray tracing can&#8217;t give us cartoon shading or some of the other really impressive visual looks we&#8217;ve seen over the last few years.  (Team Fortress 2, Super Mario Galaxy, Limbo.)  Photorealism can go die in a fire. <\/p>\n<p>Anyway, Michael took the data from the Twenty Sided Minecraft server and put it into his program.  Here is the result:<\/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\/AqW86iZlq9I\" frameborder=\"0\" allowfullscreen class=\"embed\"><\/iframe><br\/><small><a href='http:\/\/www.youtube.com\/watch?v=AqW86iZlq9I'>Link (YouTube)<\/a><\/small><\/td><\/tr><\/table><\/p>\n<p>Really neat. <a href=\"http:\/\/www.sea-of-memes.com\/LetsCode7\/LetsCode7.html\">Read the whole article<\/a> if you want to know the how &#038; why.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week Michael is talking about ray tracing. Ray tracing is an odd thing. It&#8217;s both the most primitive and the most advanced way to create lighting in a scene. It&#8217;s basically just a brute force solution. You simulate the light. It&#8217;s crazy expensive is terms of CPU power, so I was shocked at how [&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-10322","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\/10322","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=10322"}],"version-history":[{"count":0,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/10322\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}