PhysX Fluid Simulation in Softimage ICE

Plugins linking to this thread: (hide)

PhysX Fluid SimulationAuthor: Oleg Bliznuk
This ICE compound wraps a CUDA implentation of the SPH fluid algorithm and allows a very fast particle simulation of fluids on NVidia GPUs. CPU mode is also available, also rather fast and not limited by the available GPU RAM. CPU mode can be used as the default mode or as a fallback mode.

See the si-community thread linked below for details and tips on using this compound. Here's a test video by Tekano with 2 million particles.

local backup: Waterfall_FX.rar

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Post Reply
User avatar
Mr.Core
Posts: 145
Joined: 10 Aug 2011, 12:35
Skype: giga-core
Location: Kharkov, Ukraine

PhysX Fluid Simulation in Softimage ICE

Post by Mr.Core » 21 Jan 2012, 22:36

Hi here,
I'd like to public some experiment with physx fluids, it is custom ice node which wraps sph fluids.
Image
Attached archive contains samples, installation guide and workgroup. There are no docs or toolbars, all workflow similar to usual particle simulation except solver, you need just to replace "Simulate Particles" with the "PhysX Simulate Fluid" compound. Builded and tested under 2012 sp1, win x64 only. CUDA card ( hi-end fermi is preferable ) required. Also, maybe you will need to install this
Some notices:
-if you get red "particle GPU creation failed" try to decrease max particles number parameter or drop down Radeon from your system and buy Nvidia :) this attribute allocates ( once ) memory in GPU ram at the beginning of evaluation, so it is great tool to detect how many particles you can use with your videocard
- Max Speed attribute - this has VERY critical influence on the overall performance, set it as low as possible
- Approximate Fluid Box - rough bounding box in which your simulation happens ( big values slow down speed, low values leads to bad case when particles tops to collide with obstacles )
- Statical obstacles are implemented as triangle ( actual shape in bullet-terms ) mesh, they load once at the beginning of evaluation and cannot be changed during this eval
- Dynamical obstacle implemented as convex ( only at this time, I think it is possible to get it as triangle meshes in future ) and node check this port at each frame. when variable topo = false - only SRT of obstacle are traced by the solver, if true - all topology changes ( include simple points movement ) are mirrored in the Px world
- if it is possible - do all your sims near center of the world ( 0\0\0 ) and at normal scales ( in comparison to home grid size )
I did some test on GTX 480 ( 1.5 GB ), and at this time it is possible to run about 2M particles, which allocates about 0.9M videoRAM. CPU mode is also very fast.
So have a fun with the incredible fast water :)
-Regards,
Oleg
Attachments
pxFlow.jpg
pxFlow.jpg (47.77 KiB) Viewed 15485 times
pxNode.jpg
pxNode.jpg (35.79 KiB) Viewed 15485 times
Last edited by Mr.Core on 21 Jul 2012, 19:06, edited 1 time in total.

User avatar
Hirazi Blue
Administrator
Posts: 4915
Joined: 04 Jun 2009, 12:15

Re: PhysX Fluid Simulation in Softimage ICE

Post by Hirazi Blue » 21 Jan 2012, 22:38

Wow, looks fascinating. Thanks for sharing! :ymhug:
...

fabricio.chamon
Posts: 91
Joined: 09 Jun 2009, 23:47

Re: PhysX Fluid Simulation in Softimage ICE

Post by fabricio.chamon » 21 Jan 2012, 22:43

Hey, that's fantastic! Mr. Core strikes again!
thanks a bunch.

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Re: PhysX Fluid Simulation in Softimage ICE

Post by Chris_TC » 21 Jan 2012, 23:54

Wow, great stuff! Can't wait to play with this...

User avatar
Tekano
Posts: 488
Joined: 09 Jun 2009, 14:49
Location: London, UK

Re: PhysX Fluid Simulation in Softimage ICE

Post by Tekano » 22 Jan 2012, 00:33

haha! think I got it working , soon as you crank it p though its not long before

Runtime Error!

R6025

-pure virtual function call

:D im only on a Geforce GTX 560 ti though so probly cant go much far on gpu memory. but still I just have to find the limit and stick to that.

awesome! ^:)^ will post some watery stuff soon!
Gossip is what no one claims to like, but everybody enjoys.

User avatar
gustavoeb
Moderator
Posts: 586
Joined: 21 Jul 2010, 00:33
Skype: gustavoboehs

Re: PhysX Fluid Simulation in Softimage ICE

Post by gustavoeb » 22 Jan 2012, 00:55

Wow!! This is freaking amazing... So insanely fast, if this gets serious, it will take liquid simulations to a whole new level...
:ymapplause:

Are there any serious drawbacks of its GPU nature? Or is it possible for something production ready to come out of this?

User avatar
Mr.Core
Posts: 145
Joined: 10 Aug 2011, 12:35
Skype: giga-core
Location: Kharkov, Ukraine

Re: PhysX Fluid Simulation in Softimage ICE

Post by Mr.Core » 22 Jan 2012, 10:31

>>Are there any serious drawbacks of its GPU nature? Or is it possible for something production ready to come out of this?

I think that there are several drawbacks but they related mostly to its game-orient nature, so it has not a bunch of settings, it has fixed spatial hash grid size ( some internal structure for better performance when searching for neighbors ) and speed stay over quality. On the other hand, it is really fast, and if you dont need some advansed stuff like lagoa's plastic\tearing structures, physx is not bad choice. Considering rayfire uses physx too this fact is a good proof that game engine can be used in production. And of course if you will use CPU mode ( which is also very quick ) you aren't limited in memory.

User avatar
origin
Posts: 619
Joined: 09 Jun 2009, 11:59
Location: warsaw

Re: PhysX Fluid Simulation in Softimage ICE

Post by origin » 22 Jan 2012, 14:52

a-we-so-me!

demo scenes working okay here (gtx285)

User avatar
Hirazi Blue
Administrator
Posts: 4915
Joined: 04 Jun 2009, 12:15

Re: PhysX Fluid Simulation in Softimage ICE

Post by Hirazi Blue » 22 Jan 2012, 22:21

Could you please implement "CUDA accelerated Rigid Bodies" next? =))
But seriously: just had a chance to actually play with it for a little while
and it seems to work like a charm... Beautiful work, Mr. Core!
;)
...

User avatar
Mr.Core
Posts: 145
Joined: 10 Aug 2011, 12:35
Skype: giga-core
Location: Kharkov, Ukraine

Re: PhysX Fluid Simulation in Softimage ICE

Post by Mr.Core » 22 Jan 2012, 22:31

>>Could you please implement "CUDA accelerated Rigid Bodies" next?
=))
btw, bullet node finally uses CUDA :)
I thought about it and one thing that stopped me - no triangle ( actual ) shape for dynamic rigid bodies.

User avatar
Tekano
Posts: 488
Joined: 09 Jun 2009, 14:49
Location: London, UK

Re: PhysX Fluid Simulation in Softimage ICE

Post by Tekano » 22 Jan 2012, 23:18

a quick question.. how to tell if physx is enabled on GPU? I often reach a stage of fiddling around where ticking the box on enable gpu has absolutely no effect, where some scenes it does. is there any easy way to tell that gpu is in uses?
Gossip is what no one claims to like, but everybody enjoys.

User avatar
Mr.Core
Posts: 145
Joined: 10 Aug 2011, 12:35
Skype: giga-core
Location: Kharkov, Ukraine

Re: PhysX Fluid Simulation in Softimage ICE

Post by Mr.Core » 23 Jan 2012, 08:58

You must get this message in script editor after first frame:
// INFO : || CUDA Manager Is Obtained! Created PhysX World!

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: PhysX Fluid Simulation in Softimage ICE

Post by iamVFX » 23 Jan 2012, 16:39

Hirazi Blue wrote:Could you please implement "CUDA accelerated Rigid Bodies" next? =))
The funny thing is - in 2012.5 it's already accelerated

Image

User avatar
Hirazi Blue
Administrator
Posts: 4915
Joined: 04 Jun 2009, 12:15

Re: PhysX Fluid Simulation in Softimage ICE

Post by Hirazi Blue » 23 Jan 2012, 16:44

I was talking/joking about the well-advertised but apparently not-implemented
"CUDA Accelerated PhysX Rigid Bodies", obviously.
And the Bullet-node only does ICE RBD, or not?
:-\
...

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: PhysX Fluid Simulation in Softimage ICE

Post by iamVFX » 23 Jan 2012, 16:49

Hirazi Blue wrote:I was talking/joking about the well-advertised but apparently not-implemented "CUDA Accelerated PhysX Rigid Bodies", obviously
Ya I get it. But now it's seems actually works. Not for the Phys-eX of course

User avatar
TwinSnakes007
Posts: 316
Joined: 06 Jun 2011, 16:00

Re: PhysX Fluid Simulation in Softimage ICE

Post by TwinSnakes007 » 25 Jan 2012, 23:01

Mr. Core,

If you where able to write a ICE node that can talk to the GPU, then doesnt that mean that GPU accelerated ICE nodes are also possible?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest