Make your own skybox

The built in Unity skybox uses 6 draw calls, 1 for each side of the skybox. Creating your own skybox is a good idea as it will only use 1 draw call. Having a non-default skybox can also help to differentiate your game from those that use the built in Unity skybox.

Skybox2

The skybox that is used in every Unity game ever

Create a box in your modelling package and flip the faces since we will be “inside” the box when it’s used as a skybox. Once that is done UVW unwrap into a layout similar to the picture below.

UVWUnwrap

(In 3dsMax Select all faces > Mapping > Unfold Mapping)

Making the texture line up seamlessly can be a pain and involve a lot of blurring / clone stamping in Photoshop; don’t despair though as saving 5 draw calls is definitely worth it!

Skybox

The finished skybox

Minimise the use of transparency (Particles, sprites etc)

If you need to use transparency in your game try to minimise the size of the transparent area. For example when creating a particle system unity will elect to use square planes to render the particles on by default. You can make your own mesh to use instead that is better optimised to fit the particle.

Transparency

Delicious savings

The leaf on the right is better because it requires less transparent pixels to be rendered, this will result in better performance despite the extra polygons added to the mesh. This is explained in further detail here.

UVW Unwrap wisely

UVWUnwrap2

Why would you even do this?

You will find that the vert count in your modelling program differs to what Unity shows. There are a few reasons for this, one of which is the way that the UV’s have been laid out. The more segments (islands) the UVW map is broken into the higher the vert count will be in Unity. This is because a vertex can only have one normal direction, and must be duplicated if it has more than one. You want to put polys on the same smoothing groups if possible to reduce the vert count.

This is the same box unwrapped in different ways. The bad example on the left has a separate island for each face of the box whereas the good example unwraps the box as one object. When these objects are imported to Unity the vert count is over double just because of bad UV’s.

Cubes

Don’t judge a box by its cover

Use the mobile shaders

This is pretty obvious but can make a big difference, make sure to use the shaders in the Mobile category as they are trimmed down and much quicker than the standard ones.

MobileShaders

Unity has got you covered

Models don’t have to be seamless

A misconception I had when I started modelling for games was that meshes should be as seamless as possible.

Welding

Attached & Seamless

The mesh on the right might be a neater mesh but it is using more polygons to create the same effect. This is a relatively small saving but when applied to more complex meshes the savings can be significant.

That’s all for now, there are loads of ways to optimise your game but these are the ones I found most useful while developing Get A Grip.