PhysX - PPU support working with NxOgre ?

tsky

07-11-2006 11:36:30

Hi,

short question, i got an PPU Card from Ageia:

Is this supported by NxOgre by default ? Seems not working automatically hardware accel...!?

The FPS going down to <4 FPS an less in many of the demos.

We make some Benchmarks with the PPU without display objects and the hardware could more than 2000 shape´s handle with stable 60 FPS.

I use an Athlon 1700+ with 2GB Ram an Nvidia 7600GS trying the debug version of 0.4RC2 (default graphics setting) compiled with Ogre-1.2.3 and PhysX SDK 2.6.2 with VC8.0.

Tom

betajaen

07-11-2006 12:36:21

Yep. It seems to be, both the scenetype is hardware, and I can hear the fan spin up. I've ran some really early fluid code on it as well, which obviously didn't work on software then which would of caused an error.

The low FPS is basically down to debug, in release it is a lot higher. It also helps if collision meshes are optimised and the amount of things in a scene.

[Edit]

How are you setting up your scene?

tsky

07-11-2006 13:11:53

Yep. It seems to be, both the scenetype is hardware, and I can hear the fan spin up. I've ran some really early fluid code on it as well, which obviously didn't work on software then which would of caused an error.

The low FPS is basically down to debug, in release it is a lot higher. It also helps if collision meshes are optimised and the amount of things in a scene.

[Edit]

How are you setting up your scene?


Hi,

i´am playing with your TutorialDemos at the moment to look if my goals are possible. So the setup is yours.
With the nxTutorial111 i got in RELEASE-Mode 24 FPS. Only starting and nothing else except pressing F2. In DEBUG-Mode is 4 FPS. An Athlon64 X2 3800+ with 7800GTX got 31FPS in RELEASE.
I thing the rendering slows down the FPS not the physics. Will try to seperate this...

Tom

PS: Do you got an Linux-SDK because you are a registered user with licence ? I´am registered user without an licence to get the SDK but never found an Linux-SDK in downloads.

betajaen

07-11-2006 13:37:10

It could be the renderer. However with your setup it should be higher.

Just to clarify, this is how you create a hardware scene.


blueprint<scene> bp;
bp.mSimulationType = blueprint<scene>::PPU_SIMULATION;
bp.create(...);


* Enum has changed since RC2. But it still the same.

As for the Linux thing, I'm not sure why I have access to it and others don't. Perhaps it's a hand picked process when you update your profile, or perhaps somebody in Ageia likes me ;)

tsky

07-11-2006 14:40:20

It could be the renderer. However with your setup it should be higher.

Just to clarify, this is how you create a hardware scene.


blueprint<scene> bp;
bp.mSimulationType = blueprint<scene>::PPU_SIMULATION;
bp.create(...);


* Enum has changed since RC2. But it still the same.

As for the Linux thing, I'm not sure why I have access to it and others don't. Perhaps it's a hand picked process when you update your profile, or perhaps somebody in Ageia likes me ;)



Unfortunatly such code is not in my code.

In nxOgre_scene_blueprint.cpp:

mSimType = NX_SIMULATION_SW;
// mHWSceneType = NX_HW_SCENE_TYPE_RB;
// mPipelineSpec = NX_HW_PIPELINE_FULL;

and in nxOgre_scene.cpp i changed to:

if (sceneDescription.simType == NX_SIMULATION_HW) {

// if (sceneDescription.hwSceneType == NX_HW_SCENE_TYPE_FLUID) {
// type = HARDWARE_FLUID;
// }
// else {
// type = HARDWARE;
// }
type = HARDWARE;
}
else {
type = SOFTWARE;
}

because i tought there is an automatically fallback to software if no HW is present.

So i changed something in nxOgre_scene.cpp:

if (sceneDescription.simType == NX_SIMULATION_HW) {
// if (sceneDescription.hwSceneType == NX_HW_SCENE_TYPE_FLUID) {
// type = HARDWARE_FLUID;
// }
// else {
// type = HARDWARE;
// }
type = HARDWARE; // tsky
}

mScene = mPhysicsSDK->createScene(sceneDescription);
if (mScene == NULL) {
// no scene create - no HW present fallback to software
sceneDescription.simType = NX_SIMULATION_SW;
mScene = mPhysicsSDK->createScene(sceneDescription);
type = SOFTWARE;
}

Default in bluprint is now NX_SIMULATION_HW. The PPU_SIMULATION is not in my PhysX enum definition.
The fallback from software to hardware works. The PPU is identified. But my FPS aren´t better.
I will test on some other scenes...

betajaen

07-11-2006 15:29:01

You shouldn't need to modify NxOgre itself, in fact your way is quite dangerous as your assuming that only a no-hardware error will be the only one you will encounter:

This is the better way, placed in a tutorial:

blueprint<scene> bp;
bp.toDefault();
if (mWorld->hasHardware())
bp.mSimType = NX_SIMULATION_HW;
mScene = bp.create("myScene", mSceneMgr);


To really make sure your scene is running in hardware:


if (mScene->mScene->getSimType() == NX_SIMULATION_HW)
cout << "Yes it is" << endl;
else
cout << "No it is not." << endl;

toglia

20-04-2008 07:52:34



blueprint<scene> bp;
bp.toDefault();
if (mWorld->hasHardware())
bp.mSimType = NX_SIMULATION_HW;
mScene = bp.create("myScene", mSceneMgr);



if (mScene->mScene->getSimType() == NX_SIMULATION_HW)
cout << "Yes it is" << endl;
else
cout << "No it is not." << endl;


On Nxogre 0.9 I get some "cannot access protected member" kind of compiler error.

I just want to check my card is working...

Thanks for any suggestion

toglia

30-04-2008 08:11:14

Solved in:
http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=5674