Projection Matrix jpct+Vuforia

Started by nima.sh23, September 21, 2015, 10:18:19 AM

Previous topic - Next topic

nima.sh23

I using Jpct-AE and Vuforia for make AR application.
For render 2D and Video I don't have any problem but for render 3D file (using Jpct-AE) I have a problem with Projection Matrix.
I know Jpct doesn't set projection matrix:
http://www.jpct.net/forum2/index.php/topic,2368.msg17437.html#msg17437
But I need a solution for solve this.
In Open GL I can use of projection Matrix but in jpct I don't know how can I use...!!!
In this words point of this:
"The projection matrix is implicitly created by the engine based on the current fov settings and the far and near clipping plane."
How can I use of "Fov" for solve that.
In this link say good thing about this but I really don't understand about that:
http://paulbourke.net/miscellaneous/lens/
Thanks

EgonOlsen

What do you want to do? Setup the values for fov and the clipping planes so that it matches a given projection matrix?

nima.sh23

In simple terms,I want set Vuforia projection matrix to jpct.
on the another topic you told "The projection matrix is implicitly created by the engine based on the current fov settings and the far and near clipping plane. There's no way to set it directly from the outside.".


nima.sh23

#4
Maybe my question was wrong.
In OpenGL when I want draw a 3D model I use of projection matrix(get camera calibration and use of Tool.getProjectionGL(camCalib, nearPlan, farPlan) for set near plan and far plan) but in JPCT-AE,I can't do that.
I get camera calibration and use of getProjectionGL for get projection matrix and then get array indexes  like below link for use of focal length and size in the
float fovyRadians = (float) (2 * Math.atan(0.5f * size.getData()[1] / focalLength.getData()[1]));
float fovRadians = (float) (2 * Math.atan(0.5f * size.getData()[0] / focalLength.getData()[0]));
formula,but It's wrong.
when I set fov and fovy to camera and also my pattern is very large jpct can't draw 3D model I should set a near plan and far plan on camera.
How can I do that?
Sorry for bad English

      

EgonOlsen

So...you basically want to know which values to use for far and near plane then?

nima.sh23

yes, I want to know which values and where to set them.

nima.sh23

Finally I found it
world.setClippingPlanes(10.0f, 50000.0f);
Thanks a lot.

EgonOlsen

Oh boy...so THAT was what you were looking for? Sorry for not getting this earlier. The whole matrix thing pointed me in the wrong direction....

nima.sh23

Sorry for my bad English.
Thanks for your helps.