071204 / GPU Only II

previous | next

Got some very rough painting with CFD prototypes working...

Hybrid Adaptive Grid and Particle Based CFD

I'm still working out the details of the new GPU only engine through some rough prototyping which will converge into the finished engine. Initial tests of drawing with simple point emitters into a CFD grid have shown promising results.

Looks like the story will end with some coupling of my previous particle based physics/CFD engine with a grid based CFD which will be used for drawing. One thing is for sure, I'm going to be using a view/detail adaptive grid for computation which isn't going to be using any of the hardware tri-linear filtering. I'm going to try doing a single adaptive grid for both particles and drawing, but I might have to resort to my previous separate particle engine with a "fake" 2.5D CFD for screen pixels only. Either way I'm going to use the particle connectivity constrains to handle semi-rigid bodies and the compressible aspects of fluid flow.

Looks like the basic fast uniform grid based CFD is always texture limited and has a very bad ALU to TEX ratio. I'm hoping I can hide most all the extra math required for my non-uniform grid in texture fetch latency.

Also worked out a full design for frame remapping, fully dynamic L-system tree, and occlusion culling (using L-system tree pruning) all on the GPU with no CPU work other than setting up drawing calls. Dynamic allocation was tough to solve. Ultimately I decided upon a method very similar to the histo-pyramids method by Gernot Ziegler. My concept uses two histograms and requires an extra mipmap expansion pass (mipmap generation in reverse). I had to accept one problem however, in the case where I have more new nodes than free nodes available in the free node cache, there is a random pruning of new nodes to fill the free nodes. I'm trying to see if I can adjust so the random pruning removes largest Z nodes first...

Lots more work to go...