Unity3D 和矢量数学 - Slepr、Lerp、四元数
我已经研究 unity3d 几个月了,并且对这个数学概念做了一些研究,我们可以在移动/旋转对象时使用这些概念。
我已经阅读了一些数学解释,但我看不出它如何应用/满足我对 unity3d 的需求。
谁能向我指出有关这两个概念的好材料,或者在我需要使用四元数和 slerp 时尝试向我解释?为什么我必须使用它?什么时候?
我将不胜感激我能得到的任何帮助。
i have been studying unity3d for a few months and i have done some research of this mathematical concepts that we can use when moving / rotating a object.
I have read some mathematical explanations, but i cant see how it would apply/fit my needs on unity3d.
Can anyone point me out a good material about these two concepts or try to explain me when im gonna need to use quaternions and slerp? Why do i have to use it? When?
I will appreciate any help that i can get.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要它们,因为使用欧拉空间(3 维)的旋转不会导致平滑旋转,并且由于必须分多个步骤(围绕每个轴)完成任意旋转,因此实际上有可能在旋转和中断过程中折叠其中一个维度一个动画。
四元数和 slerp(球面线性插值)使用 4 个维度(包括虚数空间)以一步平滑地执行旋转。几乎所有游戏和计算机动画都使用这种数学方法来执行旋转,因此计算机动画课程中教授了一些关于其使用的最佳教程。
因此,通过谷歌搜索“Quarternion Computer Animation”,您可以获得一些更好的文章和幻灯片。我会从那里开始。
这是一个相当不错的方法,似乎没有跳过任何步骤。关于使用矩阵表示法执行转换的简要概述很重要,这已涵盖:http://www.keremcaliskan.com/a-tutorial-on-computer-animation-ii-2/
You need them because rotation using Euler space (3 dimensions) does not result in smooth rotation, and since arbitrary rotations must be done in multiple steps (about each axis), it is actually possible to collapse one of the dimensions during a rotation and break an animation.
Quarternions and slerp (spherical linear interpolation) uses 4 dimensions (includes imaginary number space) to perform rotations smoothly and in one single step. Almost all games and computer animations use this math to perform rotations, and some of the best tutorials for its use are thus taught in computer animation courses.
So by googling "Quarternion Computer Animation", you get some of the better articles and slide-shows. I'd start there.
Here's a fairly good one that doesn't seem to skip any steps. A brief overview on using matrix notation to perform transformations is important, and this has that covered: http://www.keremcaliskan.com/a-tutorial-on-computer-animation-ii-2/