• Runtimes
  • [UE4] strange alpha behaviour

Hello
Faced the problem of incorrect display of alpha in unreal engine 4
Could you please tell me how I can fix this?

This is how the animation looks in Spine

Image removed due to the lack of support for HTTPS. | Show Anyway

Alpha of one slot is reduced this way (blending mode Normal)

Image removed due to the lack of support for HTTPS. | Show Anyway

Alpha is not displayed correctly in Unreal Engine 4

Image removed due to the lack of support for HTTPS. | Show Anyway

Please let me know if you need any further information.

Related Discussions
...

What blend mode does your slot have? (I can't read the Russian, sorry!)

Hi, Nate
Blend mode is "Normal"

Thanks. My only guess then is that the PMA setting at runtime doesn't match the setting when the atlas was packed. If that's not it, we'll have to wait for Mario to take a look.

Thanks, Nate
We already trying with PMA/without PMA export. Looks like there are no difference.

spine-ue4 documentation said 'spine-ue4 runtime currently does not support atlases exported using pre-multiplied alpha' so PMA is not enabled in export setting in this case.

Blending in UE4 is sadly a bit of a mess. It's hard to impossible to faithfully reproduce Spine's blending modes using UE4 materials. I assume you are using the materials that come with spine-ue4? Are you using any special post-processing effects in UE4?

Hello Mario
Yes. I'm using default materials comes with spine-ue4.
Also there is only one Post Process Volume in my scene with a very little changes and Enabling/Disabling it has no effect.

Here is the PostProcessing screenshot

15일 후

Hello Mario
Sent with a "[UE4] strange alpha behaviour" in subject

Thank you


Hello
Is there chance to do something with this issue?

Thanks

Hi. Having similar but webgl issue in pixi type runtime. After re exporting some animation opacity with blending and opacity appears incoreect(in spine it looks nice with nice easings, low opacity But in runtime it looks with maximum opacity, blinks). older export files looks nice. Inside Spine projects looks similar. For some reason json exports also dont have code formating. Attached video and export files

@Vadym you have exported your texture atlas without premultiplied alpha, while pixi-spine is likely rendering with the assumption that the assets have premultiplied alpha. Please check the pixi-spine documentation on how to enable/disable premultiplied alpha, or export your atlas with premultiplied alpha. I have confirmed this with our spine-ts web player.

@AHPyXA I'm sorry, I haven't figured this out yet. I'll post here once I have an idea what's going on.

Mario wrote

@[삭제됨] you have exported your texture atlas without premultiplied alpha, while pixi-spine is likely rendering with the assumption that the assets have premultiplied alpha. Please check the pixi-spine documentation on how to enable/disable premultiplied alpha, or export your atlas with premultiplied alpha. I have confirmed this with our spine-ts web player.
Solved - front-end side problem
I've tried both ways. Nothing has changed. But I ve asked another front-end to try this symbol and it worked better in another project and there rapid blending blink has gone but all blending has gone at all. The problem was solved when front-end figured out that he has had pixi-heaven 2.0.2 heaven and the 2.0.3 fixed the issue. Any way thank you for quick answers!

@AHPyXA The difference turns out to be due to Gamma space rendering and blending in Spine 3.8.99 vs. Linear color space blending taking place in UE4. You can also see the same blending result like UE4 when using Spine 4.0-beta, which allows to switch between Linear blending and Gamma blending in Spine Settings - Application - General - Color Management.

So you could either switch UE4 rendering pipeline to Gamma space, or preview how blending looks like in Spine 4.0-beta with color space set to Linear blending.

@[삭제됨]

Vadym wrote

Hi. Having similar but webgl issue in pixi type runtime. After re exporting some animation opacity with blending and opacity appears incoreect(in spine it looks nice with nice easings, low opacity But in runtime it looks with maximum opacity, blinks).

I assume that you are facing the same problem. Could you please check if that's the case?
[Edit:] Just read after posting this text that you have already solved the problem, then never mind 🙂.

4일 후

Hello @[삭제됨]

Thank you for investigation!

What do you mean saying "switch UE4 rendering pipeline to Gamma space"? I can't find anything similar in project settings or in the documentation.