{"id":859,"date":"2011-05-18T16:20:42","date_gmt":"2011-05-18T23:20:42","guid":{"rendered":"http:\/\/the-witness.net\/news\/?p=859"},"modified":"2011-05-18T22:17:42","modified_gmt":"2011-05-19T05:17:42","slug":"more-island-color-experiments-shadow-update","status":"publish","type":"post","link":"http:\/\/the-witness.net\/news\/2011\/05\/more-island-color-experiments-shadow-update\/","title":{"rendered":"More island color experiments; shadow update"},"content":{"rendered":"<p>Until now, we had been using Uncharted-2-style blend mapping to color our terrain.  This is a way of using a low-resolution texture map to control the blending of high-resolution textures; this gives you the ability to maintain fine pixel-by-pixel detail while also blending between multiple textures in order to create larger-scale patterns.  (This method is in effect in earlier screenshots like <a href=\"http:\/\/the-witness.net\/news\/?p=835\">this one<\/a>, though keep in mind that we were not using it very seriously in a whole-island kind of way yet.  For some idea of what the blend mapping looks like closer-in, see <a href=\"http:\/\/the-witness.net\/news\/?p=807\">this<\/a> or <a href=\"http:\/\/the-witness.net\/news\/?p=784\">this<\/a>.)<\/p>\n<p>But now we are thinking about how to create colorful scenes, like in <a href=\"http:\/\/the-witness.net\/news\/?p=852\">the previous post<\/a>, and this style of blend-mapping did not seem like a very good idea.  In order to create gradients across the scene, we would need to have a lot of blend layers; this would be slow and use a lot of texture memory (since now we are storing a lot of individual blend maps). Even once we did that, it would be laborious to control, and it's unclear that it would look good.<\/p>\n<p>Ignacio mentioned that the Wolfire guys were just dropping one color map across their whole terrain.  That seemed like a good idea to me -- I have done that before, but in contexts where we were trying to really crank up the resolution to levels that were ridiculous at the time, like 8192x8192 texture maps back in 2001.  Rather than doing that, the idea now is to just use what is a reasonable-sized texture on a modern machine, and see what it looks like.  So Shannon painted a 2048x2048 texture of the island (of which we are only really using less than half right now) and here's how it looks from up high:<\/p>\n<p><a href=\"http:\/\/the-witness.net\/news\/wp-content\/uploads\/2011\/05\/shot_2011.05.18__time_12_39_n01.png\"><img src=\"http:\/\/the-witness.net\/news\/wp-content\/uploads\/2011\/05\/shot_2011.05.18__time_12_39_n01-300x168.png\" alt=\"\" title=\"shot_2011.05.18__time_12_39_n01\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-860\" \/><\/a><\/p>\n<p>Immediately this strikes me as much nicer, and much more in-tune with the art direction we want for the game.  The buildings and other meshes now stick out like sore thumbs, but that is just what happens when you improve only a part of the scene.  We'll be working on this.<\/p>\n<p>Here's a scene from closer in:<\/p>\n<p><a href=\"http:\/\/the-witness.net\/news\/wp-content\/uploads\/2011\/05\/shot_2011.05.18__time_12_40_n02.png\"><img src=\"http:\/\/the-witness.net\/news\/wp-content\/uploads\/2011\/05\/shot_2011.05.18__time_12_40_n02-300x168.png\" alt=\"\" title=\"shot_2011.05.18__time_12_40_n02\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-861\" \/><\/a><\/p>\n<p>As you can see, we have less detail close-up on the ground; things look a bit blurry.  However, the colors are a lot better, and I think if we can adapt this scheme into something that permits sharper details up close, we will be able to make something that has a lot of character and looks special.  In these shots, we are still using the old blend map system to tile high-detail normal maps across the terrain; that helps, but by itself it's not enough.  (In recent videos for Overgrowth, <a href=\"http:\/\/blog.wolfire.com\/2011\/05\/Overgrowth-a131-video-changelog\" onclick=\"_gaq.push(['_trackEvent', 'outbound-article', 'http:\/\/blog.wolfire.com\/2011\/05\/Overgrowth-a131-video-changelog', 'like this one']);\" >like this one<\/a>, you can see that they are doing something that provides close-up details, maybe just intensity maps that are being modulated by the color map).  So we'll keep working on this and see how it goes.<\/p>\n<p>Meanwhile, Ignacio has been revising the shadow map rendering.  We used to have very speckly shadow maps, as I was using a 4-sample Poisson disc to sample the shadow map.  Ignacio recently switched this to a Gaussian that has more taps, then applied some math tricks to reduce the number of taps.  This results in softer shadows:<\/p>\n<p><a href=\"http:\/\/the-witness.net\/news\/wp-content\/uploads\/2011\/05\/shot_2011.05.18__time_12_42_n03.png\"><img src=\"http:\/\/the-witness.net\/news\/wp-content\/uploads\/2011\/05\/shot_2011.05.18__time_12_42_n03-300x168.png\" alt=\"\" title=\"shot_2011.05.18__time_12_42_n03\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-862\" \/><\/a><\/p>\n<p>At some angles, shadow map jaggies still show up pretty clearly:<\/p>\n<p><a href=\"http:\/\/the-witness.net\/news\/wp-content\/uploads\/2011\/05\/shot_2011.05.18__time_12_42_n04.png\"><img src=\"http:\/\/the-witness.net\/news\/wp-content\/uploads\/2011\/05\/shot_2011.05.18__time_12_42_n04-300x168.png\" alt=\"\" title=\"shot_2011.05.18__time_12_42_n04\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-863\" \/><\/a><\/p>\n<p>This is something we might work around in the final game by changing the scene when this happens!  Or, it's possible the shadows will be modified further so that they look smoother in cases like this.  Who can say?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Until now, we had been using Uncharted-2-style blend mapping to color our terrain. This is a way of using a low-resolution texture map to control the blending of high-resolution textures; this gives you the ability to maintain fine pixel-by-pixel detail while also blending between multiple textures in order to create \u2026<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"http:\/\/the-witness.net\/news\/2011\/05\/more-island-color-experiments-shadow-update\/\">Continue reading<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,8],"tags":[],"_links":{"self":[{"href":"http:\/\/the-witness.net\/news\/wp-json\/wp\/v2\/posts\/859"}],"collection":[{"href":"http:\/\/the-witness.net\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/the-witness.net\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/the-witness.net\/news\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/the-witness.net\/news\/wp-json\/wp\/v2\/comments?post=859"}],"version-history":[{"count":9,"href":"http:\/\/the-witness.net\/news\/wp-json\/wp\/v2\/posts\/859\/revisions"}],"predecessor-version":[{"id":1256,"href":"http:\/\/the-witness.net\/news\/wp-json\/wp\/v2\/posts\/859\/revisions\/1256"}],"wp:attachment":[{"href":"http:\/\/the-witness.net\/news\/wp-json\/wp\/v2\/media?parent=859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/the-witness.net\/news\/wp-json\/wp\/v2\/categories?post=859"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/the-witness.net\/news\/wp-json\/wp\/v2\/tags?post=859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}