- Sort Posts
- 6 replies
- Last post
How to make Vuforia working with AVCaptureVideoPreviewLayer and SceneKit?
How to make Vuforia working with AVCaptureVideoPreviewLayer and
Hello, I had been able to render the scene kit over the OpenGL context used by vuforia. And I'm having problem with the camera. Did you can solve your problem?
I'm calculating the camera position and orientation, then I set the position of my scene camera and set the lookAt constrait. But the camera is not working fine.
How to make Vuforia working with AVCaptureVideoPreviewLayer and
I am going off of the imagetargets example....
self.context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
if (_context != [EAGLContext currentContext])
[EAGLContext setCurrentContext:_context];
self.renderer = [SCNRenderer rendererWithContext:(__bridge void *)_context options:nil];
self.sceneModel = [SCNScene sceneNamed:@"art.scnassets/plane.dae"];
self.sceneCameraNode = [SCNNode node];
[_sceneModel.rootNode addChildNode:_sceneCameraNode];
_sceneCameraNode.camera = [SCNCamera camera];
[self.renderer setScene:_sceneModel];
How to make Vuforia working with AVCaptureVideoPreviewLayer and
How to make Vuforia working with AVCaptureVideoPreviewLayer and
I was able to get image targets working, and render a Scene on top of the video output by setting the renderer up like this:
self.renderer = [SCNRenderer rendererWithContext:(__bridge void *)_context options:nil];
I tried using the post describing how to calculate camera angle and position from modelview matrix, and got the scenekit camera to move roughly in relation to the target. I am missing something though, the scene is not aligned well on the target. Seems like there is good potential for scenekit vuforia integration though, would appreciate a sample project to that end.
I wrote the article about how to integrate SceneKit into Vuforia('s OpenGL context). Hope it helps.
http://qiita.com/akira108/items/a743138fca532ee193fe