For drawing a skeleton with a static pose, once you have called Skeleton updateWorldTransform
for the pose you want your skeleton to have, you don't need to do that again unless the pose changes. If you want a static skeleton, you don't want an idle animation, you'd just not play any animation instead. That way you don't need to apply an animation every frame, so the pose doesn't change, so you don't need Skeleton updateWorldTransform
every frame.
Doing that, the only code that runs is in the skeleton renderer, so you can look at that for the runtime you are using. Rendering a skeleton comes down to checking each slot, if it has a region or mesh attachment, render that. To render, the attachment vertices are multiplied by the bone world transform. This is not usually a huge amount of effort and depends on how many vertex transforms you are doing, but it is more work than draw a PNG.
Drawing a PNG will use less CPU and GPU resources. Whether the difference benefits you depends on what else you are doing and where your bottlenecks are. Consider that if you ever need to draw all the skeletons animated, then your app still needs to perform reasonably when they are all animated so it is maybe not worth trying to optimize for when they are not animated. If you do optimize, you can either render the skeleton as described above and use less resources than when animated, but more than rendering a PNG. Using a PNG has its own challenges, such as where do the PNGs come from, PNGs take up more disk space, etc.
Skins don't affect the rendering of attachments that I described above. The skin is only used to find an attachment when an attachment changes, eg by an animation. The new attachment is set on the slot, then when the skeleton is rendered that slot's attachment is drawn as usual. Skins can affect performance if you are using skin bones or constraints, because when you call Skeleton updateWorldTransform
, bones and constraints in a skin are not computed if the skin is not visible. Note this won't affect rendering of a static skeleton because you don't need to call Skeleton updateWorldTransform
every frame anyway. See:
Skins - Spine User Guide: Skin bones