OpenGL的动画 [英] OpenGL animation

查看:138
本文介绍了OpenGL的动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有一个人体三维模型,我想动画走路,什么是实现这一目标的最佳途径?下面是可能的方法我看到这个正在实施的:

If I have a human body 3d model, that I want to animate walking, what is the best way to achieve this? Here are the possible ways I see this being implemented:


  • 创建几款机型在不同位置的腿,然后将这些模型之间的插值。

  • 加载模型转换成OpenGL,并以某种方式弄清楚哪些顶点对应腿和执行适当的转换。

  • 实施的骨架或电枢(类似于这样:<一href=\"http://wiki.blender.org/index.php/Doc%3aTutorials/Animation/BSoD/Character_Animation/Upper_body_armature\"相对=nofollow>搅拌机动画维基)。

  • Create several models with the legs in different positions and then interpolate between these models.
  • Load the model into openGL, and somehow figure which vertices correspond to the legs and perform the appropriate transformations.
  • Implement a skeleton or armature (similar to this: blender animation wiki).

推荐答案

这是你的第一个选项描述的技术被称为变形目标动画和经常使用的像的面部动画动画一些detailes或者开手结束。

Technique that you described in the first option is called morph target animation and often used for some detailes of animation like facial animation or maybe opening and closing of hands.

第二个选项是其中的工作原理有点像,你给你的角色的身体有些速度前进,计算一下腿需要做它避免落入机器人程序或物理动画。但是,你不会直接做它的顶点,但骨架。参见下一个。

Second option is procedural or physical animation which works something like robotics where you give the body of your character some velocity to move forward and calculate what legs need to do for it to avoid falling. But you wouldn't do it directly on vertices, but on skeleton. See next one.

第三选项是骨骼动画哪个动画骨架和顶点由一套规则跟随它。附加顶点骨架称为蒙皮。

Third option is skeletal animation which animates skeleton and the vertices follow it by the set of rules. Attaching vertices to skeleton is called skinning.

我建议,得到的东西的OpenGL航(在太空中,相机等查看和定位模式)后,你开始与骨骼动画。

I suggest that, after getting hang of opengl stuff (viewing and positioning models in space, camera, etc), you start with skeletal animation.

您将需要一个操纵和动画模式供你选择的3D应用程序。然后,你可以写一个出口到您的自定义格式或选择您想从您的应用程序读取的格式。这种文件格式应包含模型,骨架,蒙皮和关键帧的描述。比你阅读和使用这些数据从code建网格,骨骼和动画在关键帧。

You will need a rigged and animated model for your 3d app of choice. Then you can write an exporter to your custom format or choose a format that you want to read from your app. That file format should contain description of the model, skeleton, skinning and key frames. Than you read and use that data from your code to build the mesh, skeleton and animate over key frames.

这篇关于OpenGL的动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆