ofxOpenVR_Aligning model matrix using AssimpModelLoader

I am trying to get 3d models to render correctly using the AssimpModelLoader in ofxOpenVR. No matter what I try, the model stays stuck to the eyepiece instead of being stationary in the scene. I have tried augmenting the Assimp class to create a matrix friendly to VR’s headmounted display and tried adjusting the matrix of the model in the render function of ofxOpenVR.

Video link to what’s happening:

Model is attached to eyepiece and moves with head. Background spheres are stationary as they should be when the head turns. The model is also drawing twice and they are not aligned together. The spheres in the background are drawn with the Bullet physics addon and everything works as expected.

The end goal is to be able to use an animated model like a DAE.

which fork of open VR are you using? I had some similar problems and think I fixed them in my fork.

it has been a while since I used it, so I cannot guarantee it will solve your problems.

I actually bypassed the addon because I couldn’t get it to work correctly but I am still using the addon code: ofxOpenVR.h, ofxOpenVR_tools.h, and ofOpenVRDef.h to interface with OpenVR.

I will take a look at your fork and see if I can find the differences, where’s Waldo style. Thank you.

I found your changes in the render method but that didn’t fix it.

I think the problem has something to with the matrix math applied to the model in the AssimpModelLoader.

yes, it has been a while but now I remember modifying the draw method of ofxAssimpModelLoader and removing this:


and at the end:


This is definitely a nasty hack, and I think there is something wrong with the way this addon works now.