June 23, 2013

Steven (the) Seagull


Hello everybody,

Recently, I wanted to work on something... absolutely not necessary for the game, but that may contribute highly to the atmosphere. In the few games I've played, I've particularly enjoyed moments where the player can navigate freely and discovers many "living" creatures. In my game, I'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).

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:

Video of water, sky and life :)

I - The Ocean


For the ocean, I imposed to myself a technical constraint: I don't want the water to be transparent, and the camera will never go underwater. Why?
  • Because, technically, transparent shaders need more GPU/CPU power to render and are not suited to old hardware
  • Because it would require me to model everything that is underwater, which might be huge for an open water world.
  • 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 "freedom" feeling.
  • Because I'm a fan of the ocean in "Beyond Good and Evil" and "Zelda Windwaker", and it is not transparent in those games (but in very different styles), which proves that you don't have to be realistic to create something powerful.

Note that it doesn't mean I don'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:

Water, sky and wind

II - The Sky


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'll add some weather managing process to increase immersion.

At the moment, the sky is only a pure color (some kind of cyan), but this will change too.


III - Life


And the more time-consuming part was... creating "living" 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:

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.



Of course, I use LOTS of references. Then I create 3 basic animations for my seagull (let's call him Steven ;): a simple wing move, a glide move, a "scream" move. Every animation is "loopable", that is to say it can be played in loop with a perfect match between the first and the last frame.

Then, in Unity, I add some "intelligence" (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't go in much deeper details because it's always a bit more complicated than that, but the basic idea is here.


It's about the same thing for the fish, except I had to work on some "jump" 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).

And this whole world goes like the above video!

That's all for today!
If 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...

Peace!