平民程序 - linghuye's blog

天下风云出我辈,一入江湖岁月催。皇图霸业谈笑中,不胜人生一场醉。提剑跨骑挥鬼雨,白骨如山鸟惊飞。尘事如潮人如水,只笑江湖几人回。

随笔 - 221, 文章 - 0, 评论 - 680, 引用 - 0
数据加载中……

Havok物理引擎学习笔记

1.Every Havok simulation can have one or more Havok worlds - instances of the class hkpWorld. The hkpWorld acts as a container for the physical objects in your simulation, and is also used to step the simulation forward in time.

2.当前Havok5.5版本,因为需要对应的Debug版本的动态运行库的manifest,当前Havok5.5版本必须使用Vs2005 SP1编译,否则无法运行Debug版调试.

3.HavokVisualDebugger是个非常非常好的调试工具,我们只要在自己的代码中调用Havok API构建抽象的物理世界,抽象的物体,即给出物理世界的数据,就能直接通过hkVisualDebugger接口的socket连接发送世界数据到HavokVisualDebugger宿主程序,并在其可视化物理场景视图中显示出来.在我的实践过程中,它可视化出了WoW的物理场景,让我方便清晰地看到传给Havok的数据是否确实反映到了物理世界中,在调用API时物体是否按我的意愿运行,结果是否正常.而且HavokVisualDebugger可以可视化地看到Havok的物理概念体,使抽象的概念体现到视图.Phyx引擎如果没有这种调试工具,是比不上Havok的.

11.工具里的FitCameraToWorld,好用.

4.hkpWorldObject -> hkpEntity -> hkpRigidBody

5.If you create an hkpRigidBody as fixed or keyframed you cannot make it dynamic later during the simulation (using hkpRigidBody::setMotionType() ), but you can make a dynamic hkpRigidBody fixed or keyframed during simulation and switch back.

6.A keyframed object is treated by the simulation as if it had infinite mass - however, unlike a fixed object, you can move a keyframed object around, if you set a velocity for it, it will move at that velocity. To turn a movable object into a keyframed object, you call its setMotionType(hkpMotion::MotionType) method, setting the value to hkpMotion::MOTION_KEYFRAMED.

7.stepDeltaTime()不能传0.0,否则崩溃.

8.Phantom的概念: An hkpPhantom has no physical presence in the simulation and is used to maintain a list of entities (and other phantoms) that overlap with it. The most common application of an hkpPhantom is to detect entities entering and leaving certain volumes of the hkpWorld, perhaps causing a scripted cinematic sequence to be played or a nearby AI character to be alerted to your presence.

9.物理引擎碰撞检测都有Broadphase和Narrowphase概念(如Phyx,SOLID),而Havok也是如此.即碰撞检测分2个阶段,第1个阶段是快速的世界物体AABB式检测,使用扫描线算法快速排除在AABB上不相交的物体,得出可能相交的物体对,然后送入Narrowphase阶段.

10.While Havok is a continuous physics engine, the character controller is effectively discrete in its simulation approach. Although this is fast, and means that characters can be stepped independently of the physics engine, and at lower frequencies, this can also lead to some accuracy problems.

11.You can use filters to disable or enable collisions between objects. If collisions are disabled between two objects, no collision agents are created for the pair, and they can move into or through each other.

posted on 2008-08-02 11:27 linghuye 阅读(2797) 评论(7)  编辑 收藏 引用 所属分类: 3D图形学研究

评论

# re: Havok物理引擎学习笔记  回复  更多评论   

第一次听说这引擎-_-;偶只曾经稍微看了看ode,貌似不是很感兴趣。。。其实一直很期待大大能发表一篇关于unreal3的文章^_^关注ing~~~
2008-08-06 15:32 | 阿冈

# re: Havok物理引擎学习笔记  回复  更多评论   

HavokVisualDebugger这个东西在哪?能不能给传一个,我的邮箱 helloahuan@163.com qq 237287188
2008-09-01 10:00 | hellohuan

# re: Havok物理引擎学习笔记  回复  更多评论   

我看到HavokVisualDebugger了,但是不懂怎么用?能否给点提示,写写
2008-09-02 10:20 | hellohuan

# re: Havok物理引擎学习笔记[未登录]  回复  更多评论   

physx两年前就有这个remote debugger了。
2008-12-28 11:01 |

# re: Havok物理引擎学习笔记  回复  更多评论   

想问一下,到底应该如何学习Havok引擎呢
2010-06-06 19:16 | Cop

# re: Havok物理引擎学习笔记  回复  更多评论   

请问,如何在世界里对某一对象施加力?为什么我一加推力(applyforce)或扭力系统就会执行出错?还有当施加力的时候deltatime参数应该怎么设置?
2010-07-05 23:58 | hotrainfall
只有注册用户登录后才能发表评论。