Tuesday 8 April 2014

Modular train tracks

So a really dumb thing I did.  I made this post in preparation for going to a hiring event to talk to Relic Entertainment.  Except when I actually got there and I was talking to a recruiter the place was really loud and I lost my train of thought for a while that I forgot to show him this post!  It's funny looking back it's not really the venue's fault but I think the organizers didn't anticipate this many people would show up at a restaurant with only so much space.  It was still a great event though and I'm glad it happened, so I can't complain.  I'm going to explain what this post was about.

Targeting one of my favorite games from Relic, Company of Heroes 2, I was wondering what I could do to stand out from the rest of the candidates when talking to them.  So I thought I would highlight a possible concern in the game and do a quick demo of how I would address it.  A quick enough problem I saw in the game were the train track assets they had placed in the maps.  This is a static asset, meaning they're placed into the world to increase the sense of believability, but like most objects in a CoH map they're destructible and would have different versions of the mesh after they blow up.  The destructibility part of this asset is not the objective here.  

The quick problem I highlighted was that modeling was kind of crude.  As part of being a modular asset, a model is meant to be reusable so on the level of optimization they save memory, while still making the game look good.  In the 2 images below the merging segments are protruding each other.  The wood planks of the curved segment are just placed onto the straight piece, which makes for an unrealistic area out of an overall realistic and believable game world.  The other thing is some of the planks go into the terrain, like on the right side of the 2nd image.  To address this is only a matter of a bit of modelling.



I used some reference photos from google to look at how rail tracks work, and how miniature train set pieces are assembled.  I was most interested in the merge piece that junctions 2 paths into one.  The actual track pieces are very simple to model, they're just a bunch of boxes in 3ds max lengthened and shortened.  The interesting part is creating the angled variations, 45 degrees here to keep things simple, and then deleting and merging some faces to make it fit with a straight track piece with no protruding polygons.  Doing all of this while keeping things snap to grid.



With everything built using a modular mindset, the track pieces come out alright and I can build any track configuration easily in Unreal Engine 4.  If I put some work into doing the UV's, the whole track would only need one texture map.


Some practice on handpainted work