blog games developers documentation portfolio gallery



Outdated backup copy

When you open the SimpleLOD window or when you already have it open and select a game object, the system checks to see if there is a backup copy available. if not, a backup of the game object is made. For this a game object called _SimpleLOD_backups_delete_when_ready is created and underneath it you can find the backup copies.

This works great. You select a game object, open the SimpleLOD window, a backup is made, you start merging meshes, baking atlases, etc. And then you think: No, I'd rather start all over again. You click the "Revert" button and the backup copy is used to revert the game object back to it's original state.

So far so good. But SimpleLOD does not know whether or not the backup copy is still the most recent one. Maybe it is a copy that was made weeks ago. In the meantime you changed all kinds of things to the game object, but the backup copy still sits there. You do your SimpleLOD stuff and revert back to the backup. Your game object is now thrown back weeks in time and you need to do all the changes from scratch.

To prevent this disaster from happening, beware of your backups. Click on the Backup button before you start messing with SimpleLOD. That way you always have a fresh copy to fallback upon when needed.

Mesh size limit

When you combine meshes, the total number of vertices of all meshes together may not be any more than 65536 (64K), because Unity doesn't support meshes that are bigger than that. To overcome this, SimpleLOD will automatically split the merged mesh in to multiple parts. You will get 2 or more child objects named " part 1", " part 2". Together they look identical as the original meshes. When you look in the demo scene you will find that this happened to the Sky Car and the Dodge Charger.

If you do not want SimpleLOD to split the mesh for you, you should split the child objects into 2 groups yourself before merging.

Skinned meshes

When you combine 2 skinned meshes, make sure the main mesh comes first in the object's hierarchy. This is the one whose bind poses will be used.

If the other skinned meshes have additional bones, these will be added to the combined bone structure.

If the other meshes have different bindposes, their vertices will be moved so that they can use the bindposes of the combined mesh.

Merging skinned meshes and non-skinned meshes

If your object has one or more skinned meshes and one or more non-skinned meshes, SimpleLOD will first merge the skinned meshes together. After that the non-skinned meshes (like weapons attached to a hand bone directly) will be merged in to the combined skinned mesh. A new bone will be added for the original transform of the non-skinned mesh.
When you use this for a weapon, the weapon will become part of the combined skinned mesh and move with the newly created weapon bone.
If you do not want this, simply deactivate the game object of the weapon before you merge the meshes.
Centaur with multiple skinned meshes and non-skinned meshes.

Centaur with multiple skinned meshes and non-skinned meshes

All meshes of the centaur combined into 1 skinned mesh.

All meshes of the centaur combined into 1 skinned mesh

Blend shapes

The blend shapes in the mesh can currently not be accessed with the Unity API. As a result only blendshapes of the 1st mesh to be combined will be preserved. You must make sure that you put this game object (face) above the other gameObjects (clothes) in the hierachy.
Blendshapes 1. Put the face of the model (that holds the blend shapes) first in the hierarchy before you merge meshes together

Put the face of the model (that holds the blend shapes) first in the hierarchy before you merge meshes together

Blendshapes 2. The merged mesh will still have functioning blendshapes.

The merged mesh will still have functioning blendshapes.

Blend shapes will only work in LOD 0 (the combined mesh), but not in LOD 1, 2, 3, etc.

Update: Unfortunately The trick used to preserve the blendshapes no longer works in Unity 5. Since there is no API, there is no way to preserve blendshpaes when you merge meshes in Unity 5. The only way is to uopen the model in Unity 4.6, merge the submeshes (the blendshapes are preserved in LOD 0) and then port the model to Unity 5.

UV coordinates outside 0 -1 range

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.

Heavy operation

The time it takes to simplify a mesh increases exponentially with the number of vertices. It is therefor much faster to simplify 2 meshes of 30K vertices each and then merge them to 1 mesh afterwards, than to join the meshes beforehand and then simplify 1 mesh of 60K vertices.

follow us