IrrPhysx 0.2 - Nvidia Physx 2.8.1 wrapper

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
robertgarand
Posts: 69
Joined: Fri Feb 22, 2008 6:47 pm
Location: montreal
Contact:

Is IrrPhysx sollenly for Nvidia base cards ?

Post by robertgarand »

Hi Jp,
Must be an already answered question or too obvious, but I was wondering if the engine is usable on other graphic cards then nvidia ones.(ATI,etc)
Does it run under Opengl ?
I tought I should ask those questions before digging in documentation...
I want to stay as univeral as possible in next game,
And I am at choosing my physic engine.
Doing a great work JP,
Robert.
If it can't be writen, it can't exist
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

robertgarand, the graphics card is of no consequence, you can use any graphics card you like. More recent GeForce graphics card will give you hardware acceleration as Nvidia bought Physx from Ageia and put the support into the new cards. If you don't have one of these new GeForce cards then you'll still be fine, the physics will just run in software mode, which is still pretty good.

The examples are mostly done with OpenGL i think, though the game example is done in DirectX due to a bug in skybox texture clamping. You can use either because there's no reliance on any OGL/DX specific stuff it's all basic Irrlicht stuff.

Jallen, As fmx said I just used the standard SDK sample code to learn Physx, it's pretty good! And now you've got my IrrPhysx source as well to see how to integrate into Irrlicht, which can actually be a tricky feat!

sio2, thanks very much for confirming that it picks up the GeForce cards for acceleration! I do a check on startup to see if there's a card available and then hopefully everything should run on hardware after that... not sure how to properly confirm that though. I had asked Virion to check this out as he said he had a new GeForce card (thanks for looking into it, sorry there's no Linux version at the moment! I'd like to support it later on!). Maybe you can help me out instead, I can provide an app with hardware mode prevented so then you can compare the performance of the one that picks up the hardware and the one that doesn't!
Image Image Image
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

well i think i will install back windows xp for dual booting with ubuntu. i will tell you how it going by... maybe tomorrow.
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

Post by Dark_Kilauea »

Viron, PhysX does work on linux, so you should be able to recompile the samples to work on linux.

Linux does not have a runtime, instead install the SDK and copy the .so files to /usr/lib
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

JP wrote:sio2, thanks very much for confirming that it picks up the GeForce cards for acceleration! I do a check on startup to see if there's a card available and then hopefully everything should run on hardware after that... not sure how to properly confirm that though. I had asked Virion to check this out as he said he had a new GeForce card (thanks for looking into it, sorry there's no Linux version at the moment! I'd like to support it later on!). Maybe you can help me out instead, I can provide an app with hardware mode prevented so then you can compare the performance of the one that picks up the hardware and the one that doesn't!
Bit more info: the PhysX control panel app allows me to switch between "no hardware acceleration" and "GeForce PhysX". I'll try some tests...

I think it would be useful if the Irrlicht app could query IrrPhysX to determine HW support - if it exists then maybe more physics objects could be used.

Maybe some form of instance scene node would be useful. A single scene node capable of rendering multiple instances of a single mesh (a cube, for example). If I made one I'd have to alter IrrPhysX's update mechanism, though.

Oh, and thanks for including the source! 8)
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Yep there should certainly be a way to query whether hardware is being used, you're right. There's obviously still a lot of things to wrap up still and some of the functionality that is already there isn't fully wrapped!

I'm not sure what you mean about this instance scene node... I would think that if you were wanting to render a number of independent cubes (which could move and rotate independently of each other) you couldn't really put them all into one draw call very well so you'd have to have seperate render calls and then seperate scene nodes would be the most flexible approach and also no different to having one scene node that had the multiple instances inside as seperate buffers... surely? I guess this isn't really anything to do with Physx, more to do with the application using it and it's possible to create this node and handle it all yourself when using IrrPhysx.... IrrPhysx doesn't update anything for you, it just does the simulation and then you have to synchronise your visual scene with the physical scene. In the examples i've shown a very simple and pretty easy to use way of doing this but different people may have different requirements so i've left it open to the user to handle.
Image Image Image
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

cool

Post by 3DModelerMan »

Is there static mesh support?. I did'nt see any in the examples.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

JP wrote:I'm not sure what you mean about this instance scene node... I would think that if you were wanting to render a number of independent cubes (which could move and rotate independently of each other) you couldn't really put them all into one draw call very well
Oh yes you can! 8) There are a number of techniques for instancing. You're right that it's not directly related to IrrPhysX, though. It's something I'd like to implement myself sometime.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Fair enough! Let us know if you get anywhere with it! :D

3DModelerMan, the Mesh Example and the Game Example show Triangle Meshes being used (The star in the mesh example and the house & platform in the game example). Triangle meshes are always static and can't be moved.
Image Image Image
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

oh

Post by 3DModelerMan »

Oh. 0.1 did'nt seem to have that I did'nt realize you updated so quickly. :D
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Aye it's new to 0.2, if there's any other features that people want to see just let me know and they'll hopefully be added eventually!

For now i'm having a slight rest from IrrPhysx and i'm trying to get IrrAI 0.5 sorted... fingers crossed!
Image Image Image
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

Post by Dark_Kilauea »

One thing that bugs me, why do your Get* functions in IPhysxObject class return void instead of the object type that you are trying to "get"?
For example:

Code: Select all

IPhysxObject * myobj;
...

//Why this?
core::vector3df pos;
myobj->getPosition(pos);

//Instead of this?
core::vector3df pos = myobj->getPosition();
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

okay

Post by 3DModelerMan »

You could have ragdoll physics, that would be a nice feature.
I've got a game I've taken a break on and I need to be able to adjust the legs of my wolf character to step on the terrain correctly. Ragdolls would be the perfect thing. Good job on IrrphysX by the way, really cool wrapper :wink: .
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Dark_Kilauea wrote:One thing that bugs me, why do your Get* functions in IPhysxObject class return void instead of the object type that you are trying to "get"?
For example:

Code: Select all

IPhysxObject * myobj;
...

//Why this?
core::vector3df pos;
myobj->getPosition(pos);

//Instead of this?
core::vector3df pos = myobj->getPosition();
Because otherwise i'd have to pass around a vector3df which wouldn't be as efficient, this way it's passed as a reference. It's the same way Physx does it. I'll admit that it's not quite as intuitive and nice to look at, but code can't always be perfect like that! :lol:

3DModMan, ragdoll physics will come in the next version maybe! Not sure when that will be but it's something i'm excited to get up and running! I think i said in the first post all the things that i figure are the bare necessities for most games needing phsyics.
Image Image Image
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

Image
Post Reply