Log in or register to post comments

Issues with model placement on marker pos in c++ UWP and rendering using Opengl via Angle

May 31, 2017 - 8:45am #1

Hi,

I am working on a sample app as poc. I am rendering using angle. I have integrated Vuforia UWP libs in my sample app and have tracking working.

But i have some issues, trying to make my model follow the marker. So idea is to render the model and then translate / snap the model on marker, whenver you see it.

I am getting the pos for the marker, converted it into GL matrix. I tried setting it as matrix, but my model got scewed. 

const Vuforia::TrackableResult *result = state->getTrackableResult(tIdx);

Vuforia::COORDINATE_SYSTEM_TYPE posCoordinateSystem = result->getCoordinateSystem();   // comes as camera

const Vuforia::Matrix44F poseGL = Vuforia::Tool::convertPose2GLMatrix(result->getPose());

So do i need to mul it with the inverse projection of camera i get like this ?

// Calculate the DX Projection matrix

const Vuforia::CameraCalibration& calibration = Vuforia::CameraDevice::getInstance().getCameraCalibration();

auto project = Vuforia::Tool::getProjectionGL(calibration, m_near, m_far);

I also tried just setting the position of my model using the translation values from the 4x4 matrix, but its very off.

I was setting bool holographicCS_Set = Vuforia::setHolographicAppCS(&mHoloGraphicSpaceView); but the Vuforia sdk crashes if i set it up so not using it right now.

Anybody have experience with similar issues or ideas on how to do it ? any help will be greatly APPRECIATED!

 

 

 

Log in or register to post comments