model optimisation

- 06 Mar, 2020

Hey you! Yes, a new devlog! The last post revealed newly added models in the game so far. In here, I want to give you an insight into how they are being optimised. Let's dive right in shall we?


It's very important to optimise your models as it greatly affects the performance. This is especially a huge deal for mobile games. Here's how I do it:

Polycount reduction

I use Blender to reduce the polycount of each model. It's a simple process. First, I duplicate the model (so that original could be used to bake the texture). Then, I apply Remesh and Decimate modifiers respectively. However, if the model is symmetrical, I cut the model in half to save memory on the texture as it is more critical for performance than a slight increase in the polygon count.


Method II:

There's a faster method to optimise voxel models using VoxelShop. But I prefer to use blender as it gives more control and better results. If you're want to check this method out, here's a tutorial I found on YouTube.

Texture baking

After reducing the polycount, I overlap both models and bake the optimised model's texture using the original model. This is done using blender's cycles rendering. I usually bake the texture at 2048x2048 resolution.


Handy tip!

A neat trick in Unity to greatly reduce texture size is to override texture format to RGB Crunched ETC (for mobile). More info in Unity Docs.

Atlas textures

Atlas texture

In my previous post, I mentioned how I design Compound models (such as the above) using the models I created for the game environment.


One of my biggest mistakes so far is making them in Unity instead of Blender. Problem? Each model has a texture. Each texture adds up the CPU and GPU workload. Therefore, I had to use redesign the models in Blender and bake each texture in a compound model into one giant atlas texture. The performance gain is incredible!

If you've made this mistake of designing compound models in Unity and looking for a method to export the model as a whole, you might want to use Scene OBJ Exporter. It looks promising :)

LODs

Level of Detail or LOD is another technique to boost game performance. Unfortunately, as of today, Unity does not have a built-in automatic lod system. But there's one in Unreal Engine and it's super easy! Here's a quick tutorial if you're interested.

More?

I have yet to follow some more optimisation methods such as using low-poly versions of the models to cast shadows, bake lighting etc... If you want to learn more about graphics optimisation in mobile games, this video might surely be helpful!


I've been sick so I couldn't even finish half of the workload I had this week. But I guess that's just life and I am feeling much better now :) My first video is still on hold but I assure you it's coming on the way! Make sure to subscribe if you haven't already. 😊


As always, thank you for your time! Don’t forget to follow me on Twitter and Facebook. Enjoy your weekend! 🎳

back