Page 1 of 10

PhysX Fluid Simulation in Softimage ICE

Posted: 21 Jan 2012, 22:36
by Mr.Core
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

Re: PhysX Fluid Simulation in Softimage ICE

Posted: 21 Jan 2012, 22:38
by Hirazi Blue
Wow, looks fascinating. Thanks for sharing! :ymhug:

Re: PhysX Fluid Simulation in Softimage ICE

Posted: 21 Jan 2012, 22:43
by fabricio.chamon
Hey, that's fantastic! Mr. Core strikes again!
thanks a bunch.

Re: PhysX Fluid Simulation in Softimage ICE

Posted: 21 Jan 2012, 23:54
by Chris_TC
Wow, great stuff! Can't wait to play with this...

Re: PhysX Fluid Simulation in Softimage ICE

Posted: 22 Jan 2012, 00:33
by Tekano
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!

Re: PhysX Fluid Simulation in Softimage ICE

Posted: 22 Jan 2012, 00:55
by gustavoeb
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?

Re: PhysX Fluid Simulation in Softimage ICE

Posted: 22 Jan 2012, 10:31
by Mr.Core
>>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.

Re: PhysX Fluid Simulation in Softimage ICE

Posted: 22 Jan 2012, 14:52
by origin
a-we-so-me!

demo scenes working okay here (gtx285)

Re: PhysX Fluid Simulation in Softimage ICE

Posted: 22 Jan 2012, 22:21
by Hirazi Blue
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!
;)

Re: PhysX Fluid Simulation in Softimage ICE

Posted: 22 Jan 2012, 22:31
by Mr.Core
>>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.

Re: PhysX Fluid Simulation in Softimage ICE

Posted: 22 Jan 2012, 23:18
by Tekano
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?

Re: PhysX Fluid Simulation in Softimage ICE

Posted: 23 Jan 2012, 08:58
by Mr.Core
You must get this message in script editor after first frame:
// INFO : || CUDA Manager Is Obtained! Created PhysX World!

Re: PhysX Fluid Simulation in Softimage ICE

Posted: 23 Jan 2012, 16:39
by iamVFX
Hirazi Blue wrote:Could you please implement "CUDA accelerated Rigid Bodies" next? =))
The funny thing is - in 2012.5 it's already accelerated

Image

Re: PhysX Fluid Simulation in Softimage ICE

Posted: 23 Jan 2012, 16:44
by Hirazi Blue
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?
:-\

Re: PhysX Fluid Simulation in Softimage ICE

Posted: 23 Jan 2012, 16:49
by iamVFX
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

Re: PhysX Fluid Simulation in Softimage ICE

Posted: 25 Jan 2012, 23:01
by TwinSnakes007
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?