Get Pure View Matrix in Vuforia

后端 未结 2 1401
离开以前
离开以前 2021-01-20 13:33

I am using Vuforia SDK to build my AR app. By using trackableResult->getPose(), I can get a model view matrix of the target frame marker. But I also need pure view matrix to

相关标签:
2条回答
  • 2021-01-20 14:16

    To follow on from peedee's comment above, here is a picture I found extremely helpful, linked to from this web page.

    Sorry I couldn't leave this as a comment, but they don't allow pictures in comments.

    Different spaces and transformation matrices

    Note that different texts may use slightly different names for each space, but the overall idea should be the same!

    0 讨论(0)
  • 2021-01-20 14:20

    My first learning OpenGL was actually with Vuforia two months ago, and I have now concluded for myself that Vuforia's naming of variables in their examples is confusing.

    I changed the name of what they call "modelViewMatrix_Vuforia" to "viewMatrix", because that's really what it is. It transforms points from world space to view space / eye space.

    In my understanding the "model matrix" is something that will be unique to each model and will place my models with respect to each other. You don't necessarily need one; if your models are already defined in world space then you can just forget about it.

    But if your models are imported (for example mine are made with Blender) then they are probably defined in model space, with the origin at their own center of mass. In that case you need a model matrix to place them away from the origin, otherwise all your models will be stacked onto each other.

    Maybe what I wrote is not clear enough... I only just figured this out this week myself. I wanted to do environment reflection with a cubemap, and there I needed an inverted view matrix, which brought me exactly to the question you asked.

    0 讨论(0)
提交回复
热议问题