Simple texture atlas creation

In this guide, I want to show how I worked on update 1.1 of our 3D, cartoon-style “Poly” environment packs. I go through the process using our freely downloadable Poly Desert Pack.

Why use a texture atlas?

In the previous version (1.0) I used Material colors only. Modifying the color is straightforward and can be achieved in the Inspector or during runtime. But it also means that I have one Material for each color present. This is not a problem when you have a small scene, but can cause performance issues in densely populated areas with high triangle count.

One Material for each color present in the PolyDesert Pack.

How to create a basic color texture atlas

Step 1: Create meshes, and set material colors

In this older article, I write about how I created the basic meshes for PolyDesert package. I set up individual material slots according to colors.

At this stage, every color is represented with a material slot.

Step 2: UV unwrap and arrangement

When unwrapping, I tend to keep the UV shell number as low and undistorted as possible. This is especially important on large objects such as cliffs – they should be ready for lightmapping. From a texturing point of view, it is allowed to create overlapping UVs, for example, all the thorn’s UVs can share the same place. Unity can take care on creating lightmap UVs for these objects if needed.

Step 3: Create a color texture atlas

The Material Combiner add-on creates texture atlases for each selected object.

Here comes the magic! The traditional way for creating a color atlas is to gather your textures and lay them out in an image editing software. Then adjust the UVs in Blender to match those textures.

I recently found a cool add-on to automate the color palette creation and material combining. With MaterialCombiner, I select all the meshes I want to share an atlas, set the image size to Power of 2, then hit the Combine button.

The add-on adjusts UVs according to materials and creates an atlas with the colors of each one, and changes the material slot on all models. Because of this, it is advised to create a backup before combining.

Step 4: Check Material slots and UVs

This step is for making sure that everything looks like it should be. To view how the models would look in the game engine, change the render type to Game and 3D View shading to Texture. I search for culling and normal facing issues this way.

Some of the flower's face normals are flipped here, they will be culled in the game engine unless fixed.

Step 5: Export models to Unity

I exported the models in OBJ format, with a single material slot. Then I imported them to Unity and added the color palette texture to the material. You can speed up the export/import process if you are saving the models directly into the Unity projects folders.

In the Mobile version, each mesh now uses a single Material and a 256x256 color texture atlas.

Thanks for reading, I hope some of you will benefit from this guide.

If you have questions or suggestions on this topic, you can share your thoughts in the comments section below!



Like this article?

Share on facebook
Share on Facebook
Share on twitter
Share on Twitter
Share on linkedin
Share on Linkdin
Share on pinterest
Share on Pinterest
Dotti Hegedüs

Dotti Hegedüs

Dotti is co-founder and 3D Artist in Runemark Studio since 2015. She specializes in environment and props modeling and texturing in various styles.

Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

deadly dungeon traps cover

Deadly Dungeon Traps

Traps are a cool way to give your players a challenge that needs their dexterity or logic or both.
You can really make your game stand out without much effort with this package.

Adventure games like Tomb Raider, RPGs, rouge-like, and soul-like games cry for lethal traps.

View Asset

POLYEnvironment

Collection of a cartoon-style environment and props models with 40+ prefabs. Super lightweight because all prefabs are using material colors only, and the average polycount is way below 1000 vertices.

View Asset

Dark Fantasy Kit

Dark Fantasy Kit is a modular 3D PBR environment package which contains 400+ prefabs to create a residence of a villain or evil mastermind of your RPG game with a First Person, Third Person or a Top-Down view. Works with Unity versions from 5.6 to 2018.

View Asset