IrrPhysx 0.3 - Nvidia Physx 2.8.1 wrapper
IrrPhysx 0.3 - Nvidia Physx 2.8.1 wrapper
EDIT: Added another demo using Blindside's water droplet shader. See below.
This release of IrrPhysx - v0.3 - has added support for Fluids, both in hardware (given a compliant GPU) and software (cpu). I also removed a mesh called "platform" from the GameExample that crashed the Release exe when not running through MSVC. This is an initial release; there are many tweaks that could be made to the fluid system - source code is supplied, allowing people to modify as required.
Please note: v0.3 was developed on an nVidia GPU with hardware PhysX support. Although software (cpu) fluids are possible with v0.3 the GameExample expects hw PhysX support.
Please note: adding fluid support to your apps will require a little bit of work. The GameExample is just that - an example of adding fluids to a scene. In the GameExample fluids are rendered as particles - a full shader system will be required and much tweaking of fluid/emitter parameters to obtain your desired look.
IrrPhysx 0.3 Source:
http://sio2.g0dsoft.com/IrrPhysx-v0_3.zip
IrrPhysx 0.3 GameExample Source:
http://sio2.g0dsoft.com/IrrPhysx-v0_3-GameExample.zip
IrrPhysx 0.3 GameExample Source (with Blindside's water droplet shader):
http://sio2.g0dsoft.com/IrrPhysx-v0_3-G ... action.zip
A big thanks to JP for v0.2, without which I could not have made v0.3.
This release of IrrPhysx - v0.3 - has added support for Fluids, both in hardware (given a compliant GPU) and software (cpu). I also removed a mesh called "platform" from the GameExample that crashed the Release exe when not running through MSVC. This is an initial release; there are many tweaks that could be made to the fluid system - source code is supplied, allowing people to modify as required.
Please note: v0.3 was developed on an nVidia GPU with hardware PhysX support. Although software (cpu) fluids are possible with v0.3 the GameExample expects hw PhysX support.
Please note: adding fluid support to your apps will require a little bit of work. The GameExample is just that - an example of adding fluids to a scene. In the GameExample fluids are rendered as particles - a full shader system will be required and much tweaking of fluid/emitter parameters to obtain your desired look.
IrrPhysx 0.3 Source:
http://sio2.g0dsoft.com/IrrPhysx-v0_3.zip
IrrPhysx 0.3 GameExample Source:
http://sio2.g0dsoft.com/IrrPhysx-v0_3-GameExample.zip
IrrPhysx 0.3 GameExample Source (with Blindside's water droplet shader):
http://sio2.g0dsoft.com/IrrPhysx-v0_3-G ... action.zip
A big thanks to JP for v0.2, without which I could not have made v0.3.
Last edited by sio2 on Wed Dec 31, 2008 4:33 pm, edited 1 time in total.
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
Nice work sio2!
Anyone who might find the shader part a hurdle could use something like this for the effect:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=27054
Anyone who might find the shader part a hurdle could use something like this for the effect:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=27054
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
4-6 (And random jumps to 101?) FPS without fancy NVidia physics acceleration I knew itd probably be slow on my ATI card...but not that slow!
BTW> The liquid "spouts" didn't follow the bottles when I shot them, but I suppose that was because you just didn't program it, no biggie...
BTW2> This is a little off topic, but does ATI have some equivalent to PhysX?
BTW3> I noticed the fluid stops eventually, after that the speed shoots up to around 350 FPS, so I got to have fun destroying the flag and blowing up spheres =)
~DtD
BTW> The liquid "spouts" didn't follow the bottles when I shot them, but I suppose that was because you just didn't program it, no biggie...
BTW2> This is a little off topic, but does ATI have some equivalent to PhysX?
BTW3> I noticed the fluid stops eventually, after that the speed shoots up to around 350 FPS, so I got to have fun destroying the flag and blowing up spheres =)
~DtD
Blindside: Very, very nice. It doesn't model a fluid surface so it's not as complex as the shader as I had in mind, but I'll implement the raindrop shader in the GameExample.
Christian: The more objects you have the more you should benefit from hw acceleration. Note that you can have thousands of particles and they all collide with static and dynamic objects.
DtD: I could have spent another month - or more - on it before releasing it. I solved the biggest issues, such as it crashing every time you run the Release exe. The fluid emitter is anchored in worldspace at the moment - needs a bit of work. You're right: the fluid emitter reservoir runs out when it's supposed to be continuous from what the docs say. I haven't figured that one out yet.
BTW I believe that PhysX acceleration is possible on ATI cards. I don't know the details so if someone could find out then those with ATI cards would be most grateful, I imagine.
Christian: The more objects you have the more you should benefit from hw acceleration. Note that you can have thousands of particles and they all collide with static and dynamic objects.
DtD: I could have spent another month - or more - on it before releasing it. I solved the biggest issues, such as it crashing every time you run the Release exe. The fluid emitter is anchored in worldspace at the moment - needs a bit of work. You're right: the fluid emitter reservoir runs out when it's supposed to be continuous from what the docs say. I haven't figured that one out yet.
BTW I believe that PhysX acceleration is possible on ATI cards. I don't know the details so if someone could find out then those with ATI cards would be most grateful, I imagine.
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
One of the changes I made to JP's code was to run the physics in parallel with Irrlicht's beginScene()/endScene(). This gives the GPU the possibility to be doing stuff when normally it would be idle. My frame rate quadrupled with 10000 fluid particles.christianclavet wrote:Wow! The frame rate is incredible! Got more than 500FPS with more than 110 physic objects, the scene and the "fluid".
This can be dangerous - as JP points out in a comment in GameExample - but should be fine as long as you don't move/update physics objects while the simulation is running.
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
I'm going to add this to the GameExample. I'll convert the shaders I need to HLSL so the example can run in GL/D3D.BlindSide wrote:Anyone who might find the shader part a hurdle could use something like this for the effect:
I notice that when the large refractive quad intersects the lowest edge of the viewport there's some nasty stretching. I remember seeing the same thing - and commenting on it - in Elvman's "realistic" water scene node.
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
I've had IrrPhysx working with Irrlicht 1.5. I can't remember what I did, I just did a Debug build and fixed every issue as it came up. You'll either have to do the same or wait until I update to Irrlicht 1.5.Nerexis wrote:I try to use it in Irrlicht 1.5 and i created 'convexMeshObject' which works fine but it crash in function 'createHeightfieldObject'.
It seems that some of the model loaders were fixed for Irrlicht 1.5. Great, except that scenes made in IrrEdit 1.4.2 now load and look wrong because the models were orientated based on the previously broken loaders.
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
Irrlicht 1.5 runs OK for me (the MilkShape models are backwards and the camera is ultra fast, but it runs). Are you sure you've replaced the Irrlicht 1.4.2 dll with a 1.5 dll?Nerexis wrote:I try to use it in Irrlicht 1.5 and i created 'convexMeshObject' which works fine but it crash in function 'createHeightfieldObject'.
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
I've made a version of the GameExample that uses Blindside's water droplet shader. You can get the exe and source here:
http://sio2.g0dsoft.com/IrrPhysx-v0_3-G ... action.zip
It looks good, but still looks like each separate droplet is a piece of glass or something, as the fluid particles don't merge together (that's an altogether more involved shader). Also, it seems each droplet refracts the whole background.
It's a nice starting point for people anyway.
Oh, with Vista, OpenGL in a window seems to give me a lower frame rate than D3D9: GL give 60fps whereas D3D9 give 180fps (Irrlicht 1.4.2). This is the original GameExample demo (without refraction) though the demo with refraction is the same frame rate. VSync should be off, unless there's some driver issues...
http://sio2.g0dsoft.com/IrrPhysx-v0_3-G ... action.zip
It looks good, but still looks like each separate droplet is a piece of glass or something, as the fluid particles don't merge together (that's an altogether more involved shader). Also, it seems each droplet refracts the whole background.
It's a nice starting point for people anyway.
Oh, with Vista, OpenGL in a window seems to give me a lower frame rate than D3D9: GL give 60fps whereas D3D9 give 180fps (Irrlicht 1.4.2). This is the original GameExample demo (without refraction) though the demo with refraction is the same frame rate. VSync should be off, unless there's some driver issues...
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781