Jump to content

Pixi, spines, and meshes


trevorh
 Share

Recommended Posts

Hello everyone,

 

I'm loving Pixi so far, but have run in to a bit of a problem. When using spines, any regions using meshes fail to appear. No errors are thrown, everything else functions correctly, and normal regions appear as expected.

 

The odd thing is, this seems to be a fixed issue. Similar problems were encountered a while ago (https://github.com/pixijs/pixi-spine/issues/10https://github.com/pixijs/pixi-spine/issues/35), but the issue was fixed and closed. I have confirmed (many times, believe me) that I am using the most recent pixi.js and pixi-spine.js files.

 

A link to my setup is here: https://www.dropbox.com/s/egh4pmznqvd4w0d/goblin_spines.zip

 

It's the same setup as http://pixijs.github.io/examples/index.html?s=spine&f=goblins.js&title=Goblin&plugins=pixi-spine, with the changes being in the spine files. Mrs. Goblin is the same spine as in the example, but Mr. Goblin uses mesh regions. Swap between the two by clicking.

 

Mrs. Goblin is drawn correctly. Every one of Mr. Goblin's mesh regions are not drawn, meaning only his closed eyes and shield are drawn.

 

I've been banging my head against this for a few days now; any help would be very appreciated.

 

Thanks

Link to comment
Share on other sites

Ok, I'll investigate that problem. For now you can add gpupatch in the list of libs: https://github.com/pixijs/pixi-spine/blob/gpupatch/gpupatch/SkinnedMeshPatch.js 

That thing uses special renderer for spine objects, and its more effective on meshes. Works only if you use WebGL

 

UPD. no, this patch doesnt work with your demo. investigating.

 

UPD2. found some problems in parsing that model

Link to comment
Share on other sites

Ok, solution: your goblin atlas uses old texturepacker format, which had size of texture as optional parameter. Now its required.

goblins-mesh.pngformat: RGBA8888filter: Linear,Linearrepeat: none 

That's how its supposed to be:

goblins-mesh.pngsize: 1024,128format: RGBA8888filter: Linear,Linearrepeat: none

Also I encountered some problems in my gpupatch, i'll fix it soon.

 

UPD. gpupatch is fixed.

 

UPD 2. pixi-spine updated to v1.0.7 and now it tells in console about old texturepacker format, so other uses will just look in console and understand exactly what's going on.

Link to comment
Share on other sites

Thanks for the quick response! You are absolutely right, fixing the texture packer format resolves the issue.

 

Why didnt you just add an issue to pixi-spine github? :) You could have save that time you spent.

 

I wanted to make sure it was actually an issue and I wasn't being dumb  :)

 

Thanks again for the great support!

Link to comment
Share on other sites

Thanks for the quick response! You are absolutely right, fixing the texture packer format resolves the issue.

 

 

I wanted to make sure it was actually an issue and I wasn't being dumb  :)

 

Thanks again for the great support!

 

I suggest you to use my gpupatch if you will have more than 20 spine objects per frame. It will save a lot of CPU time.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...