blog games developers documentation portfolio gallery

Documentation:

Baking atlases

Open the materials/atlases window by click the Step 2 button in the SimpleLOD window.

You will see a table with all the materials your game object uses. Probably your textures are all read only. This is done by default because a texture that is not read-only will occupy extra memory at run time.

But when a texture can't be read by the algorithm, it is not possible to bake any atlases, so you will need to fix this first by switching on the "Read/write enabled" toggle in the advanced import settings of the textures. Luckily there is a faster way, because SimpleLOD can do this for you when you click the "Make readable" buttons.
Drag & drop materials to bake atlases.


When all the rows you want to change have been made readable, you can start dragging materials onto each other to merge them together. You can only drag rows that have textures. You will see that those textures are immediately baked into an atlas. Even though you only see the atlas of the main texture, similar atlases are made for all other textures that are used like normal maps and specular maps.

When you do not want to combine the materials, but do want to make atlases, you only drag the right column with the atlases and not the entire row.

To separate two materials or atlases you drag the materials/atlases away from each other.

The max size of the atlas can be changed with the listbox nest to the top-most material that uses the atlas. The individual textures can be scaled inside the atlas by using the 1:1, 1:2 etc listboxes.

When you are done, you click "Apply" and the atlas textures are saved, the mesh uv coordinates are changed and the materials are created.

There is a Revert button at the bottom of the window in case you don't like the result. This will revert the material changes, but not previously execute merge of the meshes. Alternatively you can use the revert button of the SimpleLOD parent window to revert the entire game object back to the original state.

Normally meshes have UV coordinates that are between 0 and 1. But sometimes a vertex lays just outside that scope. Depending on whether the texture is wrapped or clamped, the vertex will still be covered by the texture. When you use atlases, this automatic clamping or repeating will not work anymore. A UV coordinate that is out of bounds will extend into the neighboring texture in the atlas.
So upon opening the materials and textures window, the UV coordinates are checked. When all of them are max 0.1 beyond the bounds they will automatically be clamped between 0 and 1. But when some uv coordinates are bigger than 1.1 or smaller than -0.1 you will be asked whether you want to correct the UV coordinates now or do it later.
uv coordinates out of bounds.

When you do it now, all uv coordinates of all sub meshes (materials) are corrected. When you let SimpleLOD do it later when atlases are baked, only the UV coordinates of sub meshes (materials) of the baked atlases are corrected (by clamping them between 0 and 1).

When you choose to do it up front, the min and max values are shown and you are prompted with the choice to either clamp them or wrap them. In both cases the end result will be different than the original.
Fix uv coordinates.








follow us