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
Сообщения: 1454

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
Сообщения: 1335

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
Сообщения: 8373

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
Сообщения: 1454


Вернуться в Editor