Experimenting with Unity
Posted on 8th February 2013 | Catagories: 3D, Illustration, Scripting, Unity13 comments
Last year, I began a several-month-long process of learning to use Unity – a highly accessible, cross platform 3D game engine – with the ultimate goal of exploring it’s potential to create an interactive ‘toy’ along the same lines as Windosill by Vectorpark.
In the process I built a series of experiments, each focusing on different aspects of the engine and all contributing towards a final “proof of concept” design. It’s unlikely that these experiments will become part of a finished project in their own right, so I’m keen to share them here, with a few things I learned along the way.
From Dawn till Dusk
For this first post, I’ve put together a demonstration of the dynamic day/night cycle I developed for the project. From the outset I knew I wanted to play heavily on the use of light and how it changes throughout the day.
Below is an interactive demo, making use of the Unity Web Player, which you’ll be prompted to download if not already installed. It’s a lightweight plugin, and highly recommend – once installed, you’ll be able to play with all the official Unity demos and other user generated content too.
The game clock will automatically tick forward at a rate of 2 in-game minutes per second, but you can also click and drag across the sky to move time forwards or backwards manually. A couple of tips: right click to go fullscreen or click on the windmill to make it to rain!
I’ve also included a few of the birds sprites I developed, which are controlled by some (very) basic AI behaviour – be careful, they’re easily spooked!
A few other notes about the underlying system:
- The colour/shading of all objects is determined by a single light source, which moves as part of the rotating sky plane.
- The precise colours for dawn, day, dusk and night can all be adjusted to suit the environment.
- Other objects and their attributes (such as the stars, clouds, porch light, etc) can also be adjusted depending on the time of day.
- the overall art style is largely informed by the need to optimise performance across multiple platforms – I’m keen to talk more about the challenges and opportunities this presented, as overall, I’m pretty happy with the result.
That’s all for now – stay tuned!
Edit: I’ve now posted part two, click here to continue reading!