Lindsay

Hey All,

I'm having issues trying to get the transparency to animate. I'm currently using the game engine 'stencyl', and unfortunately there doesn't seem to be much support for spine in Stencyl any more (developer of the extension has quit since Spine 3.8 ).

I've animated my opacity using the 'color' keys underneath the 'blending mode' within Spine. My current settings for this is below.
2020-01-22_14h02_04.png

2020-01-22_14h07_37.png


When I set up the Spine file inside Stencyl, everything works EXCEPT the color transparency. Even when I apply the transparency without any animations, it still doesn't seem to read it.

I'm hoping that its a settings thing for me since this is a pretty big deal to try and sort out. I don't want to use 'png sequence' since the file size is enormous, so if anyone has any input with this, that would be amazing!

I've also noticed another thing as well (not sure if it related or not), but the images seem to have black alpha around them when in the game. I have set the "premultiply alpha" as well, so I don't think it's that, and the images are NOT compressed (well, for the ones I'm testing anyway).

2019-12-15_19h15_54.png


here is it in game...

78784115_1964378220375423_6064576689051009024_n.jpg


Help would be appreciative.

Cheers!
Bạn không được cấp phép để xem tập tin đính kèm trong bài viết này.
Lindsay
  • Bài viết: 3

Erika

Hello! I couldn't help but notice you have Premultiply Alpha active in your export settings. Make sure to also enable it at runtime! or to disable it if you're not interested in optimization :> that will make the dark color go away!

Premultiplied Alpha Guide
Hình đại diện của thành viên
Erika

Erikari
  • Bài viết: 2592

Lindsay

Hey Erikari! Thanks for the help. It looks as if turning off 'Premultiply alpha' got rid of the black sections, but it seems to be still having issues with the 'transparency'. The game runs every animation normally except for the transparency xD.
Lindsay
  • Bài viết: 3

Harald

Animated attachment colors are passed to the renderer via vertex colors, so it has nothing to do with textures or the texture packing export options.

Does Stencyl also ignore if you set the RGB part of the color instead of its alpha value, e.g. set it to red 255, 0, 0, 255?
If the RGB color part works, then there is a bug in the Stencyl implementation.
If it does not work, then it is either not implemented, or you are missing some setup parameter that enables transfer of these vertex attributes. Are you perhaps provided with any settings like Enable Vertex Color or similar?
Hình đại diện của thành viên
Harald

Harri
  • Bài viết: 2076

Lindsay

Thanks Harald for the reply. Yeah, the color works fine. I was worried that it would be the Stencyl side -_-'. I don't think there is a setting to enable vertex color :(

---

So an Update. The flash player works perfectly! It's only when it compiles to android.. hmmmm.
Lindsay
  • Bài viết: 3

Harald

Lindsay đã viết:Yeah, the color works fine. [..] I don't think there is a setting to enable vertex color
If the RGB part of the color works fine, then it should already be set up properly.
Lindsay đã viết:The flash player works perfectly! It's only when it compiles to android.. hmmmm.
Oh, that definitely sounds like a bug then.
Unfortunately, in the respective Spine stencyl code I see no obvious error, the alpha component seems to be correctly respected:
https://github.com/byrobingames/spinehaxe/blob/master/spinehaxe/platform/openfl/SkeletonSprite.hx#L300
You could try if setting the whole skeleton's alpha value to e.g. 0.5 and test whether this is working - if you find a way to set the skeleton's color in Stencyl.
Hình đại diện của thành viên
Harald

Harri
  • Bài viết: 2076


Quay về Runtimes