Sunday, 12 January 2014

Collision Detection for UDK

I've been researching into applying collision detection on models for game engines. I specifically wanted to try Unreal Development Kit (UDK) because I've never used that game engine before. I have a good amount of experience with Unity3D but I felt like I wanted to try something new because I won't always be working with the same game engines. 
I mainly researched YouTube videos and various forums to see what people were doing when applying collision to there models. From what I've found, there are a few ways to do it but the main two I looked at in further detail were creating the collision boxes in Maya, ready to be imported into UDK, or do them in UDK itself. I finally opted for doing them in UDK because the method of attaching collision boxes was quick and accurate, meaning I didn't have to spend too much time creating my own in Maya. It's basically six and half a dozen but I think the Maya way would have taken a lot longer. However, they both have their pros and cons but I won't go into that.

Anyway enough with the writing, check this out. 

Initially, I tried to import the level in as one full mesh but that made adding good collision almost impossible unless I created custom collision boxes using the brush tools in UDK. Instead, I imported them as they were from my Maya file as modules. I then attached collision meshes to the models using UDK's auto collision tool. This made it a rather speedy process and allowed me to walk around in my level with collision detection working. 

That about sums up this string of blog posts. Overall this has been a great learning experience. I've learned the workflow of creating assets for game engines and I'm wanting to venture into this area further, especially world building. 

If I'm lucky, maybe in my next University group project where we make a game, I'll land a role that allows me to do some modelling for our game. 

Thanks so much for reading and for the people that decided to follow. I hope you managed to get something out of it considering I'm an amateur! 

It's been a blast, thanks again! 

- Gavin  



Texturing

Texturing is that part I was dreading most for the project and it will be apparent to you soon. My art skills are heavily lacking but that's mainly because my interest lie in world building. Even though I'm trying to develop my art skills with a Bamboo graphics tablet I'm still terrible at drawing...especially texturing. Instead of spending a lot of time texturing my models I have created simple placeholder textures. For those of you who aren't familiar with the phrase, placeholder, it's basically something simple you put in place such as a solid colour which acts as the placeholder to then be textured at a later date. 

My textures obviously need a lot of work but for the time being my focus lies on world building like I said. However, it's a great experience trying to texture the models over the UV maps. By learning the full process I know what to expect in the future if I were to ever land a position as a world builder, then I know what to expect from the artist I'd be handing it to; at least the workflow anyway. 

I won't post all my textures but here are the textures from the UV maps from the previous post in the same order and also an overview of my full scene in Maya (not rendered). 

Barrel Texture

Barrel with applied texture
Building A Texture

Building A with texture
Building B Texture
Building B with Texture
If you're studying these to see how the textures are applied through the UV maps I'd better say that the windows are actually UV mapped and textured separately from the buildings because I wanted to make them modular, a.k.a duplicate and repeat.

I'm fully aware the textures are horrible but there is only so much I can do on this project; the development of my art skills will take some time.

I also want to note that I could have used free textures from websites as long as I gave the credit to the creator but I wanted to experience making my own textures for my own models and I will continue to do so in the future.

Thanks for reading!

- Gavin

Onto UV Mapping

Now that my block-out is finished I moved onto UV mapping which I had never done before. I used the Urban Environment videos from Digital Tutors so I could get to grips with it, especially when it came to objects such as buildings. 

UV mapping wasn't as hard as I initially thought. At first it was a little overwhelming but one of the most useful UV mapping tools that Maya has to offer is the option, 'automatic mapping'. Automatic mapping makes the UV's easier to understand to some degree because it lays out the UV's waiting to be solved like jigsaw puzzle. To make things easier, I applied a checker texture onto the model I was UV mapping so I could see the affects of moving and scaling the UV's. Scaling the UV's up gives a better resolution for it comes to texturing. UV's can also be overlapped, so when a texture is applied, it applies to all UV's in that are of the UV map. I learned that the upper right quadrant of the UV map is where all of the UV's have to be, however the other three quadrants are for 'workspace'. I tried using the additional space for creating higher resolution on some parts of my buildings but when I tried to apply the texture it wouldn't apply correctly. I pondered whether there was some way to use the four quadrants but I never managed to find a solution. There was a mention of creating a new "set of UV's" or something but I'm completely unsure. 

Anyway, here are a look at some UV maps I've pieced together for texturing. 

Barrel UV

Building A UV

Building B UV
The important thing I learned from UV mapping was to leave as little white space as I could; by white space I mean the area of the grid which isn't been used with UV's. 

I understand that for people who aren't familiar with UV's the pictures above will look like nonsense. My next post showing the textures over the UV maps will hopefully make it a little clearer for those people!

Thanks for reading

Gavin