C++ Bullet vs Newton Game Dynamics vs ODE 物理引擎

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6408198/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 20:05:23  来源:igfitidea点击:

Bullet vs Newton Game Dynamics vs ODE physics engines

c++comparisonphysicssimulationphysics-engine

提问by Anon

I am trying to pick a physics engine for a simple software application. It would be to simulate a rather small number of objects so performance isn't a huge concern. I am mostly concerned with the accuracy of the motion involved. I would also like the engine to be cross-platform between windows/linux/mac and usable with c++ code. I was looking at Bullet, Newton Game Dynamics, and ODE because they are open source. However, if Havok/PhysX are significantly more accurate I would consider those too.

我正在尝试为一个简单的软件应用程序选择一个物理引擎。这将是模拟相当少的对象,因此性能不是一个大问题。我最关心的是所涉及的运动的准确性。我还希望该引擎能够在 windows/linux/mac 之间跨平台并且可用于 C++ 代码。我在看 Bullet、Newton Game Dynamics 和 ODE,因为它们是开源的。但是,如果 Havok/PhysX 明显更准确,我也会考虑这些。

All I seem to find are opinions on the engines, are there any thorough comparisons between the options? Or does anyone have experience trying the various engines out. Since what I'm trying to do is relatively simple there probably isn't a huge difference between them, but I'd like to hear what people have to say about the options? Thanks!

我似乎发现的只是对引擎的看法,选项之间是否有任何彻底的比较?或者有没有人有尝试各种引擎的经验。由于我要做的事情相对简单,因此它们之间可能没有太大区别,但我想听听人们对这些选项有何看法?谢谢!

采纳答案by Roman Hwang

There is a nice comparison of ODE and Bullet here:

ODE 和 Bullet 这里有一个很好的比较:

http://blog.wolfire.com/2010/03/Comparing-ODE-and-Bullet

http://blog.wolfire.com/2010/03/Comparing-ODE-and-Bullet

Hope it can be useful in making a choice.

希望它对做出选择有用。

回答by user598524

Although it is a bit dated, there is a comprehensive comparison of (in alphabetical order) Bullet, JigLib, Newton, ODE, PhysX, and others available here:

虽然有点过时,但这里有(按字母顺序)Bu​​llet、JigLib、Newton、ODE、PhysX 和其他可用的全面比较:

The comparison considers integrators, friction models, constraint solvers, collision detection, stacking, and computational performance.

比较考虑了积分器、摩擦模型、约束求解器、碰撞检测、堆叠和计算性能。

回答by PWagner

Sorry, but you will never find a real comparison with respect to accuracy. I am searching for three months now for my master thesis and have not found it. So I started to do the comparison on my own but it's still a long way to go. I'm testing with 3d engines and even 2d engines and for now Chipmunk is the one with the highest accuracy so far. So if you have no need for 3d I would reccomend it. However if you have an urgent need for 3d and your problem is as simple as you described it (don't want to expand it in the future?) Bullet and ODE will do it. I would prefer Bullet because it is much more up-to-date and is still actively maintained. At least there is Newton, with which I am fighting right now. Therefore I can't give you pros and cons except that it is a bit more work to get familiar with the (crucial) bad documentation. Hope that helps. Best regards.

抱歉,您永远找不到关于准确性的真正比较。我现在正在寻找我的硕士论文三个月,但没有找到。所以我开始自己做比较,但还有很长的路要走。我正在使用 3d 引擎甚至 2d 引擎进行测试,目前 Chipmunk 是迄今为止精度最高的引擎。因此,如果您不需要 3d,我会推荐它。但是,如果您迫切需要 3d 并且您的问题与您描述的一样简单(不想在将来扩展它?)Bullet 和 ODE 会帮您解决。我更喜欢 Bullet,因为它是最新的并且仍在积极维护。至少有牛顿,我现在正在与之抗争。因此,除了熟悉(关键)糟糕的文档需要做更多的工作之外,我无法给出优缺点。希望有帮助。此致。

回答by crisbia

One thing I found really valuable in ODE is the ability to change pretty much every single parameter 'on the fly'. As an example, the engine doesn't seem to complain if you modify the inertia or even the shape of a body. You could replace a sphere with a box and everything would just keep working, or change the size of the sphere. Other engines are not as flexible usually, because they do a lot of work internally for optimization purposes. As for accuracy, as far as I know, ODE still supports a very accurate (but slow) solver which is obviously not very popular in the games industry because you can't play around with more than 25-30 objects in real time. Hope this helps.

我发现在 ODE 中真正有价值的一件事是能够“即时”更改几乎每个参数。例如,如果您修改惯性甚至身体的形状,引擎似乎不会抱怨。你可以用一个盒子替换一个球体,一切都会继续工作,或者改变球体的大小。其他引擎通常不那么灵活,因为它们在内部做了很多优化工作。至于准确性,据我所知,ODE 仍然支持非常准确(但速度较慢)的求解器,这在游戏行业中显然不是很流行,因为您无法实时处理超过 25-30 个对象。希望这可以帮助。

回答by chrisdembia

Check out Simbody, which is used in engineering. It's particularly good for simulating articulated bodies. It has been used for more than 5 years to simulate human musculoskeletal dynamics. It's also one of the physics engines used in Gazebo, a robot simulation environment.

查看用于工程的 Simbody。它特别适合模拟关节体。它已被用于模拟人体肌肉骨骼动力学超过 5 年。它也是机器人模拟环境 Gazebo 中使用的物理引擎之一。

https://github.com/simbody/simbody

https://github.com/simbody/simbody

http://nmbl.stanford.edu/publications/pdf/Sherm2011.pdf

http://nmbl.stanford.edu/publications/pdf/Sherm2011.pdf

回答by Cees Timmerman

A physics abstraction layer supports a large number of physics engines via a unified API, making it easy to compare engines for your situation. PALprovides a unique interface for these physics engines:

物理抽象层通过统一的 API 支持大量物理引擎,可以轻松地根据您的情况比较引擎。 PAL为这些物理引擎提供了独特的接口:

  1. Box2D (experimental)
  2. Bullet
  3. Dynamechs(deprecated)
  4. Havok (experimental)
  5. IBDS (experimental)
  6. JigLib
  7. Meqon(deprecated)
  8. Newton
  9. ODE
  10. OpenTissue (experimental)
  11. PhysX (a.k.a Novodex, Ageia PhysX, nVidia PhysX)
  12. Simple Physics Engine (experimental)
  13. Tokamak
  14. TrueAxis
  1. Box2D(实验性)
  2. 子弹
  3. Dynamechs(已弃用)
  4. Havok(实验性)
  5. IBDS(实验性)
  6. 夹具库
  7. Meqon(已弃用)
  8. 牛顿
  9. OpenTissue(实验性)
  10. PhysX(又名 Novodex、Ageia PhysX、nVidia PhysX)
  11. 简单物理引擎(实验性)
  12. 托卡马克
  13. 真轴

According to the December 2007 paperlinked in this answer:

根据此答案中链接的2007 年 12 月论文

Of the open source engines the Bullet engine provided the best results overall, outperforming even some of the commercial engines. Tokamak was the most computationally efficient, making it a good choice for game development, however TrueAxis and Newton performed well at low update rates. For simulation systems the most important property of the simulation should be determined in order to select the best engine.

在开源引擎中,子弹引擎总体上提供了最好的结果,甚至超过了一些商业引擎。Tokamak 是计算效率最高的,使其成为游戏开发的不错选择,但 TrueAxis 和 Newton 在低更新率下表现良好。对于仿真系统,应确定仿真的最重要属性,以便选择最佳发动机。

Here is a September 2007 demo by the same author:

这是同一作者 2007 年 9 月的演示:

https://www.youtube.com/watch?v=IhOKGBd-7iw

https://www.youtube.com/watch?v=IhOKGBd-7iw