• Runtimes
  • Tint Black issue render in runtime

Hi guys 🙂

I tried to use "tint black" option in Spine editor, and it works pretty well ^^

But, in game, it is darker, and I don't understand why :/

I read a topic about this kind of "issue", and the solution was to export the Spine with "bleed" option (but I can't find this topic anymore in the forum)

Can you explain me why I need to export my Spine with the "bleed" mode?

Thanks a lot 🙂

Related Discussions
...
  • Editado

Could you tell us what runtime you are using?

Sure, sorry, I forget to mention it: Cocos 2dx

😉

Are you using premultiplied alpha exports? cocos2d-x does its own premultiplied alpha mangling when it loads images, so you don't have to export your texture atlases with PMA from Spine. Could you show me what you see in the editor and what you get in cocos2d-x?

Like you said, cocos2d-x does its own premultiplied alpha, so I don't touch my export's option from spine.

This my issue with a little exemple:

So "in game" we can see the tint black not working :s

Do the examples which use tint black work as expected in your cocos2d-x setup? See spine-cocos2dx/example/Classes/TankExample.cpp (set the scene to TankExample).

I tried the Tank example with Cocos2d-x : 3.16 and the last version of the spine runtime.

And the Tint black still doesn't work, as you can see on the black smoke:

You have to explicitely enable two color tint on a skeleton node like this:

skeletonNode->setTwoColorTint(true);

We don't make two color tint the default in cocos2d-x as it can break some of the batching.

Hi!

I set the "setTwoColorTint" and it's work pretty well, thank you :yes:

But why don't you put that line in your example code?

I tried my character in game and it looks like there are some strange bugs with a couple of pictures...
Does it's ring any bell for you? Because without "setTwoColorTint" my asset looks fine

https://drive.google.com/file/d/1-VqjVcDaVpbM0MsqseV2U5cmBXAswY_S/view?usp=sharing

I can't tell what the bugs are from that image, can you show how it should look?

I try to put the Tank example, in game, and see if the bug is in too.

Like you can see, there a strange issue with the tank's wheel:

https://drive.google.com/file/d/1la8hDNWlHxoYjXOIiqbfoz1aU4Rfrd8j/view?usp=sharing

It looks like the slot don't have a "multiply" effect on it, but in the setup, the slot is ok (like the other).

So I don't understand why some part of the tank have a issue (the wheel) and not the rest of it :shake:

un mes más tarde