I've started to play with the Spine for libgdx runtime in Java.

But I can't seem to render without some sort triangular clipping.

enter image description here

The code is based on the Spine examples:

public class AnimalTest extends ApplicationAdapter {

   OrthographicCamera camera;
   PolygonSpriteBatch batch;
   SkeletonRenderer renderer;

   TextureAtlas atlas;
   Skeleton skeleton;
   AnimationState state;

   public void create () {

      camera = new OrthographicCamera();

      batch = new PolygonSpriteBatch();

      renderer = new SkeletonRenderer();

      atlas = new TextureAtlas(Gdx.files.internal("animals/Animals.atlas"));
      SkeletonJson json = new SkeletonJson(atlas); // This loads skeleton JSON data, which is stateless.

      SkeletonData skeletonData = json.readSkeletonData(Gdx.files.internal("animals/Animals.json"));

      skeleton = new Skeleton(skeletonData); // Skeleton holds skeleton state (bone positions, slot attachments, etc).


      AnimationStateData stateData = new AnimationStateData(skeletonData); // Defines mixing (crossfading) between animations.

      state = new AnimationState(stateData); // Holds the animation state for a skeleton (current animation, time, etc).

      state.setAnimation(0, "idle", true);

   public void render () {

      state.update(Gdx.graphics.getDeltaTime()); // Update the animation time.


      state.apply(skeleton); // Poses skeleton using current animations. This sets the bones' local SRT.
      skeleton.updateWorldTransform(); // Uses the bones' local SRT to compute their world SRT.

      // Configure the camera, SpriteBatch, and SkeletonRendererDebug.

      renderer.draw(batch, skeleton); // Draw the skeleton images.


   public void resize (int width, int height) {

   public void dispose () {

  • \$\begingroup\$ Does the clipping shift depending on what sprite you're displaying, or how you position/orient/size the sprite on your screen, or other factors? \$\endgroup\$
    – DMGregory
    Dec 19, 2018 at 17:42
  • \$\begingroup\$ @DMGregory Found the issue and answered my own problem. Thanks for your response though! \$\endgroup\$ Dec 19, 2018 at 22:17

1 Answer 1


Found the culprit to my own problem.

Apparently the default skin in the exported json from spine had an attachment with clipping. The renderer on iOS with Cocos2D ignored this for some reason so this never was an issue before.

"Clipper": {
            "Clipper": {
                "type": "clipping",
                "end": "Clipper",
                "vertexCount": 4,
                "vertices": [ -712, 1424, -712, 655.21, 1363.21, 1424, 1363.21, 655.21]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .