Notice: Undefined variable: numOfThumbnails in /home/f0d2ig0bjaks/public_html/wp-content/themes/BLANK-Theme6/single.php on line 72
The Network – Procedural City MEL Script
Created Tuesday, November 20th, 2012 | Added Tuesday, November 20th, 2012

Part of my duties for The Network was to create preliminary environmental concept pieces that we could use in the Final Pitch presentation and that would help future artists have a place to start working from if the game went through the pitch.  When I thought about the game’s environment, I thought about lots of buildings that were close together (so players could jump from rooftop to rooftop) with slightly varying heights and one or more areas with much taller buildings, similar to the environment in Mirror’s Edge.  I didn’t need anything incredibly detailed, just a way to convey the ideas I had for the environment visually.  I figured it would be faster and easier to create something like this in Maya, and rather than creating it by scratch (make a cube, move it, stretch it out, and repeat hundreds of times), I could write a script to do it for me!  Plus, I might be able to use the script to help with this idea I had in the back of my head about randomly generating whole/parts of environments in the game.

I set out writing the script in MEL.  Really, it just needed to do what I explained above–create a cube, move it, and stretch it vertically–a certain number of times within a certain area.  It wasn’t complicated, but it was fast.  The results were fantastic, and I could iterate outrageously fast.  Obviously, it’s just a bunch of boxes, but it created pretty much the exact effect I was trying to achieve.

With the script, I could designate an area for buildings (cubes) to be populated, and give them a range of potential heights.  I could also designate an area for taller buildings, which in my mind would be the “downtown”/more wealthy area of the city, as well as control the height ranges of those buildings.  In a few of the tests I did, I ran the script more than once in the same area to 1) give more of a range in heights (which, fictionally, would be different districts) and 2) to have more than one downtown area in a city.  I also tried applying some ambient occlusion to a few of them, just so I could see if the effect added anything and also to see how plausible it would be to apply it to that many polygons.