Thursday, December 2, 2010

Eight o'Clock... Day One!

No Cartographers Necessary.
The initial plan to build the track out of modular assets. After playing around with this method, creating a few basic parts and piecing them together I quickly came to the conclusion that building the track this way wouldn't really fit my vision of a twisty, turny countryside road. There would have been an awful lot of individual parts, largely negating the use of modular assets at all.
Besides that, I was only going to producing one track, therefore there wasn't really a need to be able to speed up the building process of building additional tracks.

With that in mind, the decision to use terrain as a base was made.

In order to ensure that the track fit the brief in terms of the average total gameplay time of three minutes, a quick draught terrain was created and the track simply painted on. The length of the track was adjusted until the time for each lap came was close to one minute.  With this accomplished the track was then tweaked to become more interesting to drive around.

Unfortunately at this time I didn't actually have a car to test with, since the Morris was non-functional and the Scorpion was broken, possibly beyond repair (or at the very least a lot of time-consuming fixing). This is where the less-than-ideal Manta stepped up to the challenge of testing. So “driving” at this point of development was actually “hovering”.

The track was now the right size and shape, but was yet to have any depth. The first terrain features to make it in were those planned in the initial vision of the track;
  • One side of the track higher than the other to allow for vertical gameplay,
  • A river running through, splitting the world in two,
  • A largely flat area where a village would be built
  • Two different roads to get to the top of the elevated area; a shallow, fast curve and an s-bend that would either have to be taken slowly or jumped.

After these features were put in place, and the road area made as smooth as possible and roughly textured it became apparent that this method of building the track was not as effective as I had hoped for a number of reasons. The main reason being the resolution of the terrain and corresponding painted terrain layers. The geometry was far too coarse to be effective as a road. It worked well for off-road areas, but given the nature of the vehicle I was using and it's stiff and shallow suspension, it required an area with a smoother surface to minimise the constant bumping and grinding with the ground (not to mention constantly getting stuck in almost every gap).
Original blending and density
Additionally, the blended areas where the road was painted on was unacceptably blurred, and without greatly increasing the resolution of the terrain (which was already fairly high) wasn't going to change. Eventually, the terrain did end up with double the resolution in order to fix the majority of texture/geometry coarseness issues, however a different approach to the road itself was taken.
The plan was to create the road as a static mesh utilising per-poly collision, and it worked perfectly.
Given that the terrain was largely sculpted already, and I had little want to go and re-sculpt it all over again (even though I ended up doing that anyway... More on that later) I needed a plan to minimise the amount of work in creating the static meshes.
Yes it was easy. Far too easy.

Retopolising the terrain in Topogun
I was incredibly grateful that UDK allows you to export the terrain as an OBJ, and also the corresponding texture painted onto it.
This allowed me to simply import the terrain and texture into Topogun and roughly creating the geometry of the track. A few minutes later and it was done.
After that it was simply a case of bringing the track geometry into Maya, levelling out some of the areas where the track was sloped laterally, smoothing by two subdivisions to get it to a level where the drive was smooth then breaking it into a few separate chunks and exporting to UDK. Doing this also allowed a quick extrude operation around some areas to create the pavement in the village.
Pavement in the village
Given that the the track had the same origin and scaling as the terrain, the position of every piece could be set to the world origin. Then all that was needed was to sculpt the terrain to neatly follow the track.
During this process I realised two things; One, the terrain really needed more fidelity, as getting the terrain to smoothly follow the road was difficult, off-road handling was far too bumpy and blended areas between terrain materials was still too blurred. And two, more terrain was needed outside of the playable area for both visual and gameplay reasons.
Due to these two factors, the terrain needed to be tweaked. After a process of attempting to add more subdivisions without resculpting (much later I found a button that does this. Urgh.), then a vain attempt to export the heightmap and using combination of enlarging the texture with Photoshop, importing/exprorting and trying to use the heightmap in Maya create a new one then... Well you get the idea. Needless to say it didn't work. The easiest option by far here was to recreate the terrain at the appropriate resolution and size.
In the end this wasn't as difficult as I thought it would be, as the road was already in place to give me a guide for the sculpting. Soon after, it was finished.

Terrain Layer Setup
While researching in an attempt to find a solution to my terrain enlarging problem, I came across the automatic terrain texturing features. Which are awesome and made my life a lot easier. Rather than paint by hand areas where dirt/rock/river bed are exposed beneath the grass, all that needed to be done was punch in some numbers defining where the changes take place. So, anything below -128 units would use the riverbed material, terrain at an between around 45-80 degrees was dirt (I'm not sure of the exact numbers, the values you punch into the Terrain Setup Layer seem to be normalised in some fashion, where 0 = 0 degrees, 1 = 45 degrees and anything over 2 is everything else), anything steeper than the dirt would be rock, which required the mapping to be changed to a side-on plane to avoid stretching.

Short of some minor tweaks here and there, building up of the terrain around the outside of the map and fixing areas where it was too easy to get the Morris stuck, that's pretty much it for the terrain.
Further work will include setting up deco layers for foliage and any debris on the ground, and possibly another material layer to add some variety to the world.

No comments:

Post a Comment