如何渲染3DS关键帧动画
我的英语并不完美,但我会尽力描述我的问题。
我尝试从 *.3ds 文件渲染一个简单的动画(一个落在地上的块)。
我从 3ds 文件中读取了所有信息,但动画看起来并不像所建议的那样。 因为方块不从地面反射,只在空中反射。就像“轨道”一样,块在 y 轴上移动。
也许我以错误的方式使用了 3ds 文件中的信息?
在我的 Object3D 类中,我从 *.3ds 文件中读取原点,但不知道如何正确使用它...并且我不知道旋转矩阵是否表现良好,因为我将对象移动到点 (0, 0,0) 执行旋转并将其移回到原来的位置。
my english isn't perfect but I will try to describe my problem.
I try to render a simple animation (a block falling on the ground) from *.3ds file.
I read all information from 3ds file but the animation isn't look like propouse to have.
because the block is not reflected from the ground only in the air. As if the "track" the block is moved in the y-axis.
Maybe I used in the wrong way infromation from the 3ds file?
In my class Object3D I have Origin point read form *.3ds file but don't know how to correct used it... and I do not know whether the rotation matrix performs well, because I move an object to the point (0,0,0) performs a rotation and moves it back into his place.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
虽然这个答案可能太简单了,但听起来你的渲染空间有 Y 向上,而 3DS 空间有 Z 向上(因为整个“只有空气”),所以你需要旋转数据来补偿这一点。
在矩阵上:通过临时改变枢轴点进行旋转是可行的。
Though it might be too easy an answer, it sounds like your rendering space has Y up and the 3DS space has Z up (because of the whole "only air" thing), so you need to rotate your data to compensate for that.
On the matrix: doing rotation by temporarily changing the pivot point works.