PoV

Hey,

Using the SFML C++ library as reference, I now have Spine animations playing in my codebase. Here's a Vine:

https://vine.co/v/bglOmF3QAHp

Anyways, I noticed the Atlas has a function newAtlasPage which you overload to load your textures from disk to VRAM, but there's no function/hook I can use to clean up (no deleteAtlasPage).

Great work BTW. Loving Spine. :)

PS: The disappearing Torso and Interpolating-to-Red head in the animation file took me a while to track down. Good thing JSON files are so easy to read. ;)
Mike Kasprzak
SYKRONICS | Blog | Twitter | Ludum Dare
Avatar
PoV

Epic Kickstarter Backer
  • Postovi: 15

Nate

Super cool! :)

Heh, the torso and head color were for testing, I didn't mean to commit them but have been too busy to fix it. :)

Typically all the backing images for the atlas are loaded when it is constructed and unloaded when destructed. I see the SFML runtime isn't unloaded them in the destructor, I'll fix that soon.
Avatar
Nate

Nate
  • Postovi: 11846

terrymisu

PoV je napisao/la:Hey,

Using the SFML C++ library as reference, I now have Spine animations playing in my codebase. Here's a Vine:

https://vine.co/v/bglOmF3QAHp

Anyways, I noticed the Atlas has a function newAtlasPage which you overload to load your textures from disk to VRAM, but there's no function/hook I can use to clean up (no deleteAtlasPage).

Great work BTW. Loving Spine. :)

PS: The disappearing Torso and Interpolating-to-Red head in the animation file took me a while to track down. Good thing JSON files are so easy to read. ;)
Is this the same color of hair you were seeing, or is it different?



Just wondering if my color mixing is working properly... ;)
Avatar
terrymisu

Kickstarter Backer
  • Postovi: 136

PoV

It was red yes, but in my case it affected the face too... probably more than anything.

Here's a shot from when I was trying to track down the problem.



Looks like your blending might be off. Yours looks a bit too neon to me (additive?). :)
Mike Kasprzak
SYKRONICS | Blog | Twitter | Ludum Dare
Avatar
PoV

Epic Kickstarter Backer
  • Postovi: 15

PoV

Just in case anybody else is porting Spine to their own SDK (native OpenGL, Direct3D, or whatnot), here's some glitched images and thoughts on what was broken then fixed in the next image.



1. No texture
2. I forget exactly, but something with the UVs
3. 4 Vertices are being added, but render mode was Triangle Strips not Quads (which is deprecated in current OpenGL, and unavailable in OpenGL ES and Direct3D FYI)
4. Alpha blending not enabled.
5. Triangle Strips with 6 vertices per sprite, when it should have be Triangles (not strips)



6a. Rigid Texture (pixely). Is the texture filtering mode. In OpenGL this is GL_NEAREST, and what you want is GL_LINEAR.
6b. Texture fringe (along edges). Can fix either by modifying the artwork (including color in the 100% alpha areas, even though it's transparent), or by using a pre-multiplied alpha blending mode (and multiplying your RGB channels by the alpha value).
7. (6 not fixed until next image) Test art assets contain 2 glitchy looking transformations (used by Spine devs to test blending features). Edit the JSON animation file if you want to remove them.
8. Done. Spineboy.
Mike Kasprzak
SYKRONICS | Blog | Twitter | Ludum Dare
Avatar
PoV

Epic Kickstarter Backer
  • Postovi: 15

Nate

Haha, very cool documentary on the evolution of your runtime. :) I also like your background. I'm quite familiar with having everything FUBAR and trying to figure out what transforms are bad, etc. It's all worth it when it comes together in the end! :party:
Avatar
Nate

Nate
  • Postovi: 11846

PoV

Nate je napisao/la:Haha, very cool documentary on the evolution of your runtime. :) I also like your background.
Thanks. My go-to background is usually an off-black (dark red), but I've had this noise shader for a while that's just dying to be used. ;)
Nate je napisao/la:I'm quite familiar with having everything FUBAR and trying to figure out what transforms are bad, etc. It's all worth it when it comes together in the end! :party:
Indeed. I got to do ports to a lot of different devices, many which don't even exist anymore, and the process is always the same: Get those white boxes up, then get them to draw right. :)

And yeah, you get to see interesting glitches along the way. Sometimes, they go disco. :rofl:

Mike Kasprzak
SYKRONICS | Blog | Twitter | Ludum Dare
Avatar
PoV

Epic Kickstarter Backer
  • Postovi: 15

Søren

Disco!

Love it :D
Avatar
Søren

Shiu
  • Postovi: 2447

terrymisu

PoV je napisao/la:It was red yes, but in my case it affected the face too... probably more than anything.

Here's a shot from when I was trying to track down the problem.



Looks like your blending might be off. Yours looks a bit too neon to me (additive?). :)
Can you post an image of what it's actually supposed to look like? ;)
Avatar
terrymisu

Kickstarter Backer
  • Postovi: 136

Søren

Should look like that except for the fringes around the edges of the images. Spineboy had been wearing sunglasses out in the sun all day and as a result ended up being slightly transparent and very red ;)
Avatar
Søren

Shiu
  • Postovi: 2447


Natrag na Editor