Friday, 12 April 2013

Model: Ray Gun

I came across a friction-spark space pilot ray gun when touring the Land of Lost Content in Shropshire.  It immediately produced the affect in me that my project is all about, so I knew straight away that I had to include it in my game.


It also represents an older generation of toys -- something which is important, because the whole nostalgia thing is extremely subjective.  I need a wide range of 'hits' to ensure that the player is likely to see at least some items which trigger an emotional reaction.
Friction motor toys were very popular in the 1960s & 1970s.  They contained a flywheel driven by gears, which would usually do one of two jobs:
  • Maintaining inertia -- this was the most common type, which would involve pushing the car a short distance, firmly, a few times to 'pump up' the flywheel.  Then, when you let go, the car would keep moving for a considerable distance until the energy in the flywheel was drained.
  • Creating sparks -- the flywheel would be an abrasive wheel which would rub against flint to create small sparks.  In the ray gun, the sparks would appear inside the semi-transparent red chamber.  You can see a video of one in action here (for some reason it won't embed properly, hence the link).

3D Model

The model was more awkward than it first appears.  The initial problem was how much detail to put into the low-poly mesh.  Every ring around the barrel increases the poly count substantially, so I took the option to recreate the ribbing on the main red plastic bit as a normal map.  The outer rings, however, had to have a clear displacement.

Most of the models so far have been built by eye but in this case I decided to use an image plane template to line everything up.


Next step was a high-poly version that I could bake to create the normal map.


Finally, I created a quick colour map and applied the normal map to create a basic model.


However, at this stage I started to have problems with the colour map, which included transparency information for the barrel.  A quick test export revealed that both Maya & Unity had a problem with the transparency information, turning the rest of the model transparent too.

I ended up separating the barrel from the rest of the model and applying a separate material to it, which solved the problem.


You can see that this model lacks a fair bit of detail, but this can be added for the final production version.

I had considered building the sparking into the model as an animation, but Unity has a built-in sparking system so I thought that would look better.  I'll give that a try when I implement the model.