Log in or register to post comments

Bad performance iPhone 4

April 20, 2012 - 8:37am #1

Hi everyone!

Last days, I've been testing hard the performance that Vuforia has on iOS devices.
After many hours of testing, I'm still very confused with the real compatibility with iPhone 3GS and iPhone 4 as told in the documentation.

Executing the Image Target sample with Vuforia's version 1.5.9 with Unity 3D 3.5, the Teapots application sample, runs at much less than the 30 FPS that it could on an iPhone 4. This low framerate, makes the marker tracking totally unstable.
When executed on an iPhone 3GS, there's no performance at all, and it doesn't even recognize the tracker.

The curious thing, is that the 1.0.0 QCAR version of the Image Target sample, the Teapots example, runs with a high framerate, although the tracking is a bit shaky...

I'm wondering if this is the result that you choosed to have a smoother tracking to the detriment of the general performance.

Obviously, on faster devices, this performance decrease is hardly perceived by the user and doesn't affect to the end app.

Could you give us some information regarding these issues? Are there other users reporting such behaviour?

Thank you!

Bad performance iPhone 4

September 16, 2013 - 8:14am #41

Assuming you are working in Unity, I think there are two places that you may be able to limit the impact of offline tracking:

1 - Avoid loading any datasets or deactivate/unload them

2 - Find any Image Targets in the scene and disable them

 

If it is crashing it could be because the scene has lost integrity i.e if something has been deleted that it is expecting to be there - easily done.

 

HTH

N

Bad performance iPhone 4

September 16, 2013 - 4:47am #40

Slowly.. There is one thing you could help me with though.

I searched a lot and checked all unity qcar api to find out but no success.

As we have in app both offline targets database and also cloud reco at the same time, I know how to disable cloud reco when offline target is recognized but can;t do it vice versa.

When I detect cloud target, offline detection is still going on which I believe also takes some resources unnecessarily.

also there is bad Sync() exception thrown somewhere down in vuforia when recognition of offline target happens while cloud target is being tracked.

It crashes iOS app completely.

Its not that common case so I'm not worried much about it, however being able to disable offline recognition while tracking cloud target would be definitelly helpful.

 

here is exception log for reference.

 

Unhandled Exception: System.InvalidOperationException: out of sync

 

  at System.Collections.Generic.Dictionary`2+Enumerator[System.Int32,TrackableBehaviour].VerifyState () [0x00000] in <filename unknown>:0 

 

  at System.Collections.Generic.Dictionary`2+Enumerator[System.Int32,TrackableBehaviour].MoveNext () [0x00000] in <filename unknown>:0 

 

  at System.Collections.Generic.Dictionary`2+ValueCollection+Enumerator[System.Int32,TrackableBehaviour].MoveNext () [0x00000] in <filename unknown>:0 

 

  at StateManagerImpl.UpdateTrackablePoses (UnityEngine.Camera arCamera, .TrackableResultData[] trackableResultDataArray, Int32 originTrackableID) [0x00000] in <filename unknown>:0 

 

  at QCARManagerImpl.UpdateTrackers (FrameState frameState) [0x00000] in <filename unknown>:0 

 

  at QCARManagerImpl.Update (ScreenOrientation counterRotation, CameraDeviceMode deviceMode, .VideoModeData& videoMode) [0x00000] in <filename unknown>:0 

 

  at QCARBehaviour.Update () [0x00000] in <filename unknown>:0 

Bad performance iPhone 4

September 16, 2013 - 2:51am #39

Thanks for the update - seems like you're making good progress.

N

Bad performance iPhone 4

September 14, 2013 - 3:05am #38

I was trying few things with our project and removing stuff little by little and checking improvements.

I got 5fps improvement when I took out cloud reco and another 5 when I took out all GUI...

So I made another test with empty project importing image targets and cloud reco packages. Combined scene of image targets with pots and cloud reco.

Just by usign both predefined reco and cloud reco at the same time as our app is doing as well, i got FPS drop on ipohne 4 to about 25 FPS.

Then I have added 4 buttons with small GUI textures like 140px inside GUI.Window and got drop down to 20FPS.

I know that GUILayer is overkill for mobile apps so we are not using this anywhere but we have 2 or 3 GUI.windows so I'll take these out as well to see how it imroves things. Also found this in documentation MonoBehaviour.useGUILayout=false.. to specifically disable GUI.win and GUYLayout

Last thing just to note, when target was recognized and tracked FPS got back to nearly 30 so 5FPS is definitely down when vuforia si analyzing camera feed for both cloud and predefined targets at the same time.

Having it down to max 20FPS is still OK at reco phase. So that is my next target...

Bad performance iPhone 4

September 13, 2013 - 8:25am #37

Good to hear, at least on my side ;)

Keep persevering and I'm sure you'll find it.  Try incrementally going from IT -> your project and see what you find, and hope you can share :)

 

N

Bad performance iPhone 4

September 13, 2013 - 8:22am #36

Hi

Nope, with image target project and cloud reco examples from vuforia I get on 3GS and also on i4 nearly 30fps....

Shame on me I did not check that before posting.

I just could not think of what else that can be as there is nothing in the scene apart from camera texture and GUI window with 4 icons.

There must be something in our project eating gpu and cpu, but how the hell to find out what it is. Its not getting draw calls and not in scripts ;o(

S.

Bad performance iPhone 4

September 13, 2013 - 6:58am #35

Hi Stan,

What frame rates are you seeing from the Image Targets app?

Definitely having a dual-core chip makes a difference.

 

N

Bad performance iPhone 4

September 13, 2013 - 6:28am #34

Hi guys,

have anyone find a way to get decent fps on i4 and 3gs?

here are some stats from unity iphone profiler.

As you can see there are no draw calls, script updates are taking up 10ms.

There is nothing in the scene but camera plane.

Its GPU and CPU hungry. Is it vuforia target detection and displaying camera view?

Anything we can do about it? setting camera mode to speed optimized made things unexpectably even a bit worse. 

9FPS makes our app useless on these devices

Stan.

 

i4

iPhone Unity internal profiler stats:

cpu-player>    min: 25.1   max: 125.0   avg: 81.5

cpu-ogles-drv> min:  0.4   max: 12.4   avg:  1.3

cpu-present>   min:  0.9   max: 30.8   avg:  6.1

gpu>           min: 97.3   max: 101.7   avg: 98.3

cpu-waits-gpu> min:  0.9   max: 30.8   avg:  6.1

 msaa-resolve> min:  0.1   max:  2.8   avg:  0.4

frametime>     min: 32.9   max: 210.4   avg: 126.0

draw-call #>   min:   7    max:   7    avg:   7     | batched:     0

tris #>        min:    14  max:    14  avg:    14   | batched:     0

verts #>       min:    28  max:    28  avg:    28   | batched:     0

player-detail> physx:  1.5 animation:  0.2 culling  0.0 skinning:  0.0 batching:  0.0 render: 96.3 fixed-update-count: 2 .. 12

mono-scripts>  update:  7.5   fixedUpdate:  0.1 coroutines:  0.0 

mono-memory>   used heap: 9691136 allocated heap: 10514432  max number of collections: 0 collection total duration:  0.0

 

3GS

iPhone Unity internal profiler stats:

cpu-player>    min: 12.4   max: 103.4   avg: 54.3

cpu-ogles-drv> min:  0.4   max: 23.2   avg:  1.9

cpu-present>   min:  1.1   max: 27.0   avg:  7.8

gpu>           min: 15.9   max: 22.5   avg: 19.8

cpu-waits-gpu> min:  1.1   max: 27.0   avg:  7.8

 msaa-resolve> min:  0.3   max:  0.5   avg:  0.3

frametime>     min: 35.7   max: 199.1   avg: 94.8

draw-call #>   min:   4    max:   4    avg:   4     | batched:     0

tris #>        min:     8  max:     8  avg:     8   | batched:     0

verts #>       min:    16  max:    16  avg:    16   | batched:     0

player-detail> physx:  1.0 animation:  0.0 culling  0.0 skinning:  0.0 batching:  0.0 render: 50.8 fixed-update-count: 2 .. 10

mono-scripts>  update:  8.3   fixedUpdate:  0.0 coroutines:  0.0 

mono-memory>   used heap: 9191424 allocated heap: 10612736  max number of collections: 0 collection total duration:  0.0

 

3GS with camera optimize Speed mode

iPhone Unity internal profiler stats:

cpu-player>    min: 27.5   max: 111.6   avg: 56.6

cpu-ogles-drv> min:  0.3   max:  7.3   avg:  0.9

cpu-present>   min:  1.1   max: 54.7   avg: 10.4

gpu>           min: 17.4   max: 38.4   avg: 22.9

cpu-waits-gpu> min:  1.1   max: 54.7   avg: 10.4

 msaa-resolve> min:  0.3   max:  1.2   avg:  0.3

frametime>     min: 42.3   max: 237.7   avg: 107.8

draw-call #>   min:   2    max:   2    avg:   2     | batched:     0

tris #>        min:     4  max:     4  avg:     4   | batched:     0

verts #>       min:     8  max:     8  avg:     8   | batched:     0

player-detail> physx:  1.3 animation:  2.3 culling  0.0 skinning:  0.2 batching:  0.0 render: 45.2 fixed-update-count: 2 .. 12

mono-scripts>  update:  9.7   fixedUpdate:  0.4 coroutines:  0.1 

mono-memory>   used heap: 9465856 allocated heap: 10612736  max number of collections: 0 collection total duration:  0.0

Bad performance iPhone 4

April 10, 2013 - 6:23am #33

Sorry, there is no such thing.

It's probably worth checking out the Unity iOS optimisations:

http://docs.unity3d.com/Documentation/Manual/iphone-performance.html

 

HTH

N

Bad performance iPhone 4

April 10, 2013 - 5:23am #32

In Unity...

We know there is not a direct way, but maybe with an "unsupported" hack on core code just for iPhone4?

Bad performance iPhone 4

April 10, 2013 - 2:40am #31

Sorry, there is no direct way of changing the camera resolution directly.

Is this native or Unity?

 

N

Bad performance iPhone 4

April 9, 2013 - 10:16am #30

Hi NalinS,

We've tested this, and the problem is still here...

We loose target with movement (even slow), and have a low frame rate for animations and for video background.

I read that it's an iPhone 4 gpu problem: a lot of pixels and a not so good procesor.

That's why reduce video background resolution could be a solution, but how to do it..?

 

Thanks in advance.

Bad performance iPhone 4

April 9, 2013 - 9:38am #29

You could try changing the quality settings to OPTIMIZE_SPEED in the dropdown box.

N

Bad performance iPhone 4

April 9, 2013 - 8:27am #28

Hi,

We've passed our app to Vuforia 2.013 for unity and haven't better results on an iPhone4... (bad tracking and slow frame rate).

Can you give me a way to use video backgroung at half resolution? (320x480 instead of 640x960)

 

Thanks.

Bad performance iPhone 4

February 22, 2013 - 9:08am #27

The dev team is constantly making improvements in all areas, however the only way to really test is with with your own application.

N

Bad performance iPhone 4

February 22, 2013 - 8:53am #26

Is the frame rate on iPhone4 is now better with vuforia 2 than with the 1.5? (with unity).

Bad performance iPhone 4

February 13, 2013 - 1:29am #25

Thanks for sharing the results of your investigations.

I have passed this on to the dev team as well .

Cheers

N

Bad performance iPhone 4

February 12, 2013 - 12:47am #24

I didn't dig into this to much, but i did see a beheaviour where on 3GS you get a better framerate than on iphone4. iPhone 4 is a great improvement over 3GS, but the GL driver has some horrible bottlenecks especially when it comes to uploading textures to the GPU. I found that the frame drop is mainly because of the video background which has to be four times as big on retina displays(ios GL drivers do not support video textures, so it is usually simulated by updating/reuploading texture to the GPU every time, which is costly). If you have MSAA enabled in your engine i suggest you to turn it off for retina enabled devices, video texture is heavy enough for the poor device and you get "free" anti aliasing thanks to the retina display pixel density. Moreover, enabling MSAA on 3GS and disabling it on iphone4 will even the frame rate between the devices and make the graphics look equally nice.

Anyway, you shouldn't forget that iphone is not your desktop PC and you need to tweak performance for heavy operations. If performance is still not quite enough then you can try drawing video background yourself with CVOpenGLESTextureCache as shown here by Apple. Another suggestion might be to start using VAO(Vertex Array Objects) if you don't do that already and use interleaved vertex data when creating a VBO. This might yield a great performance increase.

Also try to decrease as much as you can the use of alpha in iphone4, it handles it like a twat.

Bad performance iPhone 4

February 11, 2013 - 4:37am #23

If you can PM me with a link to your project I will try to take a look later this week.

N

Bad performance iPhone 4

February 9, 2013 - 7:04am #22

Hi everybody, 

 

I have same problem with the sdk-2-0-30.

The FPS is better on an iPhone 3GS than an iPhone 4.

It is still one of the most widespread smartphone on the market

 

4S, 5 and iPad 3 run like a charm.

Android smartphones run well too.

Development is done directly througth XCode and Eclipse. Not with Unity.

 

Realy need a solution!

Regards,

 

 

 

  • Native SDK
  • MacOS X 10.7.5
  • Xcode 4.6 (4H127)
  • iPhone 4 GSM
  • iOS 6.1
  • There is no jailbreaks or other modifications

iPhone4 performance

December 17, 2012 - 12:42am #21

Hi narciso,

Have you tried with the 2.0 SDK as their should be a number of performance improvements.

Sorry the 1.0 SDK is no longer available nor supported.

thanks,

N

bad performance iPhone4

December 16, 2012 - 1:40pm #20

Hello,

I'm also having performance problems on iPhone 4 with the unity plugin, the framerate is very low.

The problem its not on unity, because i have other unity app with good framerate, it seem to be with the background video. I walready do all the sugestions you have on the bottom, but with no sucess.

Can you give me a link for the vuforia 1.0.

 

Best Regards,

Narciso

Bad performance iPhone 4

November 21, 2012 - 9:57am #19

pallzoltan wrote:

I'm having the same problem, and only found 2-3 forum posts regarding this issue.

Can you post the threads you've found here?

pallzoltan wrote:

I would try with vuforia 1.0.0 but it's nowhere to be found. Does anyone have a link, or would upload it somewhere?

Me too. +1.

Cheers.

Bad performance iPhone 4

November 21, 2012 - 9:32am #18

I'm also experiencing bad performance on iPhone 3GS but good performance on iPad 2 on a AR game I'm working on - imagine a racing game where you must avoid obstacles. On 3GS the performance is around 14-15 fps.

I would also appreciate a link to the QCAR 1.0 since it's rather difficult to find. I wanted to try and see if the performance improves.

This is a rather nasty problem. The Vuforia SDK should have not only a setting on Image Quality but some setting to tweak the CPU processing requirements - while sacrificing tracking stability/effectiveness - to target the mid-to-lower device range.

Is this going ot be addressed in further versions of the SDK?

Cheers.

Bad performance iPhone 4

November 16, 2012 - 2:31am #17

Hi there,

I'm having the same problem, and only found 2-3 forum posts regarding this issue. I would try with vuforia 1.0.0 but it's nowhere to be found. Does anyone have a link, or would upload it somewhere?

Thanks,
Z. 

PS: DavidBeard: by saying "it extends to unity" do you mean that the bottleneck is somewhere in Unity3D? Or is it on Vuforia's side? 

Bad performance iPhone 4

October 11, 2012 - 7:51pm #16

This is a known issue w/ iPhone 4 and it extends to Unity apps generally. Specific optimizations for Vuforia that I can recommend are to set the ARCamera's QCARBehaviour to Multi Frame Enabled, MODE_OPTIMIZE_SPEED, and use the lowest Max Simultaneous Image Targets value possible. Also follow Unity's guidelines for graphics and iPhone specific optimizations.

http://docs.unity3d.com/Documentation/Manual/OptimizingGraphicsPerformance.html

http://docs.unity3d.com/Documentation/Manual/iphone-performance.html

 

Bad performance iPhone 4

October 10, 2012 - 1:11am #15

Hi diether1,

It seems that the new sdk doesn't fit well for iphone4. It will at best run at 15-20 fps if you don't use too much polygons (which is not enough for us). Iphone 4S and Iphone 5 work like a charm.

We had the same issue and we gave up trying to have good perfs on iphone 4.

I think if you really need an iphone 4 version, make it with the QCAR 1.0 sdk (which has good perfs for iphone 4 but not as good tracking precision).

Hope it will help ;)

Greetings

Bad performance iPhone 4

October 9, 2012 - 12:36pm #14

Hi Guys !

I have a similar trouble. I'm working on a project for a 3d model of a car. In iPad3 the application  performance is very good, but the iPhone 4 is very bad. I also tested it on android and there quality is very good (Galaxy S2). The 3d model is complex, with about 200,000 polygons. I'm using the last version of the unity and vuforia.

could someone help me?

Bad performance iPhone 4

September 25, 2012 - 2:52am #13

No problem

If you send me a link to your project I'd be happy to look at it.

BTW is MULTI-FRAME enabled?

N

Bad performance iPhone 4

September 24, 2012 - 10:31am #12

Thank you NalinS for your reply :)

Strange indeed, but even 20fps is not enough for this project, I want to reach the 24fps at least.

I have made a reboot but without success. I just tried on the ipad3 and it's working well too. I don't have any iphone 4s or 5 to test.

I will have a look at the GLCameraRipple but I'm not an objectiveC coder so I don't think I will be able to find a solution for this now. We will probabely forget the iphone 4 version hoping this will work with 4s.

Thanks for your time ;)

Bad performance iPhone 4

September 24, 2012 - 9:42am #11

This seems a bit strange?

Video playback sample out-of-the-box when no target is recognised means that it is just showing the camera feed and you are saying this is choppy at 14fps?

I just tried this on an iPhone 4 (not through XCode) and it seems pretty quick (>20fps) though I have not put any specific measures in.

A few other things to try:

  • Another device if you can lay your hands on one
  • Try running the Apple GLCameraRipple sample - which should run at 60fps
  • Reboot the device and switch off other applications

N

Bad performance iPhone 4

September 24, 2012 - 9:22am #10

Hi NalinS, 

Thanks a lot for your fast reply !

I use Unity with the video playback sample (http://u3d.as/content/qualcomm-inc-/vuforia-video-playback/36v). My app is running well on ipad2 but I keep having less than 14 fps on the iphone4. (even when the video is not playing, even when the tracker isn't found yet)

So I've tried to use only the provided sample and dataset, and I get the same result. I did try also with only one target and the OPTIMIZE SPEED setting on the camera. No luck neither. 

I don't know what I can do next :(

Thx

 

Bad performance iPhone 4

September 24, 2012 - 9:09am #9

Hi anthodb

What kind of FPS are you getting on iPhone4?

Also, a few other questions:

  • Native or Unity?
  • how many simultaneous targets?
  • How big is your dataset?
  • Have you tried the OPTIMIZE SPEED setting on the camera?
  • How complex is the 3d scene you are augmenting?

thanks

N

Bad performance iPhone 4

September 24, 2012 - 8:21am #8

Hello all,

I do have the exact same issue with my app, it runs really well on ipad 2 but I've really bad performance on iphone4.. 

Do you have any idea on how to optimize vuforia 1.5.8 on iphone 4?

Do I have to use specific parameters on the ios build settings? 

Thx

Re: Bad performance iPhone 4

May 5, 2012 - 5:59pm #7

Please check your PM's.

Re: Bad performance iPhone 4

May 2, 2012 - 6:32am #6

Would it be possible for me to get a 1.5.9 version of your app to do some testing w/ on iPhone 4?

Re: Bad performance iPhone 4

May 2, 2012 - 1:49am #5

After some days working with it, I found that the best solution is continue working with Vuforia (QCAR) 1.0.0 for iPhone projects, while using Vuforia 1.5.9 for iPad versions.

This is not a solution but at least, all users with an iPhone 4 (which are many users) will have a "not bad" experience with my app.

Anyway I appreciate the great job done by all Qualcomm guys with Vuforia, I think that the tracking system is really good but we can't just ignore the iPhone 4 users so it'll be hard to implement next versions of Vuforia in new apps if it's not running at proper frame rate on these devices.

Thank you for your time!

Re: Bad performance iPhone 4

April 23, 2012 - 1:54am #4

No, I've been testing this without the profiler, and I' am pretty sure that it wouldn't be the cause...

Re: Bad performance iPhone 4

April 23, 2012 - 1:41am #3

I've been experiencing similar issues with iPhone 4. I have a project running quite well on an iPhone 4 with Unity 3.4 and Qualcomm 1.0, but I'm having "lag" whith Unity 3.5.1 and Vuforia 1.5.9.

I tested with the image target sample project (imagetarget unity package) and I got the same results: camera's framerate drops and marker detection becomes really unstable.

I don't have any profiling tool enabled on Xcode and I'm using the default configurations for Unity and Xcode when compiling the image target project.

Is there any tweak I can do to improve this? On iPhone 4S all projects are running OK with Unity 3.5.1 and Vuforia 1.5.9

Re: Bad performance iPhone 4

April 21, 2012 - 11:22am #2

How are you testing this? - and have you performed the same tests without the Profiler active?

It sounds as though there may be some other process impeding your app's performance.

Log in or register to post comments