Developer Blog – Texture Atlasing.

By | February 17, 2016

As described previously, if we combine textures that share shaders we can reduce the number of materials. If we reduce the number of materials, we increase the number of meshes eligible for Static Batching . More Batching means less set pass calls. Less set pass calls means greater performance. So, according to the law of disjunction inference, texture atlasing can mean better performance. Obviously we want to texture atlas. But how? There are several options for texture atlasing, both free and paid, both inside and outside of Unity.

Outside of Unity and inside your 3d modeling tool of choice, you can combine your meshes so that they share UVW coordinates. The UVWs can then be rearranged by hand; textures should be overlaid later. But why do manually  what you can automate? If you’ve  already arranged the separate meshes’ UVW coordinates, and especially if you’ve already textured them, you should utilize one of the many free atlasing scripts that are available. For 3ds max there’s Atlas Generator and for maya you can use the Easy Atlas tool. Texture Atlas is a suitable solution for Blender users.

It may have occurred to you that in combining meshes in our 3d modeling program we’ve done the job of static batching. Why not simply import the combined mesh into Unity and save it the trouble of batching? Not so fast. The Unity manual advises against this and reminds us that it accomplishes additional machinations behind the scenes. Chief among these are occlusion convolutions; Unity parses its combined meshes so that only what is visible is rendered. After all, why draw what can’t be seen? Unity thereby eeks out additional performance gains through selective rendering. It’s therefore good practice to then dissemble your combined mesh prior to export. Let Unity do its thing.

Inside of Unity you can avail yourself of texture atlasing asset store packages. Examples of these include Atlases Baker and Mesh Baker. Mesh baker has some additional features that seem to rival unitys static batching capabilities. Mesh baker will feature in an upcoming review. Speaking of upcoming, check out this Friday’s Freebie Friday post for links to all of the aforementioned non-gratis solutions!

 


A Note from Admin:


I hope you found this content useful. If so, please like and subscribe and consider contributing to

so that I can continue to produce great #gamedev and #game art content while battling cancer!

Subscribe and get ahead with the latest tech recommendations, tricks, and tutorials!

Or subscribe to:
NCP on Twitch
NCP on YouTube
NCP on Twitter (warning: politics!)

WIP Sites:
learnindiedev.com Unlike Udemy, this site will feature live lessons and game jam learn-a-thons (exactly what it sounds like)! Featuring No-Code Video Game Development, the only video course to become a published text book!

openforcommissions.com Why be hard to find? Upload your portfolio, change your open/close status with a single tweet, get paid!

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.