Monday, 4 August 2014

Super Simple And Basic Mini-Map Tutorial

These days most games have a mini-map in the bottom corner of the screen which gives the player a rough idea of what is going on in the area around them, this tutorial will show you how to create a very basic mini-map in Unity.

To start off this tutorial you need to add a new camera to the scene. To do this select the "GameObject" option from the top of the screen, scroll down to "create other" and then select camera from the list. 
















This will add a new camera to the scene. This camera will work as your mini-map. Now you have the second camera in the scene you need to position it so that it creates the same view as a normal mini-map. Use the three different coloured arrows around the camera to move the camera into position. Position the camera above the player at a distance you are happy with and then rotate the camera along the X axis so that the camera is facing the player. 




These are the arrows you will need to use to position the camera in the scene.






The easiest way to change the rotation of the camera is to highlight the value of the axis that you want to change and then type in your own value. 

The preview on your second camera should now look something like this:












If you already have a camera set up for your player Unity will only render that camera. To make it so that your mini-map camera is rendered you will need to change the depth setting of the camera. Left click on your mini-map camera in the hierarchy panel, doing this should bring up a "Inspector" panel on the right side of the screen. 
























Near the bottom of the inspector panel there is an option which says "depth". 




Delete the value shown in this box and replace it with a "1". This now means that Unity will render your mini-map camera instead of the player camera. Now you need to change the size of the mini-map viewport to make it a bit more of a mini-map. Directly above the "Depth" property is a "Viewport Rect" property. To make the mini-map smaller you will need to change the W and H values of the Viewport Rect property. The "W" value will change the width of the mini-map and the "H" value will change the height of the mini-map. Hover your cursor over each of the letters and then click and drag left or right to change the value. To get a better view of what is happening to your mini-map click on the "game" tab at the top of the screen, this will show you what your view will look like during gameplay and will allow you to see the size of your mini-map. 

Once the mini-map is set to a size that your are happy with you can move onto the final few steps for the tutorial. Next up you will need to change the projection of your camera to orthographic. Scroll down the inspector menu located on the right side of the screen until you find the "Projection" property. 

























Click on where it says Perspective and select orthographic from the drop down menu that pops up. Now the camera is set up you may want to adjust the size value which has replaced the field of view slider. Changing the size value will have the same effect as changing the field of view slide. Now for the final step. The last thing you need to do is make the mini-map camera a child of your player object. In the hierarchy drag and drop the camera onto your player object, this will make it a child of your player. Having the mini-map camera as a child of the player means that every time the player moves around, the camera will follow them. If your game has any pop-up text elements that you want the player to see at all times make sure you set the "layer" that each of these are on to "UI", once that is set click on the culling mask of the mini-map camera and then click on the "UI" option from the drop down menu. This will make it so that the text elements will only be visible on the main camera and will not obstruct the view on the mini-map. 

Switch the layer that your pop-up text is on using this option and then click on the box shown below to change it so that the mini-map camera won't render that text.























Please keep in mind that this tutorial is only to create an extremely simple mini-map without using any scripts. If you have any trouble with the tutorial be sure to leave a comment or contact me on twitter. 

Sunday, 25 May 2014

My 2nd Full Animation

So after a little bit of trouble rendering my animation it's finally completed. Really happy with the final product of this one. 


Friday, 16 May 2014

How To Create A Simple Sketch Effect In Blender

In this tutorial we will look at how we can use Blender's compositor nodes to create a simple sketch/drawing effect. 

To start off we need to set up our scene. For the purpose of this tutorial I've created a simple scene with 3 spheres. 



Once the scene is all set up go to the drop-down menu at the top of the screen and switch it from default mode to compositor. 


Once you click on this option your screen should look something like this:


Next you need to go to the toolbar and click the box next to where it says "use nodes". This should make these two nodes appear. 


If there is an empty box in the render node press "f12" and your scene should appear in the box as long as you have set the camera up correctly in the scene. Now that we've got the basics of the compositor set up we now need to add in the rest of the nodes to create the sketch effect.

First we need to add a filter node to the scene. Click one the "add" button on the toolbar and scroll down to the "filter" option. Another menu should appear with another series of options. Scroll down this new set of options and click on the "filter" option. 


This should add a new node to the scene. Drag and drop this onto the with line which is already connecting the two nodes, the node should click into place and be connected to the others. If this doesn't work click on the yellow dot on the right hand side of the first node and connect it to the yellow dot on the second node. Once this is all set up click on the box which says "soften" and select the "sharpen" option from the menu which should appear. 


Repeat the last step to get another sharpen node. At the bottom of the sharpen node there is a factor value. Leave the value on the first sharpen node as it is and then change the factor value to 0.5 on the second sharpen node. 


Your node setup should now look like this. Next up we nee to add a "greater than" node. Scroll down to the "add node" button and click on the converter option and then click on math. 


When the new node is added click on the add menu on the node and select "greater than" from the menu. After that change the value setting from 0.5 to 0. Now connect the image dot from the 2nd sharpen node to the first value dot on the greater than node. Your setup should now look like this.


Next up we need to add a blur node and set it to "Fast Gaussian". Click on the add node button and and scroll down to the filter option and add a blur node.

Now change the setting of this node to fast gaussian and connect it to the previous node. Now to add the final node to finish up the effect. The last node you need to add is a another mix node. Click on the add button, scroll down to the color option and click on mix. Change the gaussian option to screen and connect it to the composite node which should be on the right hand side of your setup. You may have to change the color in the little white box at the bottom of the screen node to whichever color you want to make your scene should show up in the render box. 

Here is what your final setup should look like. 


You should now have a very simple sketch/drawing effect in your render. If you have any problems following this tutorial please leave a comment and i'll be sure to help you out. Also I'm looking to start making video tutorials for all of these so keep an eye out for those :)
























Sunday, 20 April 2014

Practicing My Animation To Move On To Better Things

Been messing around lately trying to improve my animation techniques. Heres a new one that I made trying out some camera movement mixed in with object movement.


Saturday, 28 December 2013

Smiley Gif

Being productive.... Made a Gif... 


Will happily show people how to make em :) or make em for people :) tweet me if you want one :)
Twitter : markimo2

Sunday, 20 October 2013

He Walks!

So here's another little animation I created whilst I've been improving my skills learning how to switch cameras and getting the speed of the movements right.


Thursday, 17 October 2013

My First Animation
















So I wanted to upload this to Deviantart but it was to much of a pain in the ass for such a short video XD. This was just a test so I can get used to the animation process in Blender.