Log in or register to post comments

Video rendering problem (glitches)

March 9, 2013 - 12:33pm #1

Hi,

First of all, thanks for the great AR library!

 

I have a problem with video rendering on some targets. Usually it's only an issue with lower quality targets (2 stars). When I move my camera very close to the marker everything works fine but when I move camera gently away video that is rendering on a target starts to disappear. You can see how it looks in this screenshot: https://dl.dropbox.com/u/3183488/camera_glitches.png

I did some debugging and tracking works fine. Method "getNumTrackableResults()" returns correct number even if video fully disappears. Also locations of the video frame seem to be fine. You can also tell that tracking is working because audio is playing even if video disappears. Since it's not a very good quality target, tracking is of course lost way earlier but still it's impossible that it's lost so soon (and after debugging it I'm sure it's not lost).

I developed my own app with the help of VideoPlayback sample and initially I thought I did something wrong. However, I replaced "Stones & Chips" with my own targets in the VideoPlayback sample app and it acts exactly the same.

 

I have a friend that is using exactly the same marker in Unity and as far as I know it works correctly.

I would really appreciate any ideas where to start or what can cause it from more experienced Vuforia developers. I can also make short movie if screens are not enough.

 

If this is somehow a duplicate then sorry but I searched Vuforia forums for hour to find similar topic. 

 

Video rendering problem (glitches)

March 11, 2013 - 3:39am #5

Cool :-) I just examined some older Unity projects of mine. I see that the ARCamera clipping plane settings there are "10" for near and "10000" for far. Could one of you guys with a bit more GL expertize give us an info (in simple words?) what consequences there are/would be altering the near/fare values in the native iOS App? I can nicely play around in Unity and visually see if something breaks by using extreme values, but it would be very valuable to know what exactly will happen...

Video rendering problem (glitches)

March 11, 2013 - 3:20am #4

Thanks DavidBeard! 

I managed to get it working by changing farPlane value in startCamera method in QCARutils.mm.

 

        if (QCAR::CameraDevice::getInstance().start()) {
            // Start the tracker
            QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance();
            QCAR::Tracker* tracker = trackerManager.getTracker(targetType == TYPE_FRAMEMARKERS ?
                                                               QCAR::Tracker::MARKER_TRACKER :
                                                               QCAR::Tracker::IMAGE_TRACKER);
            if(tracker != 0)
                tracker->start();
            
            // Cache the projection matrix:
            const QCAR::CameraCalibration& cameraCalibration = QCAR::CameraDevice::getInstance().getCameraCalibration();
            projectionMatrix = QCAR::Tool::getProjectionGL(cameraCalibration, 2.0f, 2500.0f);
        }

 

Video rendering problem (glitches)

March 11, 2013 - 1:29am #3

Hey Guys,

we have exactly the same problem with our iOS App. Did you found a solution for this in the mean time? If yes, would you mind to share your results?

TIA,

Sandor

Video rendering problem (glitches)

March 9, 2013 - 7:36pm #2

That 'effect' is typically due to clipping by the far clip plane - you may need to extend it. See this thread - https://developer.vuforia.com/forum/rendering-opengl-es/camera-clipping-z-planes-and-projection-matrix

Log in or register to post comments