Archive for October, 2011

Exporting Animation to Unity

First of all we need to animate something, here I have just animated a simple cube with all the key frames on the time slider.

So that the animation can be exported into Unity we need to bake the animation to the cube. go to Keys > Bake simulation and make shore you only select the keys e.g. rotate z that you have used to save on importin unnecessary info.

Make shore when you bake the animation you have the joints selected in the outliner.

Select the object and export it as FBX Export this way it does not import all the bagage from Maya.

Import the object and it texture, place the texture onto the object and select loop in the animation menu.

Multiple Uv Maps (Maya)

Here I am going to explain basic UV mapping using one UV map to map several objects. The advantage of this is you will only have to upload one image so it will save space and will keep your files a little more organised.

First off we need our multiple geomatry.

Simply select each object uv individually, as there are only 4 objects for this demo I have scaled each one then placed it in all 4 corners.

Then select all the objects to select all the Uv’s, scale the Uv’s and place them in the top right as this is the only place that the Uv’s work.

 Take a Uv snap shot like you would a normal shape and open it up in Photoshop.

Colour them just like you would with one.

Just like before create a Lambert in the Hypershader and upload the image, and to place it on all the objects. Select all the objects and assign the Lambert to selected.

Basic Joints (Maya)

As I am creating a character we have been leaning about joints.

First of all we need our shape which would be an arm ect but her I am just using a cylinder.

 First we need to select our joint tool with the animation tool set selected we need to go skeleton >joint. In our arm we have three joints one at the top are elbow and one for the hand place these in.

To join them together you have to go to Skin>bind skin > Smooth bind this makes the geometry bendable what the joint is selected.

To make a more smooth and humanistic bend then a IK handel should be added go to Sketeton > Ik handle and then select the top joint and the bottom joint.

So that there is somthing for you to control the bend you can have draw a ep curve and Higharchy with the joint with the Ep curve, for more of a visual control.

Here it is with a more of a visual aid for moving it.

Here is a Character I have modelled and you are able to see how affective the joints tool can be for animation, this now gives me full control over my model.

The bones tool are not perfect as the do not know how much of the geometry it should effect, the weight painting tool allows you to Paint on the area you which to be effected by the joint giving more control.

My character has a old style skirt he will be wearing, and  after looking at some of the other models in the class I am not shore of why I did not just model them as one object. So now I then had the problem of how would move my model and the skirt together creating a convincing piece of clothing. Both pieces of geometry together but once I moved the leg it made it go really deformed  so this was no use, an alternative method I used just out of change was to bind the old skeleton with the new geometry. I did not use this at first as I thought that the old geometry would ghost through, just out of chance it works perfectly.

There was a slight deform with the geometry but the weight painting sorted this out will no problems, I may try to adopt this technique for the cape.

I would have liked to expand more on the dynamics that maya has to offer but after a little 5 minuet dabble I realised this was a bit too ambushes at this stage. Instead seen as I have just leaned about joints I have used these in maya cape and just key frame animated them.

After Trying the Joint tool on the cape and finding it not realistic I decided to learn how to use the ndynamics in Maya, only later learning that they do not work in a game engine.

Basic uv mapping

Uv mapping is basically that all shapes have a net so if a squire was squashed and you were able to see all the sides this would be the new.

To see a shapes Uv map just click on the shape go to Window > UV editor and if you click polygons and go to Uv snapshot make one and save it out as it can be edited in Photoshop.

Here is the edited UV in Photoshop simply save this out as a J-peg.

The Uv is placed on the shape like a colour is done thought the hypershader, I don’t know if I will be using this technique for simple shapes as the bump mapping in Unity looks very effective.

Here is my characters shield, it is more complexed than a cube so to create the UV map for this way a little more complicated than just selecting it.

Here I have started to colour the UV map in by photo manipulating images, Here I can add texture’s to created details so it does not have to be modeled in with polygons.

Here we can see that the texture has been successful, one good thing about texturing in maya also is that if I decide that I am not fully happy with the image I can just change the image in photoshop and then  save it again and it will update in maya with no hassel.

Unity Bump Mapping

First of all to import any thing into unity you have to go Assets > Import Assets.

Simple Texture

 To create a simple texture go Assets > Create Material

For the texture to work once it has been imported, click on the new material drag the image to the top right and then drag the material onto the object. I think this is something I may not use that much as it only seems as if it is for basic shapes and covers the whole shape in the same texture.

A Bump Mapped Texture

For the Bump mapped texture you have to let Unity know what is the raised part and what is the lower part. So in Photoshop with the crate texture the brick part is going to be black an the wood will be white. save the black and white image out as a 24bit Targa file. Import it into Unity.

The black and white image is the bump map, click on it and in the top right there is a drop down box to change it to a normal map.

Just like before move the image to the top right and this time there is going to be another box for the bump map.

This is going to be use full as it could turn bricks or these cobbles and give them more depth but without creating more geometry.

Bump map Selected Shiny areas.

This time were going to do the same as above but this time we are going to make the wood shiny. It works in the same way but in order to tell unity what is shiny we needs to do something to our image in Photo shop.

To do this we are going to create an alpha channel, in the channels box create new channel and past the black and whit image into it. save the image as a32bit targa. The Alpha should be red, import this image into Unity.

Do the same as before but in the shader choose Bump Specular, it is basically the same but it now has a slider to adjust the shininess.

This is my very simple shield for my character that I have made in Maya, as you are able to see by using less polygons it looks very flat. To over come this I am going to experiment with the Bump mapping so the metal sticks out more, also all the shield is shinny and I would only like the metal to be shinny so I will have a little experiment with the Alpha channels method.

Introduction to Unity and the Terrain tool.

Unity is a program that is designed not for modelling but for piecing together your modes and placing the sounds and actions that will happen when you play your game.

The Terrain tool

The first thing to do when Unity is to go to Render setting and in the render setting is a panel on the right called Sky box choose a sky box from this menu so it is easier to see what you are doing.

Even the Biggest first person shooter they use a sky box or something similar, all it is is like a dome placed around the leave with a seemliness on it, the top being sky the bottom most likely one colour that fades in to the sky.

Generally you never get to see the merge as there is always a building or something in the way,  you can see more how these work in Call of Duty Black Ops in theatre mode this is most likely what i will be using if my character goes outdoors.In the top right the terrain tool has may options, first of all you need to create a plane that is going to be edited. The First tool rises the terrain; the second is more of a precise highering tool using different paint brushes; the third flattens the plane to the hight of were you are clicking; the fourth lets you add and paint textures; the fifth lets you paint trees so you don’t have to plant the individually, and the sixth lets you paint such items as grass.

Here in this picture you can see that I have use a texture to cover the terrain so it looks more realistic, but it all still looks a bit too similar.

With the texture tool you are able to apply the base texture and use an array of brushes to paint on the next texture giving you a lot more control. this could be use for snow on top of a mountain ect. Unity has some very useful basic assists like this water, this could same you a lot of time so you dont have to create your own. Maybe if its is just water in the distance you may use this as close up it may look like every one else’s water that have use unity.

One excellent thing you are able to do is import anything you create in Maya straight into Unity, so most of my models will be made in Maya. Here I had a little practice with a model form another thing I did, also combining this with the other tools you may be able to make your own trees ect.

Character sheet

Name: Tyrren
Physical Description
 Middle aged person, descents from the native Britons trying to defend their villages from the Anglos and Saxons.  Middle-aged man, this means he is quite intelligent coming up with potions and gadgets to help him. Looking like a “dark” Robin Hood, bow and arrow, cape, home made cloths, boots and potions belt.
Character Traits
 Vigilantly type character, very secretive, never stays around for long. Never seen socializing, nobody knows who he is. The character archetypes that he would come under would be a rogue hero.  He knows of what good is but does not go about it in his own way; he has his own story he has to follow but cant leave some that needs help.
Character Background
 Comes from a town called Penrith on the edge of the old Briton and the top of angles Briton. His village was always on the constant verge of attack from the Anglos and has seen many evil things happen, as his villages struggle to keep the Anglos at bay.  He was brought up by his mother and was educated by his librarian/magician teacher.His teacher told him of the Roman and the Greek empire and them before of how they came to be so powerful. A story told by his teacher that the old ancient god of war wrote book for the first Egyptian god full of new designs for weaponry, potions and war tack ticks that would help him create an empire in return for his first bourn daughter. The book bing full of such information had to be kept a secret but as it was so was its whereabouts and who possessed it. With the next empire that got hold of it were the Greeks but now the book was only known by a few people, taken from the Egyptians by a small group of assassins. The book being lost a battle fell into the hands of the Romans killing off the Greek empire, but the book brought great misery and bad look to the Roman people with illness amongst other things, so the empire thought the book had been cursed so ordered it to be destroyed.There was a curse on the book put on by the god of war for his own amusement, that if the book should be used as it was intended to create invention for greed or to conquer that it would bring darkness to the bearer of it, unless it was used for a good purpose this would not happen but as the temptation for power is so great this is likely not to happen.

Tyrren has herd that the tomb of the first Egyptian emperor has it printed on his walls but as the empire has been gone for may years it has been forgotten about and know one can translate it even if they knew of it .

Family Background Habits/Vices
 Lived with his mother in England.Farther died fighting for Romans.Mother is a wheat farmer.   Estranging people thinking he does not need anyone’s help. 
Education Personality
 Educated by a local librarian, scientist.Works as a blacksmith as a boy.   Mysterious.Does not show his emotions.
Likes Dislikes
 Working as a type of vigilantly, mercenary.Works alone.  Saving people.Help from people.
What is their goal? Their plan to achieve goal
 To do tasks for people eg. Get rid of the people that have come and are casing havoc in my village.  Creating new weapons to help him do his job.