- Home /
SkinnedMeshRenderer offset UVs to match texture atlas?
Hi there everyone. I'm trying to offset the UVs of a mesh to match a texture atlas, however the the gameObject is using SkinnedMeshRenderer.
I know this is possible with a object using a MeshFilter. http://answers.unity3d.com/questions/13316/how-to-move-uvs-of-a-mesh-so-you-can-have-two-text.html
I've tried using a different method ie. SetTextureOffset to reposition the texture instead, however this only increased more draw calls.
Thanks for your time.
Answer by whydoidoit · Apr 25, 2013 at 02:54 PM
If all the materials are the same then you need to change the texture offset of the underlying material or the MeshRenderer's sharedMaterial which will not increase draw calls.
Thanks for the reply, I've just attempted using shared$$anonymous$$aterial, however it seems to affect all the instances of that character. What I'm trying to do is instantiate multiple of 9 characters from the same mesh and animation then apply different textures to each of them. I have this running at the moment but each instance is using a separate texture and material thus adding alot of draw calls.
What I was thinking of doing was actually creating multiple duplicates of the same character in maya with the same animation and then adjust every one of those 9 meshes to have a different uv layout mapped to the texture atlas. Although this method is very messy and mesh heavy and difficult to update.
Any suggestion?