belpetr

Hey.

I often have situations when it is necessary to introduce the whole character into translucency. And in this case artifacts arise (see the picture). Is there any way to fix this? And maybe it makes sense to add the alpha change function for the entire skeleton as a whole?

Thank.
附件
alpha.png
belpetr
帖子: 60

badlogic

The problem is that individual attachments of your skeleton overlap. If they are transparent, their (transparent) pixel colors will be added on top of each other, resulting in the issue you see. I don't think there is a clear cut solution to this, but maybe @Erikari has an idea.
头像
badlogic

Mario
帖子: 1448

Erikari

Unfortunately I have no really better input on this transparency matter, unless you're willing to introduce your character with a still image that you fade in, then replace it with the actual skeleton, or have the background actually fade in front of the skeleton, there's no good solution as far as I know.
头像
Erikari

Erikari
帖子: 1332

Nate

FWIW, at runtime you could render the skeleton to a buffer (FBO for OpenGL-based apps), then when you render the FBO texture you can adjust the opacity of the entire skeleton.
头像
Nate

Nate
帖子: 8365

belpetr

Thank you for your responses. The offer from Nate doesn’t seem particularly interesting.
belpetr
帖子: 60

badlogic

The two options (have a transparent full version of your character in the skeleton, or render a non-transparent version of your skeleton to an off-screen buffer/texture, then draw that with opacity < 1) are the only two options to solve this problem. It's a fundamental problem when overlaying transparent images on top of each other. There are different blend modes, but they all combine the pixels of overlaying regions.
头像
badlogic

Mario
帖子: 1448


回到 Editor