Log in or register to post comments

ModelView matrix

January 28, 2014 - 8:14am #1

Hi,

 

I use my own rendering engine with Vuforia, and I'm trying to use the pose matrix but I get some issues : 

 

According to the page : https://developer.vuforia.com/resources/dev-guide/pose-matrix-explained 

I understand that the 

 Tool.convertPose2GLMatrix(result.getPose())

returns me a ModelView matrix.

Is this good ?

 

If yes, I remove from this matrix my own View matrix : 

Matrix4 matrix = new Matrix4(matbuf);

		// remove the view matrix, to get only the model matrix
		matrix.set(camera.view.cpy().inv().mul(matrix));

Then, I get the model matrix I can apply to the model to move/rotate it without having to move my camera.

The translation I get is always out of the camera's view, I don't understand where is the issue...

 

Please, any advice would be very appreciated !

Thanks.

ModelView matrix

January 29, 2014 - 4:43am #6

Nice!

ModelView matrix

January 29, 2014 - 4:36am #5

So !

It's working !

 

I make things differently : 

I get the camera position and direction using the JNI methods translated into Java (don't want to add a JNI component in my final project) and set my engine camera to match Vuforia's camera. 

I'll make a little article maybe, to help other user doing it.$

Thanks!

ModelView matrix

January 29, 2014 - 1:18am #4

Got something : 

 

The reference frame is not the same...

I my engine, Y is UP, not Z. need to make a 90° rotation somewhere...

ModelView matrix

January 28, 2014 - 11:57pm #3

Hi,

 

My engine is at an upper level that OpenGl, it implements its own matrices, camera et so on. I cannot use it, I need to separate the model and the view matrix, to use one of them forcing the other.

In the documentation, the pose is the modelViex matrix. should be good, but it's not and I don't understand why is the error, what is different from a "real" MV matrix. I already tested my code with an other MV matrix, working very well... that's why I'm asking here wat's wrong.

 

Thanks.

ModelView matrix

January 28, 2014 - 9:25am #2

Hi,

what about using the Modelview matrix "as is" in your engine ?

Not sure how your custom engine handles this, but perhaps worth checking these artiles:

https://developer.vuforia.com/resources/dev-guide/pose-matrix-explained

https://developer.vuforia.com/resources/dev-guide/positioning-3d-content

https://developer.vuforia.com/resources/dev-guide/getting-camera-position

 

Log in or register to post comments