Irrlicht and PhysX Demo

A forum to store posts deemed exceptionally wise and useful
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

Well I have to say, it is expected that PhysX is better than Newton, especially since it is developed from some of the most professional programmers, and physicists, out there. Some millisecond rendering comparisons would be better to.

But yes, seeing as PhysX is a commercial solution, it well should be better than Newton. Now a real test would be to compare PhysX against Bullet which was developed by an ex-Havok employee, and has been optimized for SIMD on the PS3 by SCEA. (Which means it has to be good if SCEA took the time to do it with that, instead of PhysX. But I don't know.)
TheQuestion = 2B || !2B
cassini
Posts: 68
Joined: Thu May 12, 2005 2:40 pm

Post by cassini »

shadowslair wrote:I made some tests, trying to compare PhysX and Newton. I used as a level the chiropteraDM and a starting amount of 40 boxes. In the beginning both the engines were on about 75 frames (vsync=off). After this PhysX continued to maintain about 75 frames, adding more boxes gave only a small desrease, but never rised until the end. Newton started more firmly on 75 too. Than seemingly after the Sleeptimer activation rised to 130. Throwing another boxes on the others resulted in desrease to 65. If I add more and more boxes without placing too much in one place keeps the frame rate over 100, no matter the count.

How do you think? Which one is better? PhysX has more functions, but Newton is a good alternative to have...
Well, I haven't gotten the PhysX Character controller to work either. I got bored and made my own. Piece of cake Very Happy Much more control and overall better I say. You should try that too!
Maybe you should ask for a beta evaluation of Newton 2.0.
It is much faster than the current version, that test should run at least over 500 fps with the beta..
It also has out of the box very eassy to use player controller, and real vehicles made with real joints.
It do not have cloth or soft bodies but is is promised feature.

These are just few samples from Youtube of what plain people are doing with Newton in real time.
http://www.youtube.com/watch?v=L4mk-z-Yjww
http://fr.youtube.com/watch?v=vEDnTyZdt ... re=related

The joint system is so accurate and precise that it can play industrial robots. It can make even make robots to performs choreographed dance and keep up wit the music.
http://fr.youtube.com/watch?v=64XysmZEvHQ
http://fr.youtube.com/watch?v=jtbvPJJv7YU

stable enough for real time editing of very complicated mechanisms in real time:
http://www.youtube.com/watch?v=YxGdfwv2 ... re=related
http://www.youtube.com/watch?v=xz9jPmSnMiw
http://www.sketchucation.com/forums/scf ... =61&t=8559

Newton might not have the pedigree of commercial engines, however the quality of a physcs engine is determined by how well, how fast and how stable they are resolving physics problems and very little by who wrote it.
You can request an evaluation copy and ask for help over their forum, just do not bring up comparisons issue.
I am testing the beta and I really like it.
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

Code: Select all

Newton might not have the pedigree of commercial engines, however the quality of a physcs engine is determined by how well, how fast and how stable they are resolving physics problems and very little by who wrote it. 
Okay let me revise myself. PhysX is faster, more stable, and solves more complex solutions when compared to Newton. If Newton were in fact better, then I don't know why I don't see developers jumping at the oppurtunity to use it, as a free solution, but they instead pay thousands of dollars for Ageia PhysX.

It isn't even a competition when you compare Newton with PhysX. A fair comparison would be with Bullet, or ODE, or something like that.
TheQuestion = 2B || !2B
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

Where do you see people paying thousands for Ageia, a free engine?
cassini
Posts: 68
Joined: Thu May 12, 2005 2:40 pm

Post by cassini »

Well I was not recommending Newton to you Halifax, I was telling Shadowslair what he should look for in a physics engine, and I posted some examples made by simple users with general applications.
He seemed curios about how difficult it is to use Newton or Physx with Irrlitch, and I do not think it is any harder than what the videos show, at least not with Newton.
You for some reason seem to be interested in shielding users from even experimenting with the Newton engine to make up their own opinions.
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

Maybe you should ask for a beta evaluation of Newton 2.0.
It is much faster than the current version, that test should run at least over 500 fps with the beta..
It also has out of the box very eassy to use player controller, and real vehicles made with real joints.
It do not have cloth or soft bodies but is is promised feature.
Thanks a lot, cassini. I`ll ask for the new Newton version, never heard it is still being developed. I really like Newton the most, but needed to make some tests to convince myself. In my opinion PhysX is better with the big number of objects, but Newton seemed to be a better solution for my project, where I need to use it for level collision and here&there 5-10 rigids for realism and fun. I needed the cloth function for my charactress`s hair, but I`m sure I`ll find good solution when it comes to it.

Never wanted to tell somebody which one is better- I`m just a turbo-beginner noobie with pretty old machine, 3d artist, not a programmer. Just wanted to share my test results, so no offence taken agianst any of the engines.
I`m sure each of them has its own advantages and disadvantages and it`s all up to the Holy Programmer to figure out which one to choose, depending on what result he`s trying to accomplish...

It turns like the best martial arts dispute. Each one is best, if you put all your efforts learning it and putting into practice...

So please stop it, since it`s useless... :wink:
night_hawk
Posts: 153
Joined: Mon Mar 03, 2008 8:42 am
Location: Suceava - Romania
Contact:

Post by night_hawk »

Well, considering Newton has several already-done wrappers around here, it is the best choice for a begginer. But my past exp with Newton left me with a very sour taste... But I haven't tried any new releases, so it might have changed.
Though I REALY REALY REALY doubt Newton2 can get to 500 fps in a scene while PhysX gets 75 with the same scene. That's fantasy. Oh, or you meant on 2 different machines?

Anyway, PhysX is extremely good as it tries to keep everything constant. As constant as possible... within good measure.
I even don`t know how to call the identifier of my chracter to set forces. Any chance of posting some code?
And about that.

Code: Select all

NxActor* youractor;
///initialise, blablabla
youractor = pscene->createActor(...);

youractor->addForce(...);
youractor->addTorque(...);
youractor->addForceatLocalPosition(...);
etc.
Easy, eh? :D
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

Easy, eh? Very Happy
Indeed. But when i create my node called nnn after the moment you`ve gone wild on boxes like this:

Code: Select all


{
    scene::ISceneNode* cube = device->getSceneManager()->addCubeSceneNode(40);
	cube->getMaterial(0).setTexture(0,device->getVideoDriver()->getTexture("media/box.jpg"));
	cube->getMaterial(0).setFlag(video::EMF_LIGHTING,false);

	//How the actor "works"
	NxBodyDesc BodyDesc;
	BodyDesc.angularDamping	= 1.5f; //Will make the body go all gravity on us

	//How the actor looks like. Equivalent to the mesh.
	NxBoxShapeDesc BoxDesc;
	BoxDesc.dimensions		= NxVec3(20.0f,20.0f,20.0f);

	//General info about the actor.
	NxActorDesc CubeActorDesc;
	CubeActorDesc.shapes.pushBack(&BoxDesc); //We tell PhysX how he looks first.
	CubeActorDesc.body			= &BodyDesc; //Then how he should "work"
	CubeActorDesc.density		= 99.0f;     //We give him a density, so he will have a mass.
	CubeActorDesc.globalPose.t  = NxVec3(140,690+50,140);  //And we set him in space somewhere.

	NxActor* nnn;
	nnn=pscene->createActor(CubeActorDesc); //Now we create him!
	Nodes.push_back(new PhysXNode(nnn,cube,1)); // We add a PhysXNode to the list of nodes to get updated with physics
	// the "1" parameter means we also want it to get rotated by physx, not only moved. Bad for bullets, a must for most other objects.
	
           
}
And call it from the main loop like this:

Code: Select all

  if (keys[KEY_KEY_W]){ nnn->addForce  ( NxVec3(100,0,0),  NX_FORCE, true );}
to make my already created node "nnn" move somehow, it gives me " 'nnn' undeclared indentifier" message.

I know it`s a really C++ basic knowledge problem, but I can`t figure it out...
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

cassini wrote:Well I was not recommending Newton to you Halifax, I was telling Shadowslair what he should look for in a physics engine, and I posted some examples made by simple users with general applications.
He seemed curios about how difficult it is to use Newton or Physx with Irrlitch, and I do not think it is any harder than what the videos show, at least not with Newton.
You for some reason seem to be interested in shielding users from even experimenting with the Newton engine to make up their own opinions.
EDIT:

Ah, okay, my mistake then. And no I wasn't shielding users from experimenting with it, I agree it is the best beginner physics engine, but if you need something sophisticated, then PhysX is what you want.
Last edited by Halifax on Sat Apr 12, 2008 5:48 am, edited 1 time in total.
TheQuestion = 2B || !2B
cassini
Posts: 68
Joined: Thu May 12, 2005 2:40 pm

Post by cassini »

night_hawk wrote:Well, considering Newton has several already-done wrappers around here, it is the best choice for a begginer. But my past exp with Newton left me with a very sour taste... But I haven't tried any new releases, so it might have changed. Though I REALY REALY REALY doubt Newton2 can get to 500 fps in a scene while PhysX gets 75 with the same scene. That's fantasy. Oh, or you meant on 2 different machines?
Well it is not a fantasy, it is a reality, in a scene like Shadowslair described, Newton 2 will easily go well over 500 fps in a normal 2.1 ghz AMD.
I am sorry you had such sour experience with it, but your bad experience is not prove of what you, by your own words, haven’t even tried.
Why do you have such doubt? What makes you think that one engine will be so much better if they are using the same principles?
shadowslair wrote: Never wanted to tell somebody which one is better- I`m just a turbo-beginner noobie with pretty old machine, 3d artist, not a programmer. Just wanted to share my test results, so no offence taken agianst any of the engines.
I`m sure each of them has its own advantages and disadvantages and it`s all up to the Holy Programmer to figure out which one to choose, depending on what result he`s trying to accomplish...
It turns like the best martial arts dispute. Each one is best, if you put all your efforts learning it and putting into practice...
So please stop it, since it`s useless... :wink:
I do not think I said what engine was better or what engine was worse, but I thought that the respond given to you did not really answered your curiosity about your test, it was rather a gross misrepresentation of Newton without any real bases other than:
Halifax wrote:Well I have to say, it is expected that PhysX is better than Newton, especially since it is developed from some of the most professional programmers, and physicists, out there. Some millisecond rendering comparisons would be better to.
But yes, seeing as PhysX is a commercial solution, it well should be better than Newton. …
Which I believe is very weak response and completely dismissed what your test showed.
No one dispute the physX is a very good, but for some reason there are few people around the forum that are very motivated to misinform anyone asking if Newton is a possible solution as physics engine.

As for the player controller this is how it would be set up in Newton 2.0

Code: Select all

CustomPlayerController* player;
// after you create a physical body
Player = new CustomPlayerController(body, …);

// in the update loop
Player->SetVelocity (forwardSpeed, sideSpeed, headingAngle);
And here are two videos of how will behave
http://www.youtube.com/watch?v=XUkbYGxvHu0
http://www.youtube.com/watch?v=QGzKQYF9IwY


Halifax wrote:Ah, okay, my mistake then. And no I was shielding users from experimenting with it, I agree it is the best beginner physics engine, but if you need something sophisticated, then PhysX is what you want.
Please stop patronizing people.
You will be better saying why you like PhysX and recommending it because you like it, stop saying is better that this or that. You do the same thing when it comes to graphics libraries as well.

For you physX is the best, it might not be the same for or other people including professional in high tech industry.
BTW the laws physics do not have the knowledge of who is a beginner of who is a professional.
So I do not know from where you are getting these metrics to compare engines. That sounds as irrational as the idea that one is better because it was written by most professional and physicists, out there
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

I used Newton in my old DarkBasic project, the same I try to recreate in Irrlicht now.

And how about my pseudo-programming PhysX code problem? This so bad pointer that I can`t call ( it may be hiding someways- does he dislike me?! :D ) ? I know it may be far too early to start using physics, but I believe this is a good way to learn and understand. I need to create my character in the beginning and have acess to his pointer all the time. :oops:
night_hawk
Posts: 153
Joined: Mon Mar 03, 2008 8:42 am
Location: Suceava - Romania
Contact:

Post by night_hawk »

@shadowslair: just lower in the post :D
@cassini: I don't want a fight. But I REALY doubt it. Honestly, it's friggin impossible. Send me a demo with a given situation using PhysX and the same situation using Newton2 and show me a difference of 1:6 in framerate. No rendering. 1:2, I could somehow say it's possible. 1:3... a given CERTAIN situation that Newton2 might take out nicely. But 1:6 is outright outrageous.

@shadowslair: well, at this point it's pure C++ mate :D Get a nice stl / irr::core array, save all the pointers made by the Box Creating function (nnn) in the array and then access each one whenever you need. It's all concept and C++ at this point... Just know what you want :D
BTW: just to make it clearer. That NxActor* nnn; is not declared globally. It's only valid for that function in which it was declared, starting from where it was declared and going until the end of the function.
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

Which I believe is very weak response and completely dismissed what your test showed.
No one dispute the physX is a very good, but for some reason there are few people around the forum that are very motivated to misinform anyone asking if Newton is a possible solution as physics engine.
I can't understand your english.
Please stop patronizing people.
You will be better saying why you like PhysX and recommending it because you like it, stop saying is better that this or that.
No one is condescending to anyone here, so please do not misread the language. And maybe I should stop the use of the word better as it is very ambiguous, and use the word featureful.
BTW the laws physics do not have the knowledge of who is a beginner of who is a professional.
So I do not know from where you are getting these metrics to compare engines. That sounds as irrational as the idea that one is better because it was written by most professional and physicists, out there
Who was talking about the laws of physics? I was talking about the API and usage of the physics engine, which clearly are built towards different types of programmers.

And why don't you take a note from night_hawk, a fight/discussion/argument is not needed, and will not be continued/started.
TheQuestion = 2B || !2B
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

Halifax: It seems everyone wants to fight with you lately :lol: :twisted: :D

Halifax: "What a nice day"
Someone: "Hey hey hey! Take your fight elsewhere!"
Halifax: "If you start a fight I'm out of here"
Someone: "O.k you asked for it!"

LOL!!
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

MasterGod wrote:Halifax: It seems everyone wants to fight with you lately :lol: :twisted: :D

Halifax: "What a nice day"
Someone: "Hey hey hey! Take your fight elsewhere!"
Halifax: "If you start a fight I'm out of here"
Someone: "O.k you asked for it!"

LOL!!
Haha, yeah, it as if I can't express my proprietary ideals without being criticized. They are just ideals that I adhere to, and if someone agrees with them, then they agree, but I in no way force my opinion upon users. And if they feel that I do, then they are sadly mistaken. But that is beside the point; furthermore, I am happy to respect the posting of others opinions and feelings.

Also, just I note, it appears I made a mistake in one of my posts on a very keyword. It should be "And no I wasn't shielding", not "And no I was shielding". Haha, I guess that makse a difference. :wink:
TheQuestion = 2B || !2B
Post Reply