EVGA GTX 580 Classified Utra Review
0 Members and 1 Guest are viewing this topic.
This is a project I've been playing with the last month or two (after getting sacked when Free Radical went bankrupt..). I did the basic parts of GPU-based 'fluid over terrain' simulation code a couple of years ago but never had time to make it actually work and do something with it - until now.The project's main executable, RiverSim.exe, has two modes:Simulation mode - lets you load the terrain (from heightmap), springs (water sources), etc, and will then simulate flowing water. It does that on GPU so it can handle larger heightmaps (4096x4096 or probably even 8k x 8k if the graphics card can handle it) in.. well, near real-time - which is not something easily done on a regular few-core PC CPU. It will then save this data (water heights, velocities and a bit of some other info) for later use by the actual renderer.The main catch is that this data can then be used by a game (or whatever) to relatively cheaply render flowing water without actually doing any intensive fluid simulation - and still provide the appearance of realistic moving water. The data is just a water heightmap with additional info for velocities, etc, and can be rendered using modified terrain rendering code (and used for collision detection in the same way as for terrain).The other mode is the 3D preview mode - it will load that data and let you fly around in 3D with a couple of effects that make the water appear to flow. It also does a simple (and cheap) surface wave simulation, which lets you interact with water flow and makes it look a tad more realistic. Rendering technique used here is not nearly as optimal as it could be, but allows for fast switching between Simulation<->3DPreview modes. (Some future version will hopefully let you run the simulator while previewing it in 3D at the same time!)