Gravity Knight Part 2: Modeling Environments.
There’s one thing you need to consider when working with voxels: the poly count can get pretty high quite easily. It’s very important to keep that in mind especially when you are developing for mobile devices and a low poly count is key for good performance.
Before You Start
You can avoid that problem quite easily by understanding how Qubicle’s mesh optimization works. As a rule of thumb you should keep the shape of your environment rather simple. Having a lot of exposed voxel shapes is going to create a mesh with many polygons. That doesn’t necessarily mean that you can’t work with many details, you just have to add those details to the texture. Here’s an example:
The tree on the left has nearly 16,000 triangles when exported, the other one just 270. In the right example we drew the grass directly on the fence which alone saves a lot of vertices. This is of course just an exaggerated example and you will need to find your own style. Just try to keep your environments simple.
Adding more detail without changing an object's shape TipSo let's say you have built an object and are happy with the shape (and the low poly count after export). But you want to draw more details and simply don't have enough voxels to do so. Here's a very easy trick: use Modify → Transform → Integer Scale. Entering 2 for all 3 axis will give you twice the space per axis. And the nice thing is: the poly count of the optimized mesh will remain the same. If your object consists of multiple parts select them and create a compound before using integer scale.
Building The Tower For Gravity Knight
Except for a few clouds the only environment for our game is a very high castle tower. We decided to make this tower modular so it would be easy to build a level of different tower segments. Each tower segment has the same height and consists of four walls that can easily be swapped.
The idea was to export an individual wall only once and create a prefab in Unity that could be duplicated and placed as needed to build a level with maximum freedom. We didn’t want an endless tower that is randomly generated but rather a complicated level that is always the same and needs to be learned. To test a level design we created compounds of walls in Qubicle and simply stacked them.