Page 1 of 1

Touch sample choppy movement.

Posted: 18 Mar 2014, 08:49
by fredrikm
Hi.

With the included Touch sample in Noesis for Unity3d we are seeing very choppy movement when swiping the images.
The movement seems ok as long as the finger is "holding" the image but as soon as we let go and let the inertia based movement take over it looks very choppy, almost like the velocity is changing every other frame.

We see this on both an iPad mini 2nd gen (with retina) and a Nexus 10".

Has anyone else experienced this?

Re: Touch sample choppy movement.

Posted: 19 Mar 2014, 13:03
by jsantos
Obviously this is not normal. Can you verify in the XCode gauges that the performance is correct?

Re: Touch sample choppy movement.

Posted: 19 Mar 2014, 14:21
by fredrikm
Using the Touch scene bundled with Noesis 1.1.5.4759

Added
Application.targetFrameRate = 60;

so we get above 30 FPS on iPad.

I can see that the animating cube in the background has smooth movement.

Gauges show
FPS : 60
CPU : 32%
MEM : 25.9MB

If i enable the internal unity profiling
ENABLE_INTERNAL_PROFILER 1
I also see a total frame time of 16.6 ms

So the movement isn't choppy because of slow framerate, it's looks more like the velocity is fluctuating every other frame which gives the illusion of a "vibrating" image when it travels over the screen.

Re: Touch sample choppy movement.

Posted: 19 Mar 2014, 14:30
by jsantos
Does this sample work correctly on your devices?

viewtopic.php?f=12&t=288

Re: Touch sample choppy movement.

Posted: 19 Mar 2014, 15:02
by fredrikm
That sample shows exactly the same symptoms as the Touch sample.

The framerate is 60 fps when zoomed out but there is noticeable choppiness/ghosting when doing a swipe and releasing the finger so the inertia based movement takes over.

Zoomed in the framerate drops to around 35 but the choppiness/ghosting stays the same.

Re: Touch sample choppy movement.

Posted: 19 Mar 2014, 15:21
by jsantos
Can you generate an .apk with the TouchSample and send it to me? I want to verify that the result is the same than the apk I have here.

Thanks!

Re: Touch sample choppy movement.

Posted: 19 Mar 2014, 15:53
by fredrikm
Emailed dl links to [email protected]

Re: Touch sample choppy movement.

Posted: 19 Mar 2014, 22:22
by jsantos
Your .apk works fine here. I tested moving the cat from corner to another using inertia.



I suppose you are not getting this behavior. Can you log the velocities per frame? They are passed in the ManipulationDeltaEventArgs struct.

Thanks!

Re: Touch sample choppy movement.

Posted: 20 Mar 2014, 11:36
by fredrikm
Hi.
Did some logging/plotting and it seems the problem is a varying framerate around 60 which causes the illusion of jerky movement.

At 60 fps the framerate swaps rapidly between 60/30 because of vsynch
60_fps.png
60_fps_deltatime.png
At 30 fps the delta movement is smooth but then the problem is a to low framerate to give the illusion of really smooth movement over the retina display.
30_fps.png
30_fps.png (8.76 KiB) Viewed 3188 times
Sorry for any confusion caused, the xcode gauges and the unity profiler led us to believe we had a solid 60 fps but as we can see that is not the case.

Re: Touch sample choppy movement.

Posted: 20 Mar 2014, 15:29
by jsantos
Amazing report!

We always tested with 30 fps because it is the default in Unity and the recommended setting for saving battery. Anyway, in my opinion your .apk (at 60 fps) is acceptable, yes, it is true that there are a few smoothness artifacts. I will find time to investigate why the frame rate is not 60 fps always.