Project: Gauntlet - Current Iteration

Friday, January 15, 2010

Simple Living Unity Scene - Breakdown

Paying the rent precludes me from giving you the full attention that you so clearly deserve - accept this breakdown instead.



A simple Unity scene, with a few simple scripts and elements added to give it a more dynamic, interesting feel.

Here's a breakdown of what's in there:

Water.

The water is made up of a large plane with a Transparency > Diffuse shader, and the standard Water texture applied. Alpha is at around 70%.

To achieve the depth / shallow appearance of the water, I used a crazy simple technique:
Painted underneath the 'deep' sections with black, and underneath the 'shallow' sections with sand.

Easy, and achieves a relatively nice look.

To achieve the ebb and flow effect, I created a basic script that will raise and lower the water plane within bounds, given a provided (very slow) speed.

Light Cycle

Very simple light cycle - achieved by applying a simple rotation on Update() to a Directional light.

Living Skybox

Another very simple effect - achieved by applying a texture to a giant cylinder, and rotating it on Update().
Also, the cylinder will align it's x and z coordinates with those of the player, so they maintain a specified distance at all times (best to correlate the clip distance to this).

Ripple effect

Probably the most complex effect - but still very basic - the ripple effect is the following:

A simple plane with a transparent background and a white circle painted onto it.

It will start at a scale of 0%.

On Update(), it will roll a random number - and if it is within specified bounds, it will initiate a 'ripple'.

This will effectively scale the plane at a specified rate, until it reaches a certain size, at which stage it will disappear.

The ripple will also lower its alpha as a proportion of it's progress to maximum size.

Too easy!

So what do you think? Relatively 'pretty' for two hours of coding and playing around and such.








Want the code or the prefabs?

Subscribe or comment! Or subscribe to my Youtube channel. Perfect.