What did I do yesterday?

I spent pretty much all of this past wednesday working on my new project, Night and Day. But boy were my plans delayed. I had to spend the first 6 hours of my work without access to the internet, so I had to drastically change my plan of attack for this project. I was not able to plan out and concrete any of the documentation that I desperately needed for the project since all my existing documentation was on the google drive. So instead I decided to dive straight into a new unity project and start playing with possible level layouts. First up, to give myself some idea of what shape I wanted, I drew this Parti diagram.


This was the general path I wanted the player to take as they went through the garden. So the first thing I did was build a mockup of that. Something like this:


Can you see the similarities?

The next step was initially to start messing around with a time changing function, but thanks again to the lack of internet, I was not able to log into visual studio and so could not program the light and time changing mechanic. Instead I started playing with ways that I could have the light work, with manual changes. I did this by putting two directional light sources under one parent and began rotating them around. But I have since decided that it will be more efficient for me to just have a new light source for each time used, so that I can adjust the light levels and colours to fit the time appropriately.

Still not having internet, I decided to would begin making the background for the final sunset view of Night and Day. This began with a sketch of what I thought would look nice, which took inspiration from one sketch I did for the GDD.  

Left: for GDD                       Right: Concept Sketch

This resulted in a landscape like this:


The water was something I decided to add in the moment since I wanted there to be more colour underneath the sunset and didn’t want more trees or any physical props down their. I think the result looks alright considering it was made entirely from standard unity assets.

Next step! Add trees and grass. The garden needs life. To do this I decided I wanted the trees to seem natural, but also to frame the spaces and areas that key objects would be in. This began by filling corners with trees to discourage the player from entering those spaces, not preventing them since they don’t actually need to go there and there’s no problem if they do.


After the corners were filled, I needed to frame the paths so that the player would walk along them more than walk off into the grass. I did this by placing the occasional tree along the side of the path, but never too close to the path. Giving the feeling of detail and interesting views without ever needing to leave the path. Finally I needed to frame the key locations with trees, the three main ones being the final sunset view, and the to branches of the path from the centre circle.


The lead up to the sunset needed to feel like coming from a tight space to an open space, so i made a narrow gap in the trees expand into the full open view from the cliff. And for the branches, these sections are not key to the progression of the game, but instead need to feel like private off cuts that welcome the player while also being accessible and viewable from the rest of the game.


Hopefully the above image can explain to you how the trees circle the point of interest, with the path leading to them but not crossing the tree line. The trees also opened up more creating a slight bottleneck to welcome the player in and make them feel like they are in a private space. The grass accompanied all the trees to emphasise their role and assist with delivering the right feeling for the spaces.

So with the trees in and grass swaying nicely. The next thing to do was adding scenery. By this stage I had internet again and could search the unity asset store to find the models I wanted. Things like fountains and ruined walls was the main want.


Statues for private secluded spaces.


A fountain! Ft. ruined walls.

The fountain was most likely the main focus here, as I wanted it to be a center piece. I was not entirely happy with the colour but I later discovered I could remove the orange tint quite easily and replace it with a more grey-red tint to fit the rest of the ruins.But the key part of the fountain I wanted to focus on was the water I wanted spouting from the top. To do this I needed to use the particle effects system.


Ooh water!

particlesettings2To create this water I needed to do a few things to the standard unity particle system. To begin I made the particles be affected by gravity so that they could be shot up but ultimately fall back into the fountain. I changed the particle to be slightly blue so that they looked a little more like water spouts. To prevent the particles from consuming too much processing power I dropped their lifetime way down from 5 to 1.5 seconds but I also increased the number of particles being emitted at once so that it looked more like water while not killing the game. I also had the particles grow as they fell so that it appeared as though they were being squeezed out of the top of the fountain. Of course I had to tweak the angle of the cone it was spouting out to be sure the particles stayed inside the fountain. To the left you can see the finer details of my changes if you are interested.

The fountain, being a water feature, needed to be filled with water. So I took the water that unity had as standard, initially using one that required too much processing power clearly, and placed them scaled on each tier of the fountain. I really would have liked to use the more intensive version because the shadows it used reacted better than the one I ended up using, which simply cannot receive shadows. As you can see here:


After having added these details to the level and now having internet, I decided to try and fix an issue I was having with the grass. This issue was to do with the way they acted with shadows. The grass appeared to be rendering under the shadows, which created visuals like this:


Whats up with that?

This could not really be excused since it really looked out place when the grass swayed and clipping in and out of the shadows. But how do you fix something like that? To begin I found a few things claiming to have fixed issues with grass lighting, but they only worked with terrain that was made externally to unity’s terrain editor. Other fixes claimed that they fixed it but instead made all the terrain details become fullbright lit, completely removing the purpose of the shadows in the first place. The third solution I found was to make a custom tree that was just the grass image on one of the leaves with crossed structure, like these:


Pls excuse the spheres :3

This still created grass that was fullbright lit, but the trees continued being lit correctly and the new grass also cast shadows, creating more interesting detail. I ended up using a combination of both the unity traditional grass with this new tree/grass hybrid. Giving me some stuff to cover up the clipping shadows somewhat, while also somewhat keeping the darkness of the shadows.

Finally the last thing I decided to do, other than waste my time trying to make holes in a terrain (that’s a whole other story), was to add add some fancy camera lighting effects. First up was lens flare, since I was already aware of how to do it and I wanted to play with both day and night lens flares. This was quite simple, as I just added the lens flares as elements of the directional lights, setting the moon’s one as a smaller one than the sun’s since the moon is nowhere near as bright. The next was to add sunshafts, as part of unity’s standard camera effects. What I resulted with may be a little too overbearing and might need to be toned back a little, but I will need feedback on that. Here’s what that looks like:


However, initially the sunshafts emitter was positioned wrong and so the shafts were coming from below the sun’s position. To fix this, i just moved the sun away, literally.



I also have added a few things like anti aliasing and ambient occlusion, but I want to tweak those settings and see if they can improve the visuals enough for me to deem them worth the performance drops they will bring.

But there is still much more to do to the this game, as it isn’t even my game yet, its just a pretty shell. I still need make the game change the lighting and time as you progress through the game. But I am concerned that the skybox will cause problems with the lighting and may take away from the night time feeling. But these are all interesting and exciting challenges to tackle, time to get cracking.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s