POLYMASON

Materials for low poly models in Unity

Part of Flat shading in Unity for low poly models

Flat shading is half the look; flat colour is the other half. A low poly model's colour has to come from somewhere, and where it comes from decides how many materials the model has, how many draw calls it costs, and how easy it is to recolour. This article is the three options, set up in Unity, and which to pick. It is the colour half of flat shading in Unity; the shading half is the importer's smoothing angle or a flat shading shader, and the reason draw calls matter so much for trees is in LODs and billboards.

The three ways

A palette texture. One small image, often 32 or 64 pixels square, with each colour as a block of solid pixels. Every face's texture coordinates point at the middle of its block. The model has one material with that texture, whatever the number of colours, and recolouring it is repainting pixels. Every large low poly pack works this way, and so does PolyMason's export: one mesh, one material, a palette PNG.

Vertex colours. Each vertex carries a colour and the face is drawn in it. No texture, no coordinates, nothing to lose in a folder. The catch is that Unity's Standard and Lit shaders ignore vertex colours; a shader or graph has to read them. And OBJ cannot carry them at all, so they arrive only through FBX and glTF.

One material per colour. The mesh is split by colour and each part has its own material with a flat colour. Nothing to set up and every colour is editable in the Inspector. But every material is a draw call, and a tree with bark, two greens and blossom is four draw calls where a palette is one.

Setting up a palette texture

Import the model, its .mtl and the PNG together. Unity reads the .mtl, finds the texture by file name, and makes a material with the texture in its albedo slot. Two things to check:

  1. The texture's import settings. Select the PNG. Set Filter Mode to Point (no filter) if you want hard-edged blocks and no possibility of bleed; Bilinear is fine when the coordinates sit in the middle of the blocks, which is how PolyMason writes them. Turn Generate Mip Maps off for a palette this small, or leave it on and set the Wrap Mode to Clamp; at a distance, mipmaps blend neighbouring blocks, which shows as a faint tint at the far LOD and is usually invisible. Set Max Size no larger than the image; there is no point upscaling.
  2. The material. In Built-in it is a Standard material; in URP, Lit. Set Smoothness to 0 and, in URP, Specular Highlights off, so the flat colour does not pick up a wet-looking highlight. For an unlit look, use Unlit with the same texture.

To edit the material as an asset rather than the importer's embedded copy, open the model's Materials tab and press Extract Materials, which writes it to a folder of your choice.

Setting up vertex colours

Unity imports vertex colours from FBX and glTF into the mesh's color channel. To see them you need a shader that outputs them. In Shader Graph, a Vertex Color node wired into Base Color is the whole graph. In Built-in, a surface shader with float4 color : COLOR in its Input struct and o.Albedo = i.color.rgb does it. The Particles shaders read vertex colour too, which is a cheap way to test without writing anything.

Setting up one material per colour

Nothing to do: the importer makes a material per usemtl and assigns each to its sub-mesh. Edit the colours on the materials. This is the right choice for a hero prop with two or three colours that you want to tweak in the editor, and the wrong one for anything that appears in numbers.

What batching changes

Draw calls are why this matters. Unity combines meshes that share a material in two ways:

  • Static batching merges meshes marked static that share a material into one draw call at build time. A forest of a hundred palette-textured trees, all static, is one draw call for the lot; the same forest with four materials per tree is four.
  • GPU instancing draws many copies of the same mesh with the same material in one call, static or not, and works with LOD Groups. Tick Enable GPU Instancing on the material.
  • The SRP Batcher in URP reduces the cost of switching between materials that use the same shader, which softens the per-material penalty but does not remove it.

A palette texture is the option that works with all three without any further thought, which is why the packs use it and why a forest is the place the choice shows.

Recolouring

With a palette, a second colour scheme is a second PNG: the same blocks, different colours, and a material that points at it. Autumn trees are the summer trees with a different palette, at no cost in meshes. The Synty and Kenney packs ship several palettes per kit for exactly this. With vertex colours, recolouring means editing the mesh; with a material per colour, editing each material.

What PolyMason exports

The tree builder writes each tree as one mesh, with the .mtl naming one material whose texture is the PolyMason palette: one PNG of more than a thousand colour blocks across the full spectrum, the same file for every model from here, so the levels of detail, the dead tree, the stump, the logs and every other tree you build all share it. Dropped into a Unity folder together, they import as one material, and a whole scene of them batches as one. The colours were flat in the builder, so nothing is baked into them.

More in this guide

Or build a tree and see what comes out.