top of page

Unity

Screen Shot 2019-01-29 at 09.46.47.png

Here I am learning the very early and simple tools on unity. These tools where creating shapes and changing there size, also adding in lighting and changing the colour of that.

Creating a building scene.

Screen Shot 2019-01-29 at 10.18.21.png

Here I got a building model that was already created for me and imported it in to Unity. I changed the colour of the building using bright colours. I also added in spot lights to act as street lamps.

Screen Shot 2019-01-29 at 10.34.27.png

I really enjoyed this part as I added fog into the scene which made the scene look really nice, Especially with the spot light creating a spooky look. The lighting is also dark which is done by rotating the light.

Creating Torrain

Screen Shot 2019-01-29 at 12.00.58.png

Creating torrain is one of best parts of unity, it is really simple and fun. I was simple just messing around with the settings, creating different landscapes such as the cliffs. I also dded in trees and water. Using the paint tools I added in textures for the sand and cliffs.

Screen Shot 2019-01-29 at 12.00.39.png

I added in a first person control. This is done with the settings I downloaded from the asset store. Also with the set store I added in affects life rain, fire and explosions. Adding in affects like this was really easy as the asset store already had them there to download and place into the scene.

Rubics Cube

Screen Shot 2019-02-05 at 10.02.20.png

In this task I created a ruby cube. I did the to learn how to import objects and add materials to an object. I began by exporting the rubies cube. Once I had the rub cube in the project window I grabbed and dropped it into the scene. I than applied the martial by creating a material and then dropping the texture onto the Albido tab.

Screen Shot 2019-02-05 at 10.14.54.png
Screen Shot 2019-02-05 at 10.29.59.png

I dragged and dropped the object from the hierarchy tab and dropped it into the project tab this then created a prefab. allowing me to drop the same object back in. The same results canals be produced with Duplicate. Setting the coordinates in the inspector tab was able to line up all the small cubes to create one large rubies cube. I then created a prefab with the large rubic cube.

Procedural Skybox 

Procidural skybox is possibly the smiliest of all the skyboxes. It allows you to change the colour of the sky and the ground. Not much can be done with this one.

Panoramic Skybox

This skybox is more certainly one of the best skyboxes and it allows complete 360 view. This provides a realistic view.

6 Sided Skybox 

This skybox is very similar to the Panoramic skybox in which is it like a 360 image around the scene, however it is complete with multiple images which make it look a lot more life like. However it needs 6 images to be complete.

Skybox

Screen Shot 2019-02-05 at 10.38.46.png
Screen Shot 2019-02-05 at 10.43.00.png
Screen Shot 2019-02-05 at 10.43.52.png

Materials 

Screen Shot 2019-02-12 at 09.34.27.png

First of all I need to import the bunny into the scene. Once a did this I created a material and then selected the albedo and then placed the material onto the bunny.

Screen Shot 2019-02-12 at 10.03.25.png
Glass

I then created a transparent bunny. This was good and affective as it allows to Crete objects that would potentially be glass. I did this by selecting the colour and then changing the alpha channel.

Chocolate 
Screen Shot 2019-02-12 at 10.09.11.png
Screen Shot 2019-02-12 at 09.38.31.png
Screen Shot 2019-02-12 at 10.13.23.png
Screen Shot 2019-02-12 at 10.12.07.png

I created a chocolate bunny by changing the colour to brown and sliding all the properties of Metallic and smoothness to 0

I created multiple materials such as a golden metalic. 

Screen Shot 2019-02-12 at 10.17.09.png
Screen Shot 2019-02-12 at 09.48.40.png

I than created a cube in which I placed a normal and a bump map onto which gave it a 3D look. I did this by 

Screen Shot 2019-02-12 at 09.53.01.png

I added a displacement map onto the cube aswell. this did the same thing as the previous map however it made the image look displaced and waves. making it seem the object was more complicated then it actually is.

Screen Shot 2019-02-12 at 09.54.03.png

I than began to mess around with the cube. changing the texture of it to that of the lava one. I added the lava texture as an albeno which put it behind the old texture. 

Particles - Fire

Screen Shot 2019-02-12 at 10.56.56.png

This is the basic particle set that unity gives you. I changed the colour of it by going into the colour section and changing it to yellow.

Screen Shot 2019-02-12 at 11.10.41.png

I changed the material for the particles I did this by creating a material and adding the texture to it. I added it by going to the albedo section of the object and placing it on.

Screen Shot 2019-02-12 at 11.14.09.png

To create the fire there is a lot of settings that need to be changed. These settings are changing the duration to 5. The start life time to 5 swell. the start speed needs to be 0. Then the start size needs to be 1 and 3. In the renderer tab I connected my cloud material to the material setting. I also changed the renderer mode to billboard. Going to the colour tab to white yellow red then white.

Screen Shot 2019-02-12 at 11.47.04.png
Screen Shot 2019-02-12 at 11.41.46.png

Snow

Screen Shot 2019-02-12 at 11.50.27.png

To create snow it is a lot more simpler then the fire. 

To create the snow I needed to create a particle and renamed it Snow. I created a new material using snow.png. This allowed the particle to actually look like snow. Next I selected the box shape for emissions. I also changed the size of the particles to 10. Next I changed the start speed to 0, and gravity modifier to 0.9. Creating snow is a lot easier than creating the fire as it does not take much editing to complete it.

Screen Shot 2019-02-12 at 11.52.17.png
Screen Shot 2019-02-12 at 11.52.25.png

Trail

This is by far the easiest out of all the particles. As the game already has it there. You just need to change the colour to what you want. The first step is to add the trail renderer component. If I play the game and move the object it will leave a trail. Then I went to element 0. I added in a rainbow texture. This then changed the trail to a rainbow colour.

Screen Shot 2019-02-12 at 11.39.33.png
Step 1

Particle bunny

Step one I needed to change the scale of the bunny to 0.1 and then spawn Ito the scene. I then spawned in a particle system and changed the shape into a mesh.

Step 2 

In the mesh box I added the bunny

Screen Shot 2019-02-19 at 10.07.11.png
Step 3

I changed the start sped to 0 and the start speed to 0.1. I also went to the emission tab and changed the rate over time to 500.

Screen Shot 2019-02-19 at 10.15.44.png
Step 4

I can now see particles in my project when I press play.

Screen Shot 2019-02-19 at 10.03.24.png
Introduction to Scripting
Screen Shot 2019-02-19 at 11.25.12.png

I created a cube and a script in unity. I than opened the script by double clicking on it. 

Screen Shot 2019-02-19 at 11.33.47.png

I then created the script to come up on the controller bar and I proceeded to script it to say a lot of messages such as "Hello World!" and got it to say my name. 

Procedural art

Using unity and scripting I created a piece of art within a 2d game on unity and a script.

I started of by writing on line 10 "transform.Rotate(0, 0, 45);" 

Screen Shot 2019-02-19 at 11.50.58.png

This script would than turn the cube by 45 degrees once I had started the game.

Screen Shot 2019-02-19 at 11.51.09.png

I than duplicated the cubes to end up with a pattern.

Screen Shot 2019-02-19 at 11.59.45.png
Pic 1.JPG

With this script all the cubes rotated by 20 degrees and ecause it was public I was able to edit it on Unity

pic 2.JPG
pic 4.JPG

I set the script to randomise the script. this meant that all the squares turned in a random motion.

pic 5.JPG
pic 6.JPG

I edited the script to add the minRotation and maxRotation this randomly rotates the squares to random points 

pic 7.JPG
pic 8.JPG

This randomly rotates the squares to values between 30 and 60

pic 9.JPG
pic 10.JPG

I changed the script to change the properties of the cubes

pic 11.JPG
Screen Shot 2019-02-26 at 09.19.42.png

I wrote a script which rotates the cube that I placed into the scene. I rotates it randomly to any property between 0 - 90 degrees.

Screen Shot 2019-02-26 at 09.22.22.png
Screen Shot 2019-02-26 at 09.22.10.png

I duplicated the cubes to make a grid of cubs when I played the scene and all the cubes rotated separately. 

Screen Shot 2019-02-26 at 09.30.36.png

I changed the texture to this pipe texture and when played created a series of pathways.

Screen Shot 2019-02-26 at 09.37.32.png

I added this script to the pipeline and it repeatedly updated the movement which looks like crazy glitch.

Screen Shot 2019-02-26 at 09.43.14.png

This script made the pipes turn slower.

Screen Shot 2019-02-26 at 09.58.40.png
Random Size
Screen Shot 2019-02-26 at 10.15.33.png

I imported a circle and duplicated it to make a grid of circles I also add a script.

Screen Shot 2019-02-26 at 10.19.45.png
Screen Shot 2019-02-26 at 10.19.34.png

The script I created changed the size of the circles within he scene.

Screen Shot 2019-02-26 at 10.29.08.png
Screen Shot 2019-02-26 at 10.28.54.png

I added this script to it which changed he colour an the size of the objects. 

Screen Shot 2019-02-26 at 10.36.22.png
Screen Shot 2019-02-26 at 10.41.41.png
Procedural Art
Screen Shot 2019-02-26 at 11.16.51.png
Screen Shot 2019-02-26 at 11.17.00.png

I placed a cube into the scene and duplicated it. I added this script to the cubes which allowed them to move upward in a stair motion.

Screen Shot 2019-02-26 at 11.22.08.png
Screen Shot 2019-02-26 at 11.22.01.png

I added "/5" to the script just behind the "Xpos" this made the vehicle movement slightly less than the previous picture.

Screen Shot 2019-02-26 at 11.31.35.png
Screen Shot 2019-02-26 at 11.31.27.png

Added "xPos = Mathf.Cos(transform.position.X);" to the scene which created oscillation.

Screen Shot 2019-02-26 at 11.39.19.png
Screen Shot 2019-02-26 at 11.39.11.png

I edited the script to make it rotate the squares instead of just moving them up and down.

Screen Shot 2019-02-26 at 11.42.43.png

I changed the Sprite to a different object and ended up with this.

Screen Shot 2019-02-26 at 11.46.39.png
Screen Shot 2019-02-26 at 11.46.29.png

I changed the script to rotate the object a little bit more.

Screen Shot 2019-02-26 at 11.56.45.png

This script allows the object to rotate in the scene. and change colour 

Underwater world

This was a test that I had to complete where I had to create a underwater scene using the tools within unity.

Screen Shot 2019-03-12 at 09.09.11.png

I started off by editing the lighting to make it look like an underwater scene. by adding in blue fog this gave everything a blue tint which gave an underwater feeling.

Screen Shot 2019-03-12 at 09.12.54.png

These are the fog settings I applied to my scene.

Materials
Screen Shot 2019-03-12 at 09.23.10.png

This is my rock material that I have applied all the rocks within my scene. It looks great and applied a realistic scene

Screen Shot 2019-03-12 at 09.28.20.png

This is my sand texture which like the rock texture looks great as it has a normal map on it which makes it look 3D 

Screen Shot 2019-03-12 at 09.32.46.png

This is my grass texture which again looks great, I got the image online which I then applied to the grass giving it a realistic view.

Models
Screen Shot 2019-03-12 at 09.36.53.png

All of the models I was provided with I just rearranged them and changed there size to create a realistic looking scene.

Screen Shot 2019-03-12 at 09.40.56.png

I created an include area to allow me a smaller area to work with. This would in turn create a more Realistic scene with all the assets so close together. 

Particles.
Screen Shot 2019-03-12 at 09.46.21.png

I created a bubble particle system. This gave the feel of underwater as underwater there are bubbles.

Screen Shot 2019-03-12 at 09.50.37.png

These are the setting I have applied to the bubbles.

Screen Shot 2019-03-12 at 09.55.49.png

I applied the bubble particle to the rotor which applied an effect that bubble where coming out the back of the submarine.

Post Processing

Before

Screen Shot 2019-03-12 at 10.10.34.png

After

Screen Shot 2019-03-12 at 10.16.05.png

I'm a paragraph. Click here to add your own text and edit me. It's easy.

Final Outcome
Sorting
Screen Shot 2019-03-19 at 09.29.58.png

I created a game title within unity. 

Screen Shot 2019-03-19 at 09.30.11.png

I did this by placing all these assets into the scene. Which lucky for me was already in the correct proportion so all I had to do was size it to fit the image. 

Screen Shot 2019-03-19 at 09.30.20.png

To layer all the images I had to change the number on the "Order of layer" The higher the number the further uptake image will be. for example 0 will be right at the back where as 10 will be at the front.

Y axis Sorting

I placed in the bush prefab which I had already been given and layered it so they where slightly overlapping.

Screen Shot 2019-03-19 at 10.22.03.png

I went onto Edit/Project settings and Graphics and change the y axis to 1.

Screen Shot 2019-03-19 at 09.56.01.png
Screen Shot 2019-03-19 at 10.02.35.png

I added the bee to the scene which already had a scripted.

The bee should edge through the bushes and should look like a layer.

I went into the sprite editor and the little circle which is the pivot point this changes where the bee goes through the bush 

Screen Shot 2019-03-19 at 10.16.25.png
Masking
Screen Shot 2019-03-19 at 10.30.06.png

I added the sprite mask to the scene and applied the bee as the sprite. I also turned of the sprite renderer.

Screen Shot 2019-03-19 at 10.35.06.png

I change the setting of Mask Interaction to Visible Outside Mask. I did this on all the bushes.

This is the end result.

Rendering
Screen Shot 2019-03-19 at 11.23.23.png

I changed the "Clear flags" to don't clear

This is what happens when I ran the game and moved the camera. 

Screen Shot 2019-03-19 at 11.29.57.png

I duplicated the camera which would turn the three cubes into 6 in the game view.

Screen Shot 2019-03-19 at 11.48.50.png

I change the camera properties of the viewport rect to X 0 and W 0.5 for the first camera and X 0.5 and W ).5 for the second. 

Screen Shot 2019-03-19 at 11.51.40.png

This created a split screen look.

Shader graph
Screen Shot 2019-03-26 at 09.31.59.png

I added a bunny asset to my scene and created a matiral  and a shader I opened up the shader and right clicked and added a colour node.

Screen Shot 2019-03-26 at 09.32.09.png

I selected the matirial a clicked on the shader tab at the top and added the shader under the shader tab. This I also went onto the shader editor and right clicked and selected convert to property. this allowed me to change the colour of the material from the main menu instead of going into the shader editor.

Screen Shot 2019-03-26 at 09.33.47.png

I clicked onto the settings icon at the top right and I changed the surface option to transparent. 

Screen Shot 2019-03-26 at 09.35.46.png

I right clicked and selected the node and added a slider and attached it to the alpha this allowed me to change the values of the transparencies. 

Screen Shot 2019-03-26 at 09.39.37.png

I again selected convert to property which allowed to select the transparency in the main editor.

I created a split.

Screen Shot 2019-03-26 at 09.44.07.png
Screen Shot 2019-03-26 at 10.32.09.png

I connected the split to the colour property and the plan channel. This allowed me to changed the transparency in the colour tab.

Screen Shot 2019-03-26 at 10.32.16.png

This I what my bunny looked like once was finished.

Screen Shot 2019-03-26 at 10.03.33.png

I imported the bunny and corrected the size.

Screen Shot 2019-03-26 at 10.03.59.png

I created a new material and called it "My Mat".

Screen Shot 2019-03-26 at 10.05.56.png

I created a new shader and went into the edit menu

Screen Shot 2019-03-26 at 10.06.30.png

I right clicked and created a node. and selected the colour one.

Screen Shot 2019-03-26 at 10.07.12.png

I attached the colour node to the unit and changed the colour to red.

Screen Shot 2019-03-26 at 10.08.06.png

I applied the shader to the material.

Screen Shot 2019-03-26 at 10.10.10.png

I created a second shader and made it blue.

Screen Shot 2019-03-26 at 10.10.35.png

I also applied this shader to the material.

Screen Shot 2019-03-26 at 10.11.25.png

This is what the bunny looked like at the end it reacted to light swell as having good colour.

 Making Grass
Screen Shot 2019-03-26 at 11.26.20.png

I imported the basic shape that will later become grass.

Screen Shot 2019-03-26 at 11.28.45.png

I created a shader and went into the edit menu I added 2 nodes Sample texture and 2D texture asset.

Screen Shot 2019-03-26 at 11.30.00.png

I connected all the points up 

Screen Shot 2019-03-26 at 11.30.16.png

I converted these nodes to a property which allows me to edit it in the main game editor menu.

Screen Shot 2019-03-26 at 11.31.46.png

This is what the image should look like in the editor.

Screen Shot 2019-03-26 at 11.32.08.png

I joined the A(1) to the Alpha channel.

tranaparent.JPG

I changed the surface to transparent and ticked the box for two sided.

Color.JPG

I added a colour node and converted it to property.

grass.JPG

This is how the editor looked once i was finished.

2.JPG

This is how the grass ended up looking and it swayed 

Changing colors
Mulicolor 1.JPG

I imported a bunny model and created a material and a shader i then proceed to edit it to look like it does above. i added in two color nodes and made them property and naming them Color 1 and color 2. I added a add node and connected the color nodes to it and connected the add node to the albedo part of the Master node.

multicolor 2.JPG

This is how the bunny looks within the scene

multicolor 3.JPG

Because i made the color nodes property i was able to edit the color in the menu.

Multicolor 4.JPG
multicolor 5.JPG

With colour two being a darker or lighter colour it is able to change the colur overall. like mixing paints.

Multcolor 6.JPG

I change the Add to a Lerp and added a slider and created it in property which i than linked to the T(4) of the Lerp. 

I'm a paragraph. Click here to add your own text and edit me. It's easy.

Multcolor 7.JPG

The transition ends up in the main editor scene 

mulicolor 8.JPG

I then deleted the slider and added in the a spliter and a rotation node i attached the Rotation node to the split and attached the second attachment to the last one on the lerp node.

Mulicolor 11.JPG
22.JPG

This is what the new nodes do to the material it changes the colour as the object is moved on it y axis 

Phong Shader
Screen Shot 2019-04-02 at 10.45.06.png
Screen Shot 2019-04-02 at 10.44.57.png

This shader focuses mainly on light nd colouring.

Toon shader
Screen Shot 2019-04-02 at 10.35.44.png
Screen Shot 2019-04-02 at 10.35.12.png

This is what the toon shader looked like within the menu 

Fresnel Shader
Screen Shot 2019-04-02 at 11.09.16.png
Fog Shader
Screen Shot 2019-04-02 at 11.22.47.png
Screen Shot 2019-04-02 at 11.23.31.png

This shader gets darker the further away the camera is

Vertex Position
Screen Shot 2019-04-02 at 11.26.18.png
Screen Shot 2019-04-02 at 11.26.29.png

This created a multicoloured shader

Vertex Displacement Shader
Screen Shot 2019-04-02 at 11.51.54.png
Screen Shot 2019-04-02 at 11.52.09.png
Scripting 
Screen Shot 2019-04-23 at 09.18.19.png

I created a new script called SimpleOutput

Screen Shot 2019-04-23 at 09.32.46.png

I created a script which showed on the console tab the name which I listed on the script.

Screen Shot 2019-04-23 at 09.38.25.png

I created a script which in the console tab showed "My name is: Zhan"

Screen Shot 2019-04-23 at 10.02.41.png
Screen Shot 2019-04-23 at 10.35.32.png

This script constantly multiplies 2 by 2.

Screen Shot 2019-04-23 at 11.14.24.png

This script shows the 10 times in order.

Screen Shot 2019-04-23 at 11.23.47.png

In this one I added 4 to to 2016.

Screen Shot 2019-04-23 at 11.32.57.png

In this script it divided 900 by 5 times.

If statements
1.JPG

This if statement will change the message within the within the console depending on the number within the "int myS[peed = 15;" column. 

2.JPG

This is an example. It shows the diffrent messages shown within the console.

3.JPG

This is an If statement that i made. It will display the message within the console of the type of age group that person is in depending on there age. for example, 0 -3 is shown as an Infant.

3.1.JPG

This an example of the result shown on the console.

Random Numbers / Colour
1.JPG

I placed a square into the scene, i also attached a script called random number

2.JPG

This is the result i got from my first script. i than change the numbers to colours and got this as an result. 

3.JPG

This is the script which changes the colours randomly.  I changes between three colours blue , red and green. 

4.JPG

I grouped a bunch a cubes together which created this random colour square.

Movement
1.JPG

I placed a cube into a scene.

2.JPG
3.JPG

The script above ends up creating the text within the console once the space bar is pressed.

4.JPG

I created this script which changes the colour of the square once one of the right or left arrows where pressed.

5.JPG

This script allows the cube to move to the right and left.

6.JPG

This script is the finished script which allows the cube to move right and left.

Maze
Screen Shot 2019-04-30 at 09.56.15.png

I placed a file that i was already given and placed it into the scene. i placed the wall object into the scene.

Screen Shot 2019-04-30 at 10.04.30.png

I then duplicated the cubes and placed them in square with another space in the middle to move around in. I then placed the player prefab i was given within the folder into the scene.

Screen Shot 2019-04-30 at 10.05.13.png

I then placed a rigid body onto the player and applied the settings as seen above..

Screen Shot 2019-04-30 at 10.28.41.png

I then created a movement script and wrote as shown above. this allowed my player to move around in all direction.

Screen Shot 2019-04-30 at 10.31.27.png

My player can now move around and will not go through the wall because of the rigid body and i added a box collider onto the cubes.

Screen Shot 2019-04-30 at 10.35.03.png

I added the key prefab and added a circle collider to it

Screen Shot 2019-04-30 at 10.36.41.png

I also placed a rigidbody onto the key.

Screen Shot 2019-04-30 at 10.44.19.png

I created a script which i placed onto the key. it allows the player to pick up the key.

Screen Shot 2019-04-30 at 10.45.41.png

I changed the top part to player.

Screen Shot 2019-04-30 at 11.07.35.png

i edited the script  which made the player the tag which means the key will only attach to the player and no other objects.

Screen Shot 2019-04-30 at 11.31.01.png

This script is placed onto the door and opens it. However, the door opens with the key and without the key.

Screen Shot 2019-04-30 at 11.31.17.png

I added to the movement script "KeyIsCollected".

Screen Shot 2019-04-30 at 11.46.44.png

I created a UI key script which means in the top corner of the screen a key symbol shows up and disappears once you pick up the key.

Screen Shot 2019-04-30 at 11.53.18.png
Final Result
Scripting Rotation
Screen Shot 2019-04-30 at 09.03.50.png

I added a blue car that I was given to the scene and created a script

Screen Shot 2019-04-30 at 09.34.16.png

The script allowed the car to rotate and move up and down.

Screen Shot 2019-05-07 at 09.55.43.png

I put a rigid body and a box collider onto the car this means that it will not move through the object.

Screen Shot 2019-05-07 at 09.55.35.png

I put a box collider onto the box this means it reacts with the car to stop the car from going through.

Screen Shot 2019-05-07 at 09.53.17.png

I put "Void FixedUpdate" onto the script this means it stops the car from glitching out in the wall. It dos this because FixedUpdate deals with the physicals of the object, by updating every frame which means every frame is the same.

Final Result
Lane Game
Screen Shot 2019-05-07 at 10.37.32.png

I used the Sprites that i was already given and created a main menu as seen as above.

Screen Shot 2019-05-07 at 10.41.26.png

I created this script which moves to another scene i created that is the main game screen.

Screen Shot 2019-05-07 at 11.14.02.png
Screen Shot 2019-05-07 at 11.21.16.png

In the other scene i created named "Game is created the scene that is shown above.

Screen Shot 2019-05-07 at 11.36.53.png

I created this script that is applied to the player and this script allows the player to jump between all the lanes.

Screen Shot 2019-05-07 at 11.38.54.png

I added in the enemy which i placed in the lane.

Screen Shot 2019-05-07 at 11.49.38.png

The script allows the enemy to move down along the lane.

Cube.JPG

I added a cube which was acting as a null.

Script.JPG

I created this script to put on the cube. It controls the whole game and the rate at which all the enemies spawn.

stuff.JPG

The script makes the enemies spawn like this.

try again.JPG

I added the try again object.

Try again script.JPG

I added this script to the movement script to bring up the try again object once the game was over.

Try again script 222.JPG

I attached the script to the try again object and once i clicked on it the game restarted

ESC.JPG

This script allows the user to go back to the main menu during the game.

bottom of page