3D view not well formed
Hello,
I'm integrating the vive in another platform. To do so, i get the position and orientation of each eye of the vive and translate this results into two cameras of my application. I use an image from the application, I render it to a texture, and that texture is submited to the vive, and it works but......
So for what i expected, with the cameras on the right position I would be able to create the 3D experience, but when you tilt your head or the elements of the image are far, the 3D image breaks into the left view and the right view. In other situations I can see the 3d image.
Any idea why this is happening?
`
hmdPose = UpdateHMDMatrixPose(); //waitgetposes and get the HMDPose matrix
matposleft = GetHMDMatrixPoseEye(vr::Eye_Left); //get the eye to head transform
matposright = GetHMDMatrixPoseEye(vr::Eye_Right);
matcameraLE = matposleft*HMDPose; //my camera matrix
matcameraRE = matposright*HMDPose;
PoseRE = GetPosition(matcameraRE);
RotationRE = GetRotation(matcameraRE);
PoseLE = GetPosition(matcameraLE);
RotationLE = GetRotation(matcameraLE);
`
Generally, check the order of your matrix multiplications. You are probably doing "EyeTransform * HeadPose * Projection" instead of HeadPose * EyeTransform * Projection"... that would result in the object breaking apart when doing a "roll" (tilting your head sideways).
Thanks for your answer! very helpful!
Any ideas of closing this, now that matrix multiplication has been explained to you?