I'm working on an AR project that uses only a single trackable frame marker. When I run the scene with the QCARBehaviour script turned off, I run at around 39 fps. When I enable the QCARBehaviour script on my main camera, my framerate drops to 20 fps when nothing is being tracked, and 18 fps when the tracker enables the scene content, which is far below an acceptable performance level for this project. The tracker reveals a fairly expensive skinned mesh character that is taking a lot of the cpu time, but I have optimized the character as far as I can without sacrificing quality. I would like to do some optimizing to Vuforia in order to reduce the frame time and regain some performance.
- First off, there are a lot of (cool) features that I am not using on this project. Since I am not using any virtual buttons or image targets, would it be beneficial to modify the QCAR Behaviour to stop looking for them? In the UpdateTrackers method I have commented out all UpdateTrackablePoses calls on both image trackers and virtual buttons, but saw no change in performance.
- I am only using one frame marker, and it is set to the world origin. I have set the QCAR Behaviour to World Center Mode "User" and set my frame marker as the world center. Despite this, I suspect that the QCAR Behaviour is doing some manipulations of the frame marker's position, and in turn modifying the position of all the marker's children (which contains a lot of transforms). Is there a way to ensure that the only position being modified is that of the camera?
- Could I decouple the background drawing from the camera's position update? I'd like to try alternating frames where one updates the video image and the next updates the camera position.
One thing you could try is changing this line in AppController.mm
#define USE_DISPLAY_LINK_IF_AVAILABLE 0
try setting it to 1 to see if it makes things any better/smoother
N