rive-app / rive-unreal

MIT License
77 stars 4 forks source link

Transparency #55

Closed Reec-3 closed 3 months ago

Reec-3 commented 4 months ago

When using transparency with no background colour the resulting image in UE5 is incorrect. I've tried all blend modes, the only one that kind of works is translucent but this makes the whole thing too light and doesn't look like the original art in Rive Editor.

To reproduce, make the artboard background transparent, then make something like a rectangle with a gradient that blends from a solid colour to transparent.

Update: NoesisGUI renders the same RiveFile correctly.

Reec-3 commented 4 months ago

Here are some visuals to show what I mean. Three rectangles from left to right, 50% alpha, linear gradient from top to bottom (100-0% alpha), and radial gradient.

The original Original

Alpha blend as it shows in the RiveFile AlphaBlend

Alpha blend as it shows in game AlphaBlendInGame

Opaque as it shows in the RiveFile Opaque

Opaque as it shows in game OpaqueInGame

Translucent as it shows in the RiveFile Translucent

Translucent as it shows in game (against a dark background so you can see it easier) TranslucentInGame

As you can see translucent is the closest to the original but some detail appears to be lost. Also when the blend mode is set to translucent it does not render in widget components regardless of material.

Voulz commented 4 months ago

Thank you @Reec-3 for the detailed information, we are working on this. There are a few issues with transparency linked to DX11 that we are looking at

LucasNova commented 3 months ago

Maybe it also related to that issue, radial gradient and gradients works wrong in unreal, for example what we have in rive app image

And what we have in Unreal: image

P.S: That problem disappearing in game, when we hit "Play Level" or "Simulate"

Voulz commented 3 months ago

@Reec-3 and @LucasNova , the DirectX11 issues should have been fixed now in both development and main branches. Let me know if you still have issues. image

LucasNova commented 3 months ago

@Reec-3, For me at the 0.1.4 all fine. Thanks a lot.