Development Notes: 3D Models and Visuals

Just wanted to write down a few notes and interesting points about the development of the visuals and 3D modelling for our game:


Game Visuals:

Cosmologicon and EnigmaticArcher had the game concept sketched out very quickly with a basic prototype up and running on the first day, which made doing the visuals fairly straight forward. Part of the challenge of the visuals was to try and make environments that were dark and claustrophobic (inside a sewer) but still using a third-person view, so the camera is always outside of the room/pipe you are in. I started of with various designs of enclosed spaces, while using semi-transparency for all rooms, but it was pretty messy looking, so I compromised on keeping transparency only for pipes you are currently travelling in, while rendering the rest of the scene normally. The "pools" use low wall heights that are designed to give the impression that there is a dark ceiling above you while not getting in the road of the camera during gameplay. Rending of sections is limited to only those within a single "hop" (travel through a pipe/pool) to also keep a claustrophobic feeling. I had originally tried to blend in sections past this point, but ran into technical limitations trying to do this.


3D modelling and environments using OpenSCAD:

One thing I wanted to share which I think worked really well for us in this game was a pipeline we setup for automatically generating the 3D environment models. During the start of the week I was working on a bit of python code to generate sections of 3D surface models for the different sections of pipe (different shapes) and interconnecting rooms. I quickly found that working with all the complex geometries for nice looking environments was very challenging and time consuming so I changed tack. I ended up using OpenSCAD (http://www.openscad.org/) an open-source programmatic/parametric CAD package in which you can "program" complex geometries from a series of simple(ish) shapes. I ended up creating an OpenSCAD module (see tools/generated_section_models/build_environments.scad in the code) that has a series of functions that can generate the geometric models for each type of environment in the world using input parameters such as the length of the pipe, diameter other connecting sections etc. Our pipeline then for generating all of the 3D models for the world went something like this:

  1. Use the flag "--build" when running the game to internally pull all of the level data (layout of the whole world) and generate a series of OpenSCAD scripts for building each section of the world and a single master shell script to run all of these (placed into tools/generated_section_models/scad).
  2. Run the master script to use OpenSCAD to export STL model files for each section (placed in tools/generated_section_models/stl)
  3. Run a final post-processing script (tools/generated_section_models/finalisemodels.py) to convert STLs to OBJ add in surface materials and texture the models (for the pools).


The final model files are then imported into the game next time is run. The process wasn't lightning fast, but it did allow the level designers (Cosmologicon and EnigmaticArcher) to quickly and automatically re-generate all of the environment models whenever they made changes to the world, right up until the final hours of the competition. This is something that I think I would definitely do again for 3D games with lots of environment like this.


Hope you enjoy our game!