{"id":73,"date":"2013-06-23T20:45:00","date_gmt":"2013-06-23T20:45:00","guid":{"rendered":"http:\/\/oneiricworlds.com\/en\/index.php\/2013\/06\/23\/steven-the-seagull\/"},"modified":"2016-02-22T09:13:18","modified_gmt":"2016-02-22T09:13:18","slug":"steven-the-seagull","status":"publish","type":"post","link":"https:\/\/oneiricworlds.com\/en\/2013\/06\/steven-the-seagull\/","title":{"rendered":"Steven (the) Seagull"},"content":{"rendered":"<p>Hello everybody,<\/p>\n<p>Recently, I wanted to work on something&#8230; absolutely not necessary for the game, but that may contribute highly to the atmosphere. In the few games I&#8217;ve played, I&#8217;ve particularly enjoyed moments where the player can navigate freely and discovers many &#8220;living&#8221; creatures. In my game, I&#8217;d like to recreate this kind of feeling by creating an open world set on an ocean with a few islands (not very big, but enough to wander around).<\/p>\n<p>So I chose to work on what will be visible a LOT during the game, and hopefully will contribute to a peacefull atmosphere: the sky, the sea, and a few birds and fishes. Here it is:<\/p>\n<div style=\"clear: both; text-align: center;\">\n<p><iframe loading=\"lazy\" title=\"Water, sky and life\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/vU2EcZXP6rg?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<\/div>\n<div style=\"text-align: center;\">\n<p><i>Video of water, sky and life \ud83d\ude42<\/i><\/p>\n<div style=\"text-align: left;\"><\/div>\n<\/div>\n<h3>I &#8211; The Ocean<\/h3>\n<p>For the ocean, I imposed to myself a technical constraint: I don&#8217;t want the water to be transparent, and the camera will never go underwater. Why?<\/p>\n<ul>\n<li>Because, technically, transparent shaders need more GPU\/CPU power to render and are not suited to old hardware<\/li>\n<li>Because it would require me to model everything that is underwater, which might be huge for an open water world.<\/li>\n<li>Because if the player can actually SEE what is underwater, he may WANT to go there. I already plan to authorize the player to fly at some point, I think it would be enough to sell him some &#8220;freedom&#8221; feeling.<\/li>\n<li>Because I&#8217;m a fan of the ocean in &#8220;Beyond Good and Evil&#8221; and &#8220;Zelda Windwaker&#8221;, and it is not transparent in those games (but in very different styles), which proves that you don&#8217;t have to be realistic to create something powerful.<\/li>\n<\/ul>\n<p>Note that it doesn&#8217;t mean I don&#8217;t want the ocean to be REFLECTIVE. Thus, I spent some time tuning and tweaking some Unity ocean shader to get something reflective, with some cartoonish pure white waves:<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"http:\/\/3.bp.blogspot.com\/-ZH2MNSC9HCE\/UcdPc2SjFnI\/AAAAAAAAGi4\/YZZvMvxtI58\/s1600\/20130612_172145.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/3.bp.blogspot.com\/-ZH2MNSC9HCE\/UcdPc2SjFnI\/AAAAAAAAGi4\/YZZvMvxtI58\/s320\/20130612_172145.png\" alt=\"\" width=\"320\" height=\"179\" border=\"0\" \/><\/a><\/div>\n<div style=\"text-align: center;\"><i>Water, sky and wind <\/i><\/div>\n<p>&nbsp;<\/p>\n<h3>II &#8211; The Sky<\/h3>\n<p>About the sky, I wanted the player to feel some endless space. And I though adding some wind would increase this feeling. Hence, I added some wind moving curls, and some wind noise. I set a few clouds moving around above the horizon line. All this is done dynamically and randomly. Maybe, later, I&#8217;ll add some weather managing process to increase immersion.<\/p>\n<p>At the moment, the sky is only a pure color (some kind of cyan), but this will change too.<\/p>\n<h3>III &#8211; Life<\/h3>\n<p>And the more time-consuming part was&#8230; creating &#8220;living&#8221; birds and fishes. The process is quite the same for both. First I create a 3D model in Blender (maybe a more detailed post on this later), like this:<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"http:\/\/2.bp.blogspot.com\/-PJv1Jn0TIro\/UcdTNazALQI\/AAAAAAAAGjI\/6L06qKkfWkE\/s1600\/seagull5.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-PJv1Jn0TIro\/UcdTNazALQI\/AAAAAAAAGjI\/6L06qKkfWkE\/s320\/seagull5.jpg\" alt=\"\" width=\"320\" height=\"180\" border=\"0\" \/><\/a><\/div>\n<div style=\"text-align: center;\"><i>Steven, the seagull in Blender. The magic behind every video game entity is just a more-or-less complex bunch of 3D triangles with some image(texture) patched on it. For careful lookers, yes, the texture is far from optimized.<\/i><\/div>\n<p>Of course, I use LOTS of references. Then I create 3 basic animations for my seagull (let&#8217;s call him Steven ;): a simple wing move, a glide move, a &#8220;scream&#8221; move. Every animation is &#8220;loopable&#8221;, that is to say it can be played in loop with a perfect match between the first and the last frame.<\/p>\n<p>Then, in Unity, I add some &#8220;intelligence&#8221; (or stupidity, depending on how you see it) to Steven: it randomly goes from one animation\/activity to the other, in loop. Of course, when it screams, I also add the correct sound. And then, I program some basic algorithm to make it go towards a random goal (some kind of proportionnal correction for those of you automatician guys out there). I won&#8217;t go in much deeper details because it&#8217;s always a bit more complicated than that, but the basic idea is here.<\/p>\n<p>It&#8217;s about the same thing for the fish, except I had to work on some &#8220;jump&#8221; algorithm. All of this is purely random, and every fish and bird moves around a goal (that can be dynamically changed, which will theorically enable me to make them follow a boat for example).<\/p>\n<p>And this whole world goes like the above video!<\/p>\n<p>That&#8217;s all for today!<br \/>\nIf you find this interesting\/useful, or you want to help me promote it, feel free to share, tweet, re-blog, talk to your friend, whatever&#8230;<\/p>\n<p>Peace!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello everybody, Recently, I wanted to work on something&#8230; absolutely not necessary for the game, but that may contribute highly to the atmosphere. In the few games I&#8217;ve played, I&#8217;ve particularly enjoyed moments where the player can navigate freely and discovers many &#8220;living&#8221; creatures. In my game, I&#8217;d like to recreate this kind of feeling [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":191,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[20],"class_list":["post-73","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev","tag-blender"],"_links":{"self":[{"href":"https:\/\/oneiricworlds.com\/en\/wp-json\/wp\/v2\/posts\/73","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneiricworlds.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oneiricworlds.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oneiricworlds.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oneiricworlds.com\/en\/wp-json\/wp\/v2\/comments?post=73"}],"version-history":[{"count":2,"href":"https:\/\/oneiricworlds.com\/en\/wp-json\/wp\/v2\/posts\/73\/revisions"}],"predecessor-version":[{"id":193,"href":"https:\/\/oneiricworlds.com\/en\/wp-json\/wp\/v2\/posts\/73\/revisions\/193"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oneiricworlds.com\/en\/wp-json\/wp\/v2\/media\/191"}],"wp:attachment":[{"href":"https:\/\/oneiricworlds.com\/en\/wp-json\/wp\/v2\/media?parent=73"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oneiricworlds.com\/en\/wp-json\/wp\/v2\/categories?post=73"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oneiricworlds.com\/en\/wp-json\/wp\/v2\/tags?post=73"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}