Page 1 of 2

which physics engine to choose?

Posted: Fri Apr 08, 2005 11:26 am
by markus
Hi all,
i want to include a physics engine in my irrlicht project.
I've found the following 3:

ODE
Newton
Tokamak

which one is the best suited for a beginner?
Which one is easiest to be combined with irrlicht?
What are the pros and cons of them?
It would be interessting to know which of them is used most with irrlicht.

Greetings
Markus

Posted: Fri Apr 08, 2005 11:41 am
by Guest
Here is a fourth one you can look at

True Axis

http://www.trueaxis.com/product.html

Posted: Fri Apr 08, 2005 1:02 pm
by Ronin
My favorite Physics SDK is Novodex, it is stable, fast and maybe with next release there will be fluid simulation included...

And Epic chose it for Unreal 3, so they surely have their reasons for it. :)

Posted: Fri Apr 08, 2005 1:17 pm
by Spintz
TrueAxis will be a great engine, right now, it's very new and missing a lot of features and has a few bugs to work out still. However, it's interface and ease of use is great.

Posted: Fri Apr 08, 2005 5:56 pm
by steveybop
I was in the same position before, i was going to use ODE but due to various posts on this forum stating that Newton was more stable and easier to integrate with irrlicht, i picked that. I dont know about the others but i found newton relatively easy to implment with irrlicht (usual teeting problems aside). to the best of my knowledge there is an integration tutorial for 3 different physics engines in the tutorials section, you should check them out.
But speaking from experience as a fellow beginner, i think Newton kicks ass (its just so cool to watch poop flying all over the place in the simulation. Collisions are fun kids) :lol:

The mercior tutorial for newton is really good, and has become my bible since starting my integration

http://www.mercior.com/tut-newton.shtml

Posted: Fri Apr 08, 2005 7:58 pm
by cartoonit
I might be wrong and it might just have been a post on the Newton forum, but Newton is supposedly the only true physics engine compared to the others. Don't quote me on this though. Tokamak doesn't seem to be under development at the moment, I personally don't think its as powerful as Newton. As for ODE there aren't as many primitive types compared the Newton, but it looks pretty good. These are my opinions, of what I've found out...

Posted: Fri Apr 08, 2005 11:25 pm
by Spintz
Newton recently added new solver's, 3 in total now I believe, so you can choose between less accurate and faster to more accurate and slower. That may have improved newton quite a bit, for fast paced gaming at least. TrueAxis, I like, because it's made as a game specific physics engine. It'd be really nice to implement all of them, with identical scenarios ( demoing only capabilities common of all engines ) and get some speed and accuracy tests. Maybe someday I'd have the time, as I've gotten Newton, Novodex and TrueAxis all working with Irrlicht, I doubt I'd have any time for something like that soon, but if someone else wanted to test it out.... :twisted:

Posted: Sat Apr 09, 2005 9:01 am
by markus
dear friends,
thank you for the many posts.
It is great to have such an active communtiy! :D

One thing that also might be interesting:
AGEIA the company behind Novodex, will bring out the (first) physics processing unit (PPU). So having this in mind it might be no bad idea to try out novodex and have it lateron hardware accelerated.

What would be best:
The idea of Spintz to build up a comparable showcase application with all available physics engines. Then one could easily tell the dis-/ advantages of them all.

I think i will start with the allready available tutorials. :wink:

Have a great weekend
Markus

Posted: Sat Apr 09, 2005 9:36 am
by bal
As mentioned by cartoonit: Newton may not be the fastest but as Julio Jerez (the creator) says: it uses no tweaks, just the real life physic laws. He made a beautiful post about this, a while ago.

Posted: Sun Apr 10, 2005 3:02 pm
by Ronin
Using true physics in a physics SDK with no "cheating" at all, as Newton does, is very nice. Unfortunately it is also slower and therefor not quite the best choice for games. It is true, that Newton's accuracy is better than Novodex, but the question is, if this accuracy is really needed. For me it has to look good and believable, but not perfect. The difference is mostly not even noticable.

I tested both Newton and Novodex under the same circumstances, I just dropped boxes every few seconds from a certain height and stopped if the fps went under 60. I tried all 3 Newton solvers plus Novodex and I tested each 5 times to get an average value. The 3 Newton solvers didn't differ much, it was all around 55 rigid bodies, while Novodex had no problems to simulate 280 of them, so in this case I'd put speed over accuracy, because the simulation still looked "real" to me.

So it is a matter of what you want your physics sdk for and how many bodies you want to simulate and how accurate this simulation should be...

Posted: Sun Apr 10, 2005 6:10 pm
by katoun
Yes it is true that in games speed is very much needed , BUT:
as I know Novodex is not free for comercial use (and is king of expensive),
as long as Newton is apsolutely FREE and ODE too.
Please note that
Ah and I think True Axis is as Novodex too
I sugest going on their home page and read clearely the licence!

Posted: Mon Apr 11, 2005 3:44 pm
by steveybop
As mentioned by cartoonit: Newton may not be the fastest but as Julio Jerez (the creator) says: it uses no tweaks, just the real life physic laws. He made a beautiful post about this, a while ago.
Any chance at all that you could give me the link to this thread bal?? or at least the subject line so i can search it, working on a project using newton and any info like this would be great for my report.

newton

Posted: Mon Apr 11, 2005 3:53 pm
by ijo coim
newton....kyakkkkkk.....i'd download it.
and there are a lot of errors i got.

i'd try make a thread about the errors, you can find it in bugs and fixes.

maybe i wrong put the patch. but, now, i still learn about irrlicht, there are so many new things that i have to learn.

here is the link

http://newtondynamics.com/downloads.html

to all newbie ::.KEEP PROGRAMMING.::

regards,

ijo coim.

Posted: Mon Apr 11, 2005 8:33 pm
by sarin didnt log in
ijo, (btw i replied to ur message) i noticed ur post below, so im assuming ur using dev cpp.

anyways, i get a bunch of errors with newton and dev cpp too. the problem for me is open gl, it comes up with a couple linker errors. also, if i compile the dvector file also, it doesnt work.

for just newton (no enhancements) u only need to compile newton.h and link the lib. unfortunatly, that meanst that you cant use the "newtoncar, newtonjeep, or newtontank" files.
so youll have to use your own files

still got some errors

Posted: Tue Apr 12, 2005 2:36 am
by ijo coim
emmm....i followed your reply.
here is the .lib that i'd link:

Code: Select all

newton.lib in folder c:\NewtonSDK\sdk\dll
newton.lib in folder c:\NewtonSDK\sdk\dll_double
newton.lib in folder c:\NewtonSDK\sdk\lib_mt
newton.lib in folder c:\NewtonSDK\sdk\lib_mt_double
newton.lib in folder c:\NewtonSDK\sdk\lib_st
newton.lib in folder c:\NewtonSDK\sdk\lib_st_double
Glut32.lib in folder C:\NewtonSDK\samples\gl
the .dll files :

Code: Select all

Newton.dll in folder c:\NewtonSDK\sdk\dll
Newton.dll in folder c:\NewtonSDK\sdk\dll_double
Glut32.dll in folder c:\NewtonSDK\samples\bin
Newton.dll in folder c:\NewtonSDK\samples\bin
Glut32.dll in folder c:\NewtonSDK\samples\dll
and .h file:

Code: Select all

Newton.h in folder C:\NewtonSDK\sdk
and, don't forget the errors :

Code: Select all

--------------------Configuration: tutorial - Win32 Debug--------------------
Linking...
tutorial.obj : error LNK2001: unresolved external symbol "public: __thiscall CHiResTimer::CHiResTimer(void)" (??0CHiResTimer@@QAE@XZ)
tutorial.obj : error LNK2001: unresolved external symbol "public: __thiscall CHiResTimer::~CHiResTimer(void)" (??1CHiResTimer@@QAE@XZ)
tutorial.obj : error LNK2001: unresolved external symbol "public: __thiscall BoxPrimitive::BoxPrimitive(class dMatrix const &,class dVector const &,int)" (??0BoxPrimitive@@QAE@ABVdMatrix@@ABVdVector@@H@Z)
tutorial.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall RenderPrimitive::~RenderPrimitive(void)" (??1RenderPrimitive@@UAE@XZ)
tutorial.obj : error LNK2001: unresolved external symbol "void __cdecl InitOpenGl(int,char * *,char const *,void (__cdecl*)(void))" (?InitOpenGl@@YAXHPAPADPBDP6AXXZ@Z)
tutorial.obj : error LNK2001: unresolved external symbol __imp__NewtonBodySetOmega
tutorial.obj : error LNK2001: unresolved external symbol __imp__NewtonBodySetMatrix
tutorial.obj : error LNK2001: unresolved external symbol __imp__NewtonBodySetMassMatrix
tutorial.obj : error LNK2001: unresolved external symbol __imp__NewtonReleaseCollision
tutorial.obj : error LNK2001: unresolved external symbol __imp__NewtonCreateBody
tutorial.obj : error LNK2001: unresolved external symbol __imp__NewtonCreateBox
tutorial.obj : error LNK2001: unresolved external symbol __imp__NewtonCreate
tutorial.obj : error LNK2001: unresolved external symbol "public: void __thiscall RenderPrimitive::SetTexture(int)" (?SetTexture@RenderPrimitive@@QAEXH@Z)
tutorial.obj : error LNK2001: unresolved external symbol __imp__NewtonDestroy
tutorial.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall BoxPrimitive::Render(void)const " (?Render@BoxPrimitive@@UBEXXZ)
tutorial.obj : error LNK2001: unresolved external symbol __imp__NewtonBodyGetMatrix
tutorial.obj : error LNK2001: unresolved external symbol "void __cdecl SetCamera(class dVector const &,class dVector const &)" (?SetCamera@@YAXABVdVector@@0@Z)
tutorial.obj : error LNK2001: unresolved external symbol __imp__NewtonUpdate
tutorial.obj : error LNK2001: unresolved external symbol "public: float __thiscall CHiResTimer::GetElapsedSeconds(void)" (?GetElapsedSeconds@CHiResTimer@@QAEMXZ)
tutorial.obj : error LNK2001: unresolved external symbol "void __cdecl GetCursorPos(struct MOUSE_POINT &)" (?GetCursorPos@@YAXAAUMOUSE_POINT@@@Z)
tutorial.obj : error LNK2001: unresolved external symbol "int __cdecl dGetKeyState(int)" (?dGetKeyState@@YAHH@Z)
Debug/tutorial.exe : fatal error LNK1120: 21 unresolved externals
Error executing link.exe.

tutorial.exe - 22 error(s), 0 warning(s)
maybe i have to spend much time for this.

or maybe you have something for me. (include re-install my dev-c++ :P )?

regards,

ijo coim