Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working on mobile? #13

Open
NikitaGedzhua opened this issue Dec 14, 2023 · 16 comments
Open

Working on mobile? #13

NikitaGedzhua opened this issue Dec 14, 2023 · 16 comments

Comments

@NikitaGedzhua
Copy link

Working on mobile?

@Saurabh7SSR
Copy link

Saurabh7SSR commented Dec 15, 2023

Metal on iOS is supported, So iphones and ipads. For android Vulkan support is planned, but that is like 85% of phones but even then most of these vulkan phones are mid-tier and some are low spec phones. All of these high performance renderers like Rive renderer or Vello Renderer are next generation tech which is fast on fast devices, no matter how much compatibility they claim using PLS.
Total Mobile device coverage is not feasible with high performance tech that will drain all the battery if enabled (full throttle).

@NikitaGedzhua
Copy link
Author

Thanks for the quick response, as I understand it, Android 2022+ that is not on a Vulkan will not work?

@Saurabh7SSR
Copy link

Saurabh7SSR commented Dec 15, 2023

Vulkan API was released around 2015, but there are low spec phones that support vulkan API but have weak processors.
here is the android device distribution: https://developer.android.com/about/dashboards

Rive Renderer using Rive Android checks for devices that support Pixel Local Storage if they don't is switched back to skia renderer.

Point I am trying to make is, consider Rive renderer to increase efficiency and preserve battery for mobile, to do that keep number of animations low enough that if it was skia renderer it will not have frames dropping on older devices.

@marcolatellafrias
Copy link

marcolatellafrias commented Feb 28, 2024

@HayesGordon Does this mean decreased performance on android, or does it just mean rive not working at all? Right now im trying an embeded unity app inside flutter, using rive, and the animated rive texture gets rendered as a black motionless texture. The rest of the unity proyect works well. Any workarounds? And if not potential timescale when this could be shipped? I have tried building with both OpenGLES3 and vulkan separately

@Saurabh7SSR
Copy link

Check vulkan compatibility on your phone with this app:
https://play.google.com/store/apps/details?id=de.saschawillems.vulkancapsviewer&hl=en_US

Only Vulkan capable devices will be supported by rive-unity as per their docs.

@marcolatellafrias
Copy link

Thanks for the reply, they told me i have to switch Unity to the GL Core renderer for it to work with android.
This should work on OpenGLES 3? I have tested it with both vulkan and opengles 3 together, and each one separately, with all arm v7, and arm64 combinations also and rive will just produce a black texture on android (not on desktop). Here are my player settings on android, and my vulkan settings on the phone im testing right now

image
image

@luigi-rosso
Copy link
Contributor

The Vulkan renderer for Rive is not available yet. We're anticipating it being available in the next month.

On Android we've only tested OpenGL Core, although ES3 should work too.

We did have someone else report issues with IL2CPP, can you try using the mono backend to see if that makes a change?

@marcolatellafrias
Copy link

I just tried building with mono, but unfortunately the library we are using for embeding unity into flutter, requires IL2CPP, otherwise it will not compile.

@pjarnfelt
Copy link

When I have the RiveTexture.cs file including the m_riveRenderer.Submit(); then it doesn't work (completely black screen, not just the material on the renderer failing). Leaving it out makes the Rive animation not render. Tested on Android OpenGLES URP IL2CPP.
The supported renderers are now updated to include OpenGL on Android. One would expect it to work then.

@pjarnfelt
Copy link

I have tried building with Mono and IL2CPP to no avail. I tried putting in a delay for m_riveRenderer.Submit() and sure enough. When this is triggered, the entire screen goes black and no error messages are thrown.

@Saurabh7SSR
Copy link

Android OpenGL ES 3.2 device fails to render rive with il2cpp or mono. Please confirm if you have any opengl es working.

Any android test devices that you have tested it on.

Vulkan support is keenly awaited.

@parth-choudhary
Copy link

Any update on this? @Saurabh7SSR is the Vulcan support ready?

@damzobridge
Copy link
Contributor

Hi @parth-choudhary , Vulkan support for Rive in Unity is not available yet, but it is something that we're working on!

@pjarnfelt If you add GL.InvalidateState(); after the m_riveRenderer.Submit(); does that help with the black screen issue?

@surendrancj
Copy link

@damzobridge Are there any updates on this? Could you provide an approximate timeline for when Vulkan support might be available? Our platform's game performance is highly reliant on Vulkan, so this is critical for us.

@damzobridge
Copy link
Contributor

damzobridge commented Sep 3, 2024

Are there any updates on this? Could you provide an approximate timeline for when Vulkan support might be available? Our platform's game performance is highly reliant on Vulkan, so this is critical for us.

@surendrancj We're still actively working on this! I can't give a specific timeline yet, but we're close to having something we can share hopefully soon.

@Saurabh7SSR
Copy link

bump

The Vulkan renderer for Rive is not available yet. We're anticipating it being available in the next month.

Any update @luigi-rosso

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants