Ghosting on Android with OpenGL - android

I have an OpenGL ES 2 app running on Android. I have tested on a few devices:
Samsung Galaxy S2
LG Optimus G
HTC One X
Kindle Fire
Kindle Fire HD
And the app runs as expected. However, there is a lingering issue on my Samsung Galaxy S3. In my demo, I render a bunch of spheres. I can also pan the camera around by touching and dragging my finger on the screen.
What I notice is "ghosting" when I move the camera. It's difficult to describe, but I can see the previous outlines of the sphere as I move the camera. And, I can continue to see the previous outlines as the camera moves. I don't see all the previous outlines -- only the last few (it's difficult to quantify things here). And, I only see the outlines within the sphere -- as far as I can tell, the previous outlines cease to exist outside of the sphere.
However, once the camera stops, the outlines catch up and disappear within ~1s. Simply put, when things are stationary, everything renders correctly.
I recently had some texturing issues (related to mipmapping) and I solved them the other day. The problem and solution are outlined here:
Black Artifacts on Android in OpenGL ES 2
Could my texturing fix be related to this? I realize that I'm leaving out A LOT of details, but I'm wondering if the symptoms are enough to go on? Any ideas?
Thanks.
Additional details:
The ghosting does not show up when taking a screenshot using the NDK.
A photo of the problem:

A temporary solution is on your phone, under Developer options, check the box to "Disable hardware overlays."
I'm not yet sure if there's a way to force this behavior when running your app.

Related

AR foundation: when phone camera is covered, instantiated object is glued to the camera

I downloaded the AR Foundation samples from Unity (link: https://github.com/Unity-Technologies/arfoundation-samples/tree/4.1) , and made a build of one of the scenes called ImageTrackingWithMultiplePrefabs and put it on my android phone.
The build works fine when scanning markers, but as soon as the camera is covered, the object is glued to the camera, and I have to either look at the marker again, or restart the app to fix it.
This is going to be an issue because we're making an app and it could happen a lot, for example when the user puts their phone down.
I made a video to better explain the issue: https://youtu.be/BgCHbZeSWd4
More info:
Unity version: 2020.3.20f1
AR Foundation version: 4.1.9
phone: google pixel 5 (but it also happened on my Samsung galaxy S10)
I put a log in the PrefabPairImageManager.cs script and noticed that when we look away, the tracking changes to limited, and stays the same, even when the camera is covered. So there's no way for me to find out when the camera is covered in code based on the tracking info.
What am I doing wrong?
Thanks a lot

material disappears from game object unity

I have a really strange problem that I can't find the solution for. I am new to Unity and only had about a week experience with Vuforia. My problem is that I have a target which I am overlaying with a 3D object and then I compile to Android. My phone is a Galaxy S7. When I come up close and the target is detected everything is fine however as soon as I start backing out the material slowly disappears off of the game object. This only happens on my phone. I tested with 4 other phones (ZTE Blade, Pixel 1 & 2, HTC ONE) on which it works perfectly fine.
Has anyone experienced this before?
Images:
Close-up:
Initial state, close up
Starting to back out:
Material starts to disappear, seems like an invisible sphere around it
Material disappeared off of the object:
Material is gone

Google VR + Unity = tracking stuttering / jittering / choppy

Launching GVRDemo scene using Unity5.4.2f2-GVR13 installation package I'm experiencing unsteady tracking on my Samsung Galaxy S7. As you can see on an attached video it's not caused by low frame rate nor any of my code since the only thing I've changed in the scene is switching the cubeRoom object with a textured sphere object which better visualises the issue:
https://youtu.be/_NRQNbtdpuI
It doesn't matter if I change the quality setting from Fantastic to Fastest.
As you can see the frame rate doesn't drop around the stuttering moments, so it's not about the CPU/GPU performance
As I test the Google Street View app for example, there's no such issue – is it because it's been written natively for Android?
On the other hand I've noticed games like VR Fantasy with tracking system behaving differently – more smoothly due to the delay in the reaction time regarding the device's movement (looks nice, but causes nausea after 5 seconds). This makes me believe there is an issue with Google VR tracking.
Is anyone experiencing the same thing? What might be the reason for it?
I am also testing a simple VR app made with Unity (5.6b9), and i'm finding that Android performance is rather poor. This is the case on cheap phones (Moto G, $150) as well as fancy phones (Nexus 5X, Asus ZenFone 3) and even expensive phones (Samsung S6).
I'm particularly puzzled by how poor the performance of a VERY simple VR app made with unity is (empty scene, a cube and a sphere, no special lighting, single pass rendering...). The Samsung S6 performes very well with native GearVR apps, or photos/videos. All the phones perform very well with things like street view or youtube.
The same unity app running on iOS outperformer all the androids by a wide margin.
Are there some tricks we're not aware of for getting performance out of android?
I'm using Unity5.4.2f2-GVR13 too, and I think it's just random.
Charging up your phone and controller, and rebooting the phone seems to help a lot.

Strange graphics artefacts in Android app

I'm intermittently observing strange graphics artefacts in my app, as shown below. This is a screengrab from a Samsung Galaxy S3. I have only observed it on this particular phone. I have run the app on a Samsung Galaxy Tab S4 and an HTC One, and never observed this issue on either - although admittedly I do mainly use the S3 for development.
I considered that the issue might be some sort of concurrency clash in drawing to the Canvas (I'm using the basic Android rendering methods, no OpenGL or anything), since I can clearly recognise the repeating units of other UI elements, so I synchronized all the code which draws to or interacts with the Canvas and I'm still observing it happen.
It does clear itself up after around 30-90 seconds, which may be due to a regular scheduled memory cleanup operation it performs - so perhaps this is a manifestation of low available mem?
If I had enough rep I would stick a pretty big bounty on this. Any help appreciated. Hopefully someone recognises this particular problem.
Apply hardware layers:
setLayerType(View.LAYER_TYPE_HARDWARE, null);

Is depth handled differently by opengl on different android phones?

Im testing my new game prior to release and i have found that on some devices the Z positions seemed to be mixed up in some cases and objects that should appear on top were appearing underneath.
I'm running opengl es 1 and it runs perfectly on my Samsung Galaxy S2 (and all the samsung devices i tested on) but went wrong on a HTC Desire.
Does anyone have any ideas?
Can you provide us with some pictures and source code? Common depth buffer problems cause some banding problems but your problem seems more related to some default driver state that is set differently value depending on which hardware are you running on.
I suggest you to generate a very simple example and start from the scratch until you find where is the problem, I don't think we can help you with so little information.
Hope that helps.

Categories

Resources