Particle Cache and (Almost) Real-time Volume Rendering


#61

Thanks for all the feedback. Something should be clarified here.

About the grid resolution. Default is 64 x 64 x 64, definitely it can be higher. The limit is how much display card memory you have. Old hardware has 128 mb, it is safe to use 64 * 128 * 64 or so. My macbook has GeForce 9400 256 mb, it can carry 128 * 128 * 128. I tested it on a desktop with GeForce 9600 512 Mb, it can run at 128 * 256 * 128. You see all numbers are power-of-two. Non-power-of-two grid resolution should be working on those new hardware, but not tested yet, so it blocks to use non-power-of-two grid resolution.

About the memory, zFluid needs a lot memory to run 128 * 256 * 128 grid, I will recommend to have a 2G RAM desktop to do anything serious.

About the speed, it is a lot faster than Maya fluid indeed. Because speed is affected by a lot things, and I never tested Maya 3D fluid with grid higher than 128, it is hard to know exactly how many times faster it is. If you have a lot heavy poly mesh as source or obstacle, simulation will slow down. I have to use a 50K triangle mesh as source for a 128 * 256 * 128 grid, it is down to 0.2 fps, not good. So use low mesh as source and obstacles. No need to have mush details.

About the source and obstacles, zFluid can use poly mesh as source to emit fluid into the solver or obstacle to block the fluid. To do that, select meshes, shift-select the particle, choose menu attach obstacle or object as source. Connection will be made.

About preview, there is a shoTex attrib of the grid, 0 is no texture. If you set to 1, it will display a slice of density field when you playback. Change slice Id can change where to display the slice. That is the only way you can preview the result for now. Of course moving of the particle is some sort of viz too.

About rendering, zFluid is just a solver, need to save out cache files per-frame, and render with zSmoke. Current public zSmoke does NOT support that kind of cache. Please wait for a new release.

About the doc, it is quite a large piece. zFliud is not that simple to explain howto. Hope I can release some notes soon.

Support for other maya version on windows and mac should wait.


#62

Is there a possibility of a PC Maya 2008 x32 version??? :slight_smile: I would love to test this out!


#63

omg seth, maya 2008 is SO last year


#64

hahahahaha, yeah … well … when your employer won’t shell out the loot to upgrade us we’re stuck with sticks and stones to play with :slight_smile:


#65

Just updated zFluid to 1.7.3 with doc. zSmoke rendering, all versions on 32-bit windows, 2009 on mac still need wait.


#66

i only see x64 for PC … Is there a way to use the x86.bundle on PC or is that Mac only? … Forgive me for being dumb, I’ve never really used Maya a Mac :slight_smile:


#67

Now it supports 2009 on intel x86 mac, i checked the API version is 200904, so it is sp1. It works as expected so far.

Edit:

Report about cannot load Cg library on Mac, think need to install Cg Toolkit downloaded from nVidia.


#68

Any news about a 32bit version for 2009 or 2010?


#69

Im geting loading errors as well - OSX intel Maya 2009.


#70

You should install Cg.framework and build OpenEXR on your mac. Cg is easy, Building OpenEXR is not quite easy for artists. Someone got it working by copying those .dylib files to exact path.

Anyway, zFluid now supports win32 2009 and 2010. Since most people still using 32-bit windows now, hope that will get more feedback soon.


#71

so the x64.mll in the zfluid zip are w32 really?


#72

x64 is 64-bit, x86 is 32-bit


#73

Hey zsmoke,

thanks for letting us test this beauty plugin out for you. I hope you get the feedback you need to inspire yourself further. I’ve had two different experiences with this, one, where it seemed, like I could change the resolution to whatever, and the sim would stay the same, and the second, really painful one was, I think I had it set at 256^3, and I couldn’t even get enough get my mouse back to do anything. So, I’m not sure. What specifically would you like us to test? It seems to be pretty fast at what it does, but it is quite limited. I am also not totally sure I’m using it correctly, I can’t get the shotex to work, I’m basically only able to advect (I think) particles through a fluid volume.

Nonetheless, impressive work, and very comforting to know that Maya is capable of these kinds of things. Oh, and it’s also a lot of fun to play with collission objects in interactive dynamics mode.


#74

Thanks for your screenshot, I see the triangle used as emitter object, that is from old 1.5.1, which parameter update including shotex is broken, and vorticity confinement has wrong effect. Both is fixed in 1.7.3. Think you should update your zFluid to 1.7.3

If you create a demo set from the menu, it will bring a basic setting with one emitter inside 64^3 grid. One may get more complex simulation by connecting more emitters to particle system, emitting from moving objects, some obstacles, increasing the grid resolution.

About the resolution, it depends on your display memory and system ram. I never get 256^3 because no memory to allocate the opengl textures. You can get nothing be freezed screen if windows is using virtual memory on this. But lower grid like 128 256 128 should be enough for most simulations.

I want people to use zFluid to create complex particle simulation that cannot be achieved in traditional ways. Make sure it is stable to use in complex situation. Feel safe to render the particles for now, I will update zSmoke to deal with the zFluid cache rendering soon. Also it is fluid simulation a few times faster then Maya fluid. Of course it has quite limited controls for now. The work is yet to finish.

And you don’t need that dense mesh for obstacles, it slows down simulation heavily. The idea is using low mesh, breaking complex shape into multiple convex simpler parts, triangulate them and attach as fluid obstacles.

Some screenshots here

http://www.creativecrash.com/maya/downloads/scripts-plugins/dynamics/c/zfluid

1,7,3 should work like that.


#75

zhang jian, this is awesome stuff…i just asked for a new solver yesterday i guess :)… wish granted…i have to yet try this for that matter… if you can just help me out with this cause am real slow about what you have done so here it goes i have a dell precision laptop with 4gb ram and quadro fx 1600 card and its a core 2 duo… 64 bit windows os but maya 2009 32 bit… when i work with fluids in maya i fail to have a resolution of anything above 100 100 100 … it crashes if i go 120…so firstly would this be a good hardware to test this on…and secondly is there any way you can put up some video maybe as to how to use this properly and effectively…the way you would have intended this to be used…

thanks and cheers :bowdown:


#76

No need highend hardware to run zFluid. The code is mainly written on my Macbook, it is an entry level laptop. Video card is GeForce 9400M, so it only has 256 Mb shared memory. I can still run 128 x 128 x 64 grid with acceptable fps.

If you have latest card with 1G memory, you may set grid higher than 128 x 128 x 256, but it is not tested, I think that is a limit of grid you can allocate on hardware. That is different from Maya fluid, which lives in RAM.

You may notice zFluid need grid rez set to power-of-two, 32, 64, 128, that is due to old hardware does not allow non-power-of-two textures. That is waived on new hardware. I will test with non-power-of-two grid on next update. Should be helpful if it can set to 150 or something.

About crash, it is using some OpenGL extension, if your display driver is not up-to-date, it could crash because of low OpenGL core version. Downlaod and install latest drivers from nVidia should fix that. It should not crash if you just try the demo setup.

About how to use it. Think it is necessary to post some tutorial, video one, when I have time on that. Check out doc from site first.

Did some test, my macbook can run 128 x 128 x128 grid at 1.1 fps, think that is the limit if you have only 256 mb display memory.

Remember, one should playback from start to update any change of grid resolution and size.

This is proof:

http://cid-a6597afda81373ba.skydrive.live.com/self.aspx/Fluid/Snapshot%202010-01-24%2005-11-25.jpg


#77

256x256x256 solves at about 7 seconds a frame on my nvidia gtx 975. That’s 16,777,216 voxels so roughly 2.4 million voxels per second. That’s insane!

Nice work!


#78

Anyone here successfully installed on an intel mac? Im having problems with the openEXR stuff, as it appears there is the IlmBase 1.0.1 source code to build first before the openEXR, this is from the homepage openEXR.


#79

Glad to know it can go to that high. triple 256 means eight 4K textures reading and writing scores of times every frame. Incredible! But think that is the limit. 3D fluid simulation requires quite a lot resources.

And about OpenEXR on Mac, I heard about cannot compile on Snow Leopard, but copying dylib from older os can fix that. One can get the libs I am using. Compiled on 10.5.6 long time ago. I am still using 10.5.8 for now, so cannot test on 10.6.

Get it from:

http://cid-a6597afda81373ba.skydrive.live.com/self.aspx/documentations/openexr1.6.1%5E_precompiled%5E_intelx86.zip

Copy all files to /usr/local/lib should be fine.


#80

That worked, thanks a bunch!