Sunday, 15 April 2012

Caves and Script Changes

It's not been as long as usual since my last update but I'm going to try and update more often in smaller bites for the next few weeks as we're coming to the end of the project and there will be lots of changes and rushing about to come in the future, so here goes...

Possibly the biggest change I have made since the last update is texturing the cave. I have made a very quick diffuse map and quickly gone over it in Mudbox. I still need to improve it quite a bit but for how quick it was to make I think the results have turned out well.

There were a few problems with the unwrapping though, and that has continued to be a pain throughout the texturing of the cave, there are quite a few seams and they don't seem to be connecting well with the normal maps taken out of Mudbox. I seem to remember reading about a fix to this but to save time searching I manually went in with viewport canvas in 3DS Max to fill in the seams of the diffuse and normal maps.

I do intend to expand on this texture, adding unique parts to it in different rooms such as scratches or cave paintings, but that will most likely be a tweaking thing towards the end of the project. Here it is as it stands now though.

The cave itself was around 800 polys but I was getting some big smoothing issues, I applied meshsmooth to it which brought it up to around 3500 polys and I liked the result, plus it fixed my smoothing issues so I decided to keep it. The game still runs at about 33FPS while inside the cave as opposed to around 28FPS outside so the extra polys can be spared.

I have also added a few more of the rocks from outside in the cave to build on the walls as I intended to only build the outline of the cave in Max and then improve on it my adding rocks in UDK. Also doing it this way saves on memory as the rocks are already instanced in the scene so they do not take up as much memory as a brand new mesh.

I also thought that I would post the script for the weapons on here which I did a few weeks back incase anyone is interested in that or can point out any of the errors. I have them recognising the mesh in the game and have them doing damage when 'firing' but I have not yet set up the animations as I don't have them yet, and the meshes don't sit right in the 1st and 3rd person perspectives so I need to tweak the code to get them to sit right.

Here are the 2 files used to make the club work:

Here are the 2 that make the crossbow work:

And here is the bit of code that I changed in the script for the weapon pick up to change the static mesh to the one I have made:

All of the code there was taken from Epic's official UDK help pages at UDN and then edited to pick up my skeletal meshes and to have the amount of ammo and do the amount of damage ect that I want it to do in my game.

I have commented out (text in green) the animation sections for now as I don't have the animation files but I will fix them as soon as possible.

I intend to get the weapons working correctly in the next couple of weeks before the 1st submittal deadline, although that will probably be without the animations. Hopefully I can get that done and we will have a finished looking game ready to show by then, even if it will need quite a bit of tweaking.

So much for shorter blog posts....

No comments:

Post a Comment