Thursday 9 February 2012

Today In UDK pt 3 (9/2/12)

Thes evening I learned how to create enemies. I started by making a path node. and opening kismet.

I created a new event (level loaded). I then created actor factory. I right clicked on spawn point and created new object var using pathnode. I connected level loaded to spawn actor. I went to actor factory properties. here is the steps I followed after
1. Tick force deathmatch ai
2. Set controller class to none.
3. set pawn class - UTpawn
4. Tick Give default Inventory.
5. Click green cross and select weapon to give the enemy.

To make the enemy respawn There was some more code to follow.
1. I created new action -> new event -> attach to event
2. New event -> pawn -> death
3. Right click on spawned and create new object variable.
and then i connected them as shown below.


the bot now respawns on death.

Doors in UDK

In UDK today I learned how to program a door to swing open (or move to the side or any other motion) It involoved using Kismet and a matinee.

First I had to add the door as an interp actor. and open kismet.

I added a matinee block, Double clicked it to open its sub editor. I added a new empty group.

In the new group I made a new movement track.

I pressed enter to add keyframes.

I moved the interp actor and created a trigger.

Select the trigger, go to kismet, rightclick and select new event using trigger_0 touch.

I connect touched to play and untouched to reverse and set max trigger count to 0

The door was ready to be opened and closed

Today in UDK (9/2/12)

This morning I learned how to create a light triggered with a light switch. First I created a static mesh to act as a light switch. Then i created a trigger (Right click -> add actor -> Trigger) I set the trigger in the same place as the mesh. Next I made a point light toggleable. This image below shows How they were positioned.

Next was to write the code for the lighting. I Opened kismet and created a new event using the trigger. I greated a toggle aswell. I connect the Used port to the toggle port and then added the pointlight to the target port.


Next I added an announcement. I wrote let there be light. I coonected that to the used port aswell.

Wednesday 8 February 2012

UDK Today (08/02/12)

Today In UDK we learned what many of the Light properties do. We learned how to add colour to the light, Change its brightness and how to make bounce shadows. I also took the time to move around my geometry and terrain so that terrain wasnt sticking through buildings.

I learned how to make fractureable static meshes. This means that the player can shoot the mesh and it will break into pieces there are many properties for this that I plan on implementing into my game.

Thursday 2 February 2012

Today in UDK (2/2/12)

Today I learned how to make fog and particle systems in my game. I made a dense fog allover my game level but set it so its not around the player. This gives a misty atmosphere and fits in with the mountainous setting. I learned to make some waterfall particle systems aswell as some explosions, slime and splashes.

I also added more buildings to my level, I added water and its volumes too.

Here is an image of my level so far.

10 steps to creating Textures

Step 1
The first step was to find an image to use. I went to www.flickr.com (because it has tons of high resolution photographs.) needed to find an image that was positioned 90 degrees to the cameraman. I done a search for snow and found this image.


I know this image is not 90 degrees all over but some parts are and this image is quite plain. I needed a snow texture. This image is very large in size so it was easy for me to select a square area in the bottom left of the image.
Step 2
The next step was to open the image in Photoshop and resize it to a multiple of 2 (64, 128, 256 etc.) I used the crop tool to make a square section in the bottom left of the image. Then I went to Image ->Image Size and changed it to 512 X 512 (pixels).

Step 3
I was ready to make the image tileable now. To do this I must separate the image into 4 equal sections and put them to the opposite corner (upper left becomes lower right). Here is how to do this: go to filter -> Other -> Offset and set both offset values to half the image size. In my case this is 256 px

Step 4
You can clearly see in the image now that there are some dark parts and some light parts. I must now add an adjustment layer. To do this I select the layer button on top of my stack, press the adjustment layer button at the bottom and select hue/saturation. I then set the saturation to -100
Step 5
Next I used the dodge tool to lighten up my image. I set the target to shadows so it would have most affect the dark parts of the image. I set the exposure to a low number (30), this allows you to have much more control.




Alternatively I could use the burn tool. This affects the bright areas of the image and makes the darker. In this case I would set the range to highlights so it wouldn’t affect the darker parts.

Step 6
Next thing to do is to remove the horrible seams in the image. I used the Clone Stamp tool. First I alt-clicked to mark start point. Then I drag over the canvas to remove the seams. The clone tool can make the image blurry so it’s important to remove blur if one section seems more blurry than another. Next go to Filter -> Sharpen -> Sharpen, This will further remove some blur from the image.

Next I just had to save the image as a truevision targa image. Now I’m ready to make a normal for this texture.

Step 7
Next I opened the software crazybump, I opened the .tga image I just saved and created a normal. I done this by moving the sliders around and creating the texture I wanted to use. I then saved the Normal as a .tga image too.

Crazy Bump Creating Normal
Step 8
The next thing to do was to open UDK and create a new material. I right clicked in the content browser, selected new material. I called it Snow_material and saved it to my package.
Step 9
The next thing to do was to open UDK and import these too Images. I opened the content browser and opened my package. I right clicked and selected import then selected images I created. I saved them as Snow_Texture and Snow_Texture_NRM. It is important that there are no spaces in the names of materials and textures in UDK
Step 10
The final step was to open the material editor for ‘Snow_Material’ and add in the textures. I selected the texture in the content browser and opened the material editor, I held down T and right clicked this brought the texture into the material editor. I then repeated this for the normal. Next I made a connection from the texture to the diffuse port and from the normal to the normal port. I saved the material and it’s now ready to be used in the game.