Log in or register to post comments

vuforia libgdx integration

January 14, 2015 - 1:44pm #1

Hi

i am attempting to use Vuforia for AR market detection and 3rd party rendering engine libgdx for rendering.

however i am not able to use the modelview matrix provided by vuforia correctly,

There is a 90 co-ordinate axes rotation between the vuforia and libgdx system which i have encorporate

i have update the camera fov in the libgdx based on vuforia calibration API's

i amd extracting the camera pose from inverse,transposed modelview matrix and setting camera pose in libgdx

i amd extracting the object pose from modelview matrix and setting object pose in libgdx

below is the link to the code which i am using

http://pastebin.com/YTiDcYzk

 

i have referred to code of integration of vuforia with other 3rd party engine like gamekit and rawali and they also follow a similar procedure 

and also post in vuforia knowledge center and forums 

i am unable to debug exactly what is it that i am doing incorrectly.

 

 

 

vuforia libgdx integration

January 15, 2015 - 12:57am #2

Hi !

There is something wrong I thing in the understanding of the pose matrix : 

The matrix represent the modelView transformations. The model view is the cumulation of the 3D model matrix (position, rotation, scale) and the camera matrix (position, rotation).

So, when you decompose it, you have 2 matrix to get, but knowing no one you cannot split the MV matrix. Consider the 3D object is at the center of the coordinate frame (on the marker) (on 0,0,0) so the matrix is identity, so the MV matrix is in reallity the View matrix.

Just decompose it, get the translation and rotation of the camera so the camera will move in your gdx scene around the center of the world where your object is placed.

 

It's hard to explain, maybe it is not understanble, let me know...

Log in or register to post comments