Space Truckin'

One of the central tenets of the Pegwars universe is that the future is not so dissimilar to what we are familiar with now.   Spaceships are not outlandish things, they are merely futuristic cars.  Most are low-cost, practical and plain people-movers, most people just need transportation and will pay the lowest amount they can get away with for a vehicle that ticks the right boxes.

Some spaceships are enthusiasts' vehicles - sportships, where the fun of flying them outweighs the practicalities or the cost.  Modded ships.   Ships with cusom paintjobs.   Ships that should never have had spaceturbos installed but do.  Ships that are loved and adored by their owners.

And similar to future cars, businesses must truck on as well. Space trucks are the evolution into space of ordinary trucks - long distance haulers, flown by truckers and contractors.  A big powerful cab owned by a trucker, behind which cargo and trailers can be towed.

There was an awesome game called I-War 2  that had the best space trucks in any game I've ever seen.  These freighters were ungainly, ugly ships and you could see the shipping containers attached to the outside of the ship.   Deciding on the risk/reward, you could attack the freighters, and after killing any fighter escort they may have, they'd usually surrender and release all their cargo as a last resort to avoid death.  You could then radio in for someone to collect the cargo, as the frighter pilot warps away with their life intact, but their cargo lost.  'Popping a freighter' in I-War2 was one of the most rewarding gameplay concepts I've ever come across, and one that I'd love to incorporate into Pegwars.

Thus I've set to work on some new programmer art so I can add an example of the Spacetruck class of ships, to implement gameplay around cargo and 'popping freighters', and also to refresh my knowledge of the modelling and texturing process.

The first step is to model the ship.   Firstly, I start by only modelling one half of the ship - later I will mirror + copy + weld.  This aids building a symmetrical model, and cuts down on the workload.   I start with geometric shapes - boxes, cylinders etc.  Then I extrude and bevel the box into different shapes.  Once the main shape is blocked out, then the refinement process begins.  This involves chamfering edges, applying smoothing groups, tweaking vertices etc.   Once the shape is finished, I mirror the mesh along the Z-Axis and weld any co-positional vertices together.

The Basic Mesh

After I'm happy with the mesh, comes the painful process of uv mapping.  The goal of uv mapping is to create uv coordinates for the entire ship such that it all fits on a single texture map, and the texture map is used in an efficient way.  The uv map should have a fairly constant texel - world-size ratio, meaning there are no areas on the ship that are blurrier or more detailed than any other.   While there are plugins for Max that you can pay for that unwrap a model for you, in a low-budget (no-budget) game such as this, I have to manually unwrap my models.

The unwrapping process starts by planning which surfaces of the ship should go together on the texture map (sharing edges), and how much texture should be allocated to each area of the ship.  Then sets of faces are selected, UVMapped using an appropriate modifier (face, box or cylinder mostly). Then the UnwrapUV modifier is applied.  This allows you to manually move the UV coordinates around, overlayed on the texutre map :

Unwrapped UVs
Once the Mesh and the Texture Coordinates are done, comes the texturing part.   I've worked with some awesome texture artists in the past, and that only serves to highlight how rubbish I am at texturing.   My skills consist of badly applying repeating surface patterns as a base, then putting lines on my ships.   As well as the base diffuse map, the specular amount is stored in the alpha channel, and I also create a separate RGB emission map - areas of self illumination.   Additionally one would create a normal map as well but I haven't bothered to do this yet for the programmer / prototype set of artwork.   Currently the texture maps for the space truck look like this :

Diffuse (left) Emissive (right)
So obviously there's a lot of texture work to be done here, but I'm satisfied with the mesh and the unwrapping and have a good basic texture.  Here's how the ship looks in-game

Spacetruck heading for a dock


Popular posts from this blog

2022 Screenshot Update

Screenshot Progress Update!

Rendering Nebulae