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: 148
Joined: 10 Aug 2011, 12:35
Skype: giga-core
Location: Kharkov, Ukraine

Re: PhysX Fluid Simulation in Softimage ICE

Post by Mr.Core » 20 Mar 2012, 22:25

I am not sure but probably ( if I understand right about the vorticity ) that can help.
Attachments
1.png

User avatar
druitre
Posts: 471
Joined: 25 Jun 2009, 23:35

Re: PhysX Fluid Simulation in Softimage ICE

Post by druitre » 31 Mar 2012, 00:27

Hello Mr Core, I've been trying to get something out of your vorticity setup but nothing so far. The strength when used as input on a gradient gives me random animated noise, the axis I don't know how to connect to a gradient. How would you set this up?

On another note: I'm on a machine with a GTX 560 Ti, with 2Gb ram. Yet I can't get the Max Particles Number setting past 2000000, if I set it any higher I get a "GPU particle system creation failed. Falling back to CPU implementation" warning. (This happens in any scene, the most basic setup with just an emitter and Physx connected will do similar)

Looking in GPU-Z monitor, I can see @ 2000000 particles it's only using 803 Mb, if I raise the max Number it goes up and right away the sim fails.

The computer used to have a GTX 270 with 830 Mb, and it could handle the exact same maximum.

On my other machine, with a GTX 460 with 1 Gb, I get exactly the same max number setting.

Is there some limit set for the compound or Softimage? Or is it a Physx limitation?

[edit: this is the message from the script editor:
// ERROR : Failed to allocate pinned memory.
// ERROR : GPU particle system creation failed. Falling back to CPU implementation.]

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

Re: PhysX Fluid Simulation in Softimage ICE

Post by Mr.Core » 02 Apr 2012, 16:51

Hi,
I have attached a scene with vorticity setup ( or something similar - I am not sure what is it exactly :) ). The particles color changes from black to white on high angular velocity values.
Regard to 2M - This is perhaps physx limitation, at least personally I have no any restrictions here, I'll ask about that.
Also, the latest physx beta ( px 3.2 beta 3 ) brings support for actual shape for dynamic obstacels so I'll add it soon
Attachments
regularEmission_003_.rar
(153.78 KiB) Downloaded 190 times
11111111.jpg
Last edited by Mr.Core on 03 Apr 2012, 15:20, edited 1 time in total.

User avatar
druitre
Posts: 471
Joined: 25 Jun 2009, 23:35

Re: PhysX Fluid Simulation in Softimage ICE

Post by druitre » 03 Apr 2012, 09:57

Hi Mr Core! What version are you on? I'm on 2012 SAP, I get a message I need a newer version to open your sene.

PeterCGS
Posts: 23
Joined: 21 Nov 2011, 23:00

Re: PhysX Fluid Simulation in Softimage ICE

Post by PeterCGS » 03 Apr 2012, 12:13

Any chance of using a implicit cube for the Fluid Box? Im doing a waterslide test, and want the simulation to take place around the character going down the slide, but the waterslide is huge (Animated implicit cube as Fluid box would be suuper :)..)

/Regards Peter K

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

Re: PhysX Fluid Simulation in Softimage ICE

Post by Mr.Core » 03 Apr 2012, 15:24

I am sorry, corrected now

>>Any chance of using a implicit cube for the Fluid Box?
You can simply bind a hidden geometric cube to implicit one :) Its possible of course but doesnt make any sense I guess, very unusual thing

PeterCGS
Posts: 23
Joined: 21 Nov 2011, 23:00

Re: PhysX Fluid Simulation in Softimage ICE

Post by PeterCGS » 03 Apr 2012, 15:29

Well, I guess I dont fully understand your fluid box implementation.. Usually (Mooootzooooid hehe) you define a area where the simulation take place.. But for PhysX it doesnt seem to matter how small or big the Fluid box is, it seems to simulate anyway?

Another thing.. Substeps only seem to impact CPU rendering.. When doing higher substep simulation on the GPU, the simulation takes longer time but its always looking the same (And the substep seems to correspond to a high CPU number, because its always very stable on the CPU).. So doing GPU substep 0, goes super fast, and looks super nice! Great project Mr. Core!

Ooh and another thing.. Is there anyway to define the collision distance for collision objects? My collision seems to happen quite far away from the actual polynormal...

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

Re: PhysX Fluid Simulation in Softimage ICE

Post by Mr.Core » 03 Apr 2012, 15:59

>>Usually (Mooootzooooid hehe) you define a area where the simulation take place..
Here is different approach, like Lagoa - physx doesnt require any containers. Honestly saying, in GPU mode ( due to memory restrictions on videocards ) there is invisible container defined by Approximate Fluid BBox Length parameter , I cant say in which way it is centered because I cant see px sources but you could consider something like boxcenter = first emit position. There is relation ship between bbox length and sim speed, less length = higher speed, but once particle will reach border of box - it will be dropped ( looks as fall down through all objects in the scene )

>>Is there anyway to define the collision distance for collision objects?
Try to manually change these parameters inside of the central compound:
http://clip2net.com/s/1LFrP

PeterCGS
Posts: 23
Joined: 21 Nov 2011, 23:00

Re: PhysX Fluid Simulation in Softimage ICE

Post by PeterCGS » 03 Apr 2012, 16:03

Thanks a bunch for the explanation!! :) Im very very excited about your fluid simulation!

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

Re: PhysX Fluid Simulation in Softimage ICE

Post by Mr.Core » 03 Apr 2012, 16:11

Thanks, but its not mine, its physx :D

PeterCGS
Posts: 23
Joined: 21 Nov 2011, 23:00

Re: PhysX Fluid Simulation in Softimage ICE

Post by PeterCGS » 03 Apr 2012, 21:34

Well, you know what I mean ;) I wil play with this baby for two-three weeks now. And post test meanwhile :)

PeterCGS
Posts: 23
Joined: 21 Nov 2011, 23:00

Re: PhysX Fluid Simulation in Softimage ICE

Post by PeterCGS » 04 Apr 2012, 19:46

Uhm.. Im doing different water scenes. So I created one model, which each contains some objects and a point cloud. Now I get a error message trying to run more than one pointcloud ice simulation, which is fine. But usually hiding the "inactive" pointclouds is enough (or disable the ICEtree) to stop them running, but I still get a "not more than one instance is allowed" error message... Now I solved this by deleting the inactive models, run the one I want active once, and then hit undo and hide the other icesimulations... Would it be possible to fix, so just hiding the "unused" ones would be enough?

I love it by the way.. First test http://www.highendcams.se/Forsrannan.mov

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

Re: PhysX Fluid Simulation in Softimage ICE

Post by origin » 05 Apr 2012, 01:29

cool, its for some 2.5d game?

PeterCGS
Posts: 23
Joined: 21 Nov 2011, 23:00

Re: PhysX Fluid Simulation in Softimage ICE

Post by PeterCGS » 05 Apr 2012, 10:37

No not a game, but some tests for a amusement park layout :)

Stumbled onto a problem with one test setup.. The particles seems to get stuck on the emitters when I use more than two emitters :/ I tried to get rid of them with a delete by volume node but it didnt seem to want to play.. Any ideas mr Core?

http://www.highendcams.se/Niagara.mov

PeterCGS
Posts: 23
Joined: 21 Nov 2011, 23:00

Re: PhysX Fluid Simulation in Softimage ICE

Post by PeterCGS » 05 Apr 2012, 10:56

Ok, tested some dynamic collision.. Get some funky movement, that I dont seem to be able to get rid of.. Will test more soon.. http://www.highendcams.se/The_Racer.mov

User avatar
druitre
Posts: 471
Joined: 25 Jun 2009, 23:35

Re: PhysX Fluid Simulation in Softimage ICE

Post by druitre » 05 Apr 2012, 11:27

PeterCGS wrote:No not a game, but some tests for a amusement park layout :)

Stumbled onto a problem with one test setup.. The particles seems to get stuck on the emitters when I use more than two emitters :/ I tried to get rid of them with a delete by volume node but it didnt seem to want to play.. Any ideas mr Core?

http://www.highendcams.se/Niagara.mov
mr Core said something about this in an earlier post -
mrCore wrote:>> cannot seem to add or delete particles or use age etc without the solver failing.
It is my limitation, I will finish these features after implosia's release and it must be the same stable as built-in particle simulation node:)
The sticking to geometry I can get rid of by lowering friction and restitution on obstacles to 0.005 and setting friction on fluid properties also to 0.005. possibly has drawbacks to use low values like that though...

By the way, thanks mr Core for that vorticity scene. It works but in my scene it gives me a lot of jittering/noise with particles changing values each frame apparently. I fixed it by hooking up a 'smooth color' compound and now it looks great.

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests