2D Toolkit Forum
2D Toolkit => Support => Topic started by: mike2d on May 26, 2013, 02:40:11 pm
-
is it possible with 2dtoolkit ?
i mean, first create a spritesheet, then an animation with 2dtk and apply this animated sprite on a mesh in unity ?
thus using complexe meshes and apply animated texture on them.
here's the mesh :
(http://mamistudio.biz/forums/2dtk_001.png)
i'd like to apply animated texture on each part of this wheel.
-
You can't apply an animated sprite onto a mesh. If you wish to do this, just using material offsets will be easier to deal with.
Animated sprites are realised using meshes, and applying to a custom mesh with all the optimizations that tk2d performs, will be very expensive indeed. It will be much much easier to simply use a normal texture with UV scale and offset.
-
ok thanks
-
i managed to iterate through a spritesheet but the hard task is to start from anywhere and stop anywhere in a spritesheet with loop options...
-
Don't you just want to grab the animation clip and get the frames from there if you want to?
Again, the issue is gonna be applying the uvs to a model, it can be rotated, clipped, etc.
-
i'm not sure to understand but as you suggested, i've done the script myself, not trying to use a tk2d animation sprite anymore.
so i made a 2k x 2k spritesheet myself, applied it on a mesh and that works but when it comes to looping on certain frames, that's where i get stuck...
-
If you're doing your own spritesheet, you can probably steal the logic from tk2d Sprite. I don't know what you've done, so I couldn't really help you with that. But you do have something that works - the tk2dAnimatedSprite, just use that as a basis for your stuff.