[Solved] I need some fluid related suggestions

xius

04-11-2009 19:05:57

Hi, I have the project which is heavily based on PhysX fluid. I've (as you could guess) stumbled upon some problems.

1) Right now it's rendered as a bunch of particles (SimpleRenderable) and I don't see how could it look any better? It doesn't need to be a vivid reminiscence of the real one but it should look somehow more... like a single object? It's an OGRE thing, I know... but you are working with Physx here so that some of you may have a concrete way to achieve it.

2) PhysX fluid doesn't interact with dynamic objects, it's unable to push anything. At least I haven't succeeded yet. How to fix this? Force fields? I don't like it... For what is the "TWOWAY" tag then?

Thanks in advance! I hope there are viable solutions.

Also, I apologize to betajaen for not responding in one of my other threads. Even though, my answer would have been really useless newbish piece of code... I simply forgot and don't want to look like a #&*@. :roll:

betajaen

04-11-2009 20:31:37

1. Ageia/NVIDIA dropped the code to render the fluid as a mesh. You could look into volume rendering (basically rendering particles as a mesh); marching cubes for example. There are some examples in the main forums, and you can find about it on the internet - obviously.

2. According to the documentation, you need to set both NX_F_STATIC and the NX_F_DYNAMIC (I'm assuming your not using NxOgre) flags. Have a look at the PhysXDocumentation.chm (it's in the start menu), page Fluids/Interaction with Rigid Bodies.

Don't worry about it.

xius

11-11-2009 18:10:41

1) Volume rendering indeed! Thanks, that's what I was looking for. (marching cubes seem perfect, too)

2) I explained my problem in a bit clunky way, it seems. But your answer forced me to look in the documentation (which I'm reading very often, but I absolutely understand you can't presume this ;)) once more and d'oh, I've found my bug!
I added NX_SF_FLUID_TWOWAY to the NxActorDesc, not NxShapeDesc. :) Now it works perfect, exactly how I imagined. Thank you again.