IrrPhysx 0.2 - Nvidia Physx 2.8.1 wrapper
-
- Posts: 69
- Joined: Fri Feb 22, 2008 6:47 pm
- Location: montreal
- Contact:
Is IrrPhysx sollenly for Nvidia base cards ?
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.
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
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!
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!
well i think i will install back windows xp for dual booting with ubuntu. i will tell you how it going by... maybe tomorrow.
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
-
- Posts: 368
- Joined: Tue Aug 21, 2007 1:43 am
- Location: The Middle of Nowhere
Bit more info: the PhysX control panel app allows me to switch between "no hardware acceleration" and "GeForce PhysX". I'll try some tests...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!
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!
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
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.
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.
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
cool
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
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Oh yes you can! 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 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
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
oh
Oh. 0.1 did'nt seem to have that I did'nt realize you updated so quickly.
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
-
- Posts: 368
- Joined: Tue Aug 21, 2007 1:43 am
- Location: The Middle of Nowhere
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:
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.
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
okay
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 .
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 .
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
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!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();
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.
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info