Why nxOgre?

futnuh

26-07-2006 00:41:52

Here's the ultimate in naive questions ...

Having just started to look at development with PhysX, what are the advantages of using nxOgre over just relying on Ageia's API?

betajaen

26-07-2006 01:19:53

I always like to answer this with some source code:

This is how to set up a Scene in PhysX, without the code to submit the actor changes to Ogre, or Ogre to update PhysX on a new frame:


NxPhysicsSDK* gPhysicsSDK = NULL;
NxScene* gScene = NULL;
NxVec3 gDefaultGravity(0,-9.8,0);
gPhysicsSDK = NxCreatePhysicsSDK(NX_PHYSICS_SDK_VERSION);
if (!gPhysicsSDK) return;


NxSceneDesc sceneDesc;
sceneDesc.gravity = gDefaultGravity;
sceneDesc.broadPhase = NX_BROADPHASE_COHERENT;
sceneDesc.collisionDetection = true;
gScene = gPhysicsSDK->createScene(sceneDesc);

NxActorDesc actorDesc;
NxBodyDesc bodyDesc;

NxBoxShapeDesc boxDesc;
boxDesc.dimensions.set(0.5,0.5,0.5);
actorDesc.shapes.pushBack(&boxDesc);

actorDesc.body = &bodyDesc;
actorDesc.density = 10;
actorDesc.globalPose.t = NxVec3(0,boxStartHeight,0);
return gScene->createActor(actorDesc);


And this is how it's done in NxOgre


world* mWorld = new world(mRoot);
scene* mScene = mWorld->createScene("Main",mSceneMgr);
mScene->hasGravity();
body *myCube = mScene->createBody("myCube", "cube.1m.mesh", new cubeShape(1.0f),10.0f, Vector3(0,3.5,0));


That's it. Seriously. No intergration with PhysX. No code to update PhysX on a frame update. No handling of Actors; Storing them, deleting them when needed.

If that doesn't wet your whistle:

http://get.nxogre.org/book/betajaens-gu ... -draft.pdf
http://nxogre.org/Screenshots
http://nxogre.org/Tutorials
http://nxogre.org/FAQ

Or that the fact that NxOgre, has over 35 seperate tutorials based on the PhysX lessons implementing almost every PhysX feature of 2.3.x there is.

futnuh

26-07-2006 02:34:05

Consider my whistle whetted. My only concern is the 38 minute latency in getting forum questions answered ...

(Actually, my only concern is Ageia's $50k fee structure for commercial licenses. Fine if you're a studio writing the next Halo but an amount that exceeds the entire budget for the majority of our projects.)

betajaen

26-07-2006 09:32:55

Ageia do have a "policy" of giving out a free license to indie developers who make significant use a PhysX card.

I'm sure if you get a working demo up and running and show it to them, they'll respond something back quite promising.

p.s. I have been known to answer a lot quicker than 38 minutes. I think my record is less than a minute. :D

Wretched_Wyx

26-07-2006 21:07:47

38 minutes?! That's not bad at all. Especially considering it was waiting 38 minutes, for a response from the great Betajaen. Though as he pointed out... He has responded in under a minute before. I think the average is around... 3-5 minutes?

With all the development he's doing, I think that's pretty good. That means that he is coding away, testing, etc... As well as watching the forums like a hawk. :)

futnuh

26-07-2006 21:18:42

38 minutes?! That's not bad at all. Especially considering it was waiting 38 minutes, for a response from the great Betajaen.

It was a joke, as I'm sure Betajaen discerned. In general we get better support out of the open-source community than from any commercial suppliers, even when we are paying for it.

betajaen

26-07-2006 22:35:18

It's because it's we are not so concerned with money, also we can act less professional about it to. Which makes us admit there is problems with the software and willing to fix it.

See Microsoft there is a goodside to Open Source after all!

Wretched_Wyx

27-07-2006 08:36:44

Heh... My mistake futnuh :P. Sometimes things slip by me unnoticed.

Vineeth@nxOgre

13-03-2008 11:59:57

How can I create an actor with multiple shape like the wooden table example in Ageia doc.

what is your alternative to pushback method
avtordesc.shape.pushback(push as many as you want..) :roll:

Vineeth@nxOgre

13-03-2008 12:00:34

How can I create an actor with multiple shape like the wooden table example in Ageia doc.

what is your alternative to pushback method
avtordesc.shape.pushback(push as many as you want..) :roll:

Vineeth@nxOgre

13-03-2008 12:01:37

How can I create an actor with multiple shape like the wooden table example in Ageia doc.

what is your alternative to pushback method
avtordesc.shape.pushback(push as many as you want..) :roll:

actorDesc.body = &bodyDesc;
actorDesc.density = 10;
actorDesc.globalPose.t = NxVec3(0,boxStartHeight,0);
return gScene->createActor(actorDesc);


And this is how it's done in NxOgre

Code:

world* mWorld = new world(mRoot);
scene* mScene = mWorld->createScene("Main",mSceneMgr);
mScene->hasGravity();
body *myCube = mScene->createBody("myCube", "cube.1m.mesh", new cubeShape(1.0f),10.0f, Vector3(0,3.5,0));

betajaen

13-03-2008 12:22:08

Use the Edit button next time genius.

CompoundShape* cs = new CompoundShape();
cs->add(new CubeShape(1));
cs->add(new SphereShape(1, "offset: 1 0 0"));

mActor->createActor("myWeirdActor", cs, Vector3(0,1,0), "mass: 10");