

And if you do not mind some quality lost, Unit圓d can scale it to 512 *512 so it weight becomes only 256KB. Size of our texture is 754*754, if we choose RGBA 32 compression it will weight 2.2 MBīut if we will set PVRTC compression and stretch texture to the 1024 * 1024 (compression work only with POV2 textures) It will weight only 1MB. We have only one texture for the whole stage, which is already good benefit, but we can squeeze even more. Let's look at the optimization of weight in this example. The complete scene can be found at Assets/Extensions/TexturePacker/Tutorial/Scenes/AtlasesAnimįor this scene was used only one atlas, that’s why whole this scene with almost 100 objects and 50 animations has only 1 Draw Call. See the MyFireAnimation, MyTeslaAnimation, and MyMeshTexture classes. You always can automate this process using extensions, there are a few examples of how do this inside the package. You can try other meshes and experiment with different TPMeshAnimation options. Now press play and you will see fireball animation playing on the cube. Animation can contain frames from different atlases.įor the next tutorial, we will play an animation from the texture atlas on a cube:Ĭreate a cube in the scene by selecting GameObhect->Create Other->CubeĬhange the material on the cube to TutorialAtlasMaterialĬonfigure the TPMeshAnimation component options as follows:įrames: add 6 frames fireball_0001, fireball_0002, fireball_0003, fireball_0004, fireball_0005, fireball_0006.It has additional features implemented as: If you just want to play animation on plane from atlas, please follow Creating Sprite Animation steps. Trim / Crop is not supported with this approach. This approach is only useful if you want play animation on YOUR mesh (not simple plane). Select the sword_01 game object (the one with the SkinnedMeshRenderer component attached).Īttach TPSkinnedMeshTextureEx component (TPHelper component will be added automatically) Note: Do not attach TPMeshTexture component, it will cause component loops if you replace TexturePacker.dll. The sword is now using the texture from the atlas. Select the sword_01 game object (the one with the MeshRenderer component attached).Īttach TPMeshTextureEx component (TPHelper component will be added automatically)Ĭhoose Atlas and Texture in TPHelper menu Replace this with a texture from the atlas: It already has a texture and a material assigned. ( Assets/Extensions/TexturePacker/Tutorial/Art/Models/Sword/sword_01) But you can create any number of other materials with different shader for atlas. Note: The material will be created automatically by Asset Processor editor script. Set material name as TutorialAtlasMaterial, attach TutorialAtlas.png as main material texture and change shader to Transparent->Diffuse. In The Resources Folder Create->Material.

Your altas should look like this:Ītlas is ready, so we need material for it. Note: I have described most optimal options, but you can experiment with TexturePacker option to get the best result for your atlas. Trim mode: none (Trim mode is only supported for GUI rendering).Allow Rotation: checked (Full version only) unchecked (free version).
#Texturepacker example free
#Texturepacker example download
TexturePacker standalone is available for download here:
