WCG MV

Friday, January 05, 2007

Simple Realtime Fluid Simulation On GPU

Copyright: http://realtime-watercolor.blogspot.com

Realtime fluid simulation is a hot topic of computer graphics. It is also the foundation of computer-generated watercolor. Here I write a simple realtime fluid simulation demo using D3D9+HLSL(using VS1.1 and PS2.0). Following are some screen-shots:

When running, the demo showes one Chinese character 'REN':






















Then when you use mouse to drag the Chinese character, it will flow along your mouse's direction as a fluid:






















At last, the fluid will be stabled and become actionless:






















If you drag the Chinese character along another direction, then it will flow along different direction:






















Ok, that's all! In this demo I use a simplied physical model to simulate the fluid, the effect seems to not bad, hoho, and the performance is well. My video card is Intel(R) 82945G, and it runs quickly in my machine. So the demo is not required the quite new and high-end hardware. Supporting VS1.1 and PS2.0 is OK!

1 comment:

Anonymous said...

Well said.