Fluid rendering

syedhs

17-01-2007 19:35:14

I am wondering, how is it done?

In PhysX documentation, fluid rendering is done using boxes - yes you can make it smaller by reducing the radius but they are still boxes!

Question: How are you going to render them so that they satisfactorily look like pool of blood, or water spilled from a bucket? Perhaps lots of tiny and semi-transparent spheres? Just curious to know of anyone's experience of rendering this successfully :)

betajaen

17-01-2007 20:16:20

I think the best effect could be some shader effect which would create some average mesh between droplets, pretty much like in the CellFactor demos (the exploding water tank sequence).

Now if Ageia could silently email me the source code to that, I'd be very happy ;)

syedhs

18-01-2007 04:08:37

Yes.. why dont they just put down the source code in the documentation.. :wink:

Your shader solution seems to be make sense, but I have no idea on how to do it :lol: How about rendering fluid as if it is a cloth? Just replace cloth's vertices with fluid's particle position. But that is just a pure random thought and I am damn lucky to get it completed this way. :)

syedhs

27-01-2007 06:30:07

Okay a few days ago I received a pointer from Ageia's discussion forum that indeed there is an example of rendering fluid - it is in Training 904. I didn't notice it first because I was reading the Windows help documentation (.chm) and it only has 901-903.

betajaen

27-01-2007 09:23:07

I know, I've been implementing it. It's quite similar to how you render the cloth, PhysX generates the mesh for you. But it's a little more complicated than that.

syedhs

27-01-2007 12:26:16


I know, I've been implementing it. It's quite similar to how you render the cloth, PhysX generates the mesh for you. But it's a little more complicated than that.

I am going to convert it to Ogre, but how is yours - is it usable?

betajaen

27-01-2007 18:23:25

Barely. A mesh is generated on screen, but it doesn't look like water. However it is quite natural looking so I guess I have the camera view projection wrong - some how.