将 3D 模型与 2D 视频合成需要更复杂的视图矩阵计算
我正在利用一些 2d / 3d 跟踪数据(由 pfHoe 提供)来帮助将一些 3d 模型集成到播放一些二维视频。
一切正常......好吧......但是模型在视频背景下仍然存在一些明显的“滑动”,我怀疑这可能是因为 XNA CreatePerspective 辅助方法没有考虑一些附加数据由 pfHoe 提供,例如独立的水平/垂直视野角度和焦距。
有人能向我指出一些构建包含此类细节的视图矩阵的示例吗?
I'm utilising some 2d / 3d tracking data (provided by pfHoe) to help integrate some 3d models into the playback of some 2d video.
Things are working.... okay... but there's still some visible 'slipping' of the models against the video background and I suspect this is may be because the XNA CreatePerspective helper method isn't taking into account some of the additional data supplied by pfHoe such as independent horizontal / vertical field of view angles and focal length.
Would anyone be able to point me towards some examples of constructing view matrices that include such details?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这篇 MSDN 文章向您展示了如何编写一种方法来创建独立考虑水平和垂直 FOV 的透视矩阵(尽管是在 C++ 中)
http://msdn.microsoft.com/en- us/library/bb147302%28VS.85%29.aspx
上面链接的文章中进一步解释了数学原理,以帮助您编写此方法的 C# 版本。祝你好运 :-)
This MSDN article shows you how to write a method which creates a perspective matrix that takes into account horizontal and vertical FOV independently (albeit, in C++)
http://msdn.microsoft.com/en-us/library/bb147302%28VS.85%29.aspx
The math is further explained in the article linked above to aid you in writing a C# version of this method. Good luck :-)