3D 矩阵 - 如何“摆动”一个物体?
我正在尝试使 3D 对象产生摆动效果,非常像 StarFox 64 中的 Boss 在传送时所做的那样(请参阅 此视频(5:17)供参考)。这看起来要么是一种倾斜效果,要么是一种不均匀的比例,它会旋转并在不旋转对象本身的情况下应用。
有谁知道如何做到这一点,或者也许有人有任何程序链接,我可以在其中直接使用矩阵来查看这是如何完成的?
I'm trying to make a 3D object do a wobble effect, very much like a boss in StarFox 64 did when it teleported (see this video at 5:17 for reference). This seems like either a skewing effect, or perhaps an un-uniform scale that rotated around and was applied without rotating the object itself.
Does anyone have any idea how this might be done, or perhaps does anyone have any links to programs where I can play with the matrices directly to see how this is done?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在欧拉角坐标系中使用基于滚动轴的倾斜
参见欧拉角
http://en.wikipedia.org/wiki/Euler_angles
欧拉角矩阵变换 ("一般轮换”文章的一部分):
http://en.wikipedia.org/wiki/Rotation_matrix
欧拉角度矩阵转换实用程序在 DirectX SDK 中
http: //msdn.microsoft.com/en-us/library/microsoft.windowsmobile.directx.matrix.rotationyawpitchroll%28v=VS.85%29.aspx
以及有关倾斜矩阵的线程
倾斜矩阵算法
http://www.quantunet.com/flash8/knowledgebase/actionscript/advanced/matrix/matrix_skew.html
You can use skew based on roll axis in the Euler angles coordinate system
See Euler angles
http://en.wikipedia.org/wiki/Euler_angles
Euler angles-matrix transformation ("General rotations" part of the article):
http://en.wikipedia.org/wiki/Rotation_matrix
An euler angles-matrix conversion utility in DirectX SDK
http://msdn.microsoft.com/en-us/library/microsoft.windowsmobile.directx.matrix.rotationyawpitchroll%28v=VS.85%29.aspx
And threads about skew matrices
skew matrix algorithm
http://www.quantunet.com/flash8/knowledgebase/actionscript/advanced/matrix/matrix_skew.html