Hey guys,
Just a quick post to link a demo that I wrote a few months back doing some simple 2.5D fluid simulation. It's a basic iterative Kass-Miller-like algorithm similar to what they do in this paper.
All of the physics and shading is done on a single GPU using the RapidMind development platform (through the OpenGL backend in this case). Incidentally, it looks like there's a picture of the demo up on the main RapidMind site now as well (we demoed it at SIGGRAPH and Supercomputer this year)
Some features:
Anyways here's the video link: Fluids Video (~130MB divx IIRC).
Do note that there are a few visible artifacts due to the refraction approximation (most notable at water edges where they will sometimes appear too dark) which are easily addressed by using something fancier like Parallax Occlusion Mapping, Relief Mapping, Cone Step Mapping, Per-Pixel Displacement Mapping, etc.
Unfortunately I can't post the binary right now as it is dependent on the RapidMind platform DLLs, for which I'm still discussion some licensing details. Hopefully I'll have something worked out soon, but I figured I'd post the video in the mean time.
For now, you'll have to just take my word that it runs at 60+fps on a single 8800GTX at 1680x1050, 4xAA with the full 2mil polygons. The video above was captured live using FRAPS.
Enjoy!
Just a quick post to link a demo that I wrote a few months back doing some simple 2.5D fluid simulation. It's a basic iterative Kass-Miller-like algorithm similar to what they do in this paper.
All of the physics and shading is done on a single GPU using the RapidMind development platform (through the OpenGL backend in this case). Incidentally, it looks like there's a picture of the demo up on the main RapidMind site now as well (we demoed it at SIGGRAPH and Supercomputer this year)
Some features:
- 1024x1024 fluid height-field, several physics iterations per frame
- High-resolution normals generated dynamically from this height field
- Geometry optionally down-sampled, but this actually isn't enabled in the video below since the G80 can rip through 2mil dynamic polygons per frame in addition to all of the rest of the physics and shading calculations
- Variance shadow maps (of course!)
- Ambient occlusion generated at startup (takes about 1 second) for static geometry using VSMs (similar to GPU Gems 2 method)
- Reflection via cube map
- Refraction via parallax-mapping-like two-planes approximation
- Distance desaturation (fog-like)
- Light and surface shaders are completely disjoint and combined dynamically at runtime using RapidMind shader algebra. This makes things like the AO generation code trivial (two lines long) given the already-written VSM light shader.
- Terrain and water rendered as a single mesh
- All physics written from scratch in 2 days
- Rendering written in about 2 weeks
Anyways here's the video link: Fluids Video (~130MB divx IIRC).
Do note that there are a few visible artifacts due to the refraction approximation (most notable at water edges where they will sometimes appear too dark) which are easily addressed by using something fancier like Parallax Occlusion Mapping, Relief Mapping, Cone Step Mapping, Per-Pixel Displacement Mapping, etc.
Unfortunately I can't post the binary right now as it is dependent on the RapidMind platform DLLs, for which I'm still discussion some licensing details. Hopefully I'll have something worked out soon, but I figured I'd post the video in the mean time.
For now, you'll have to just take my word that it runs at 60+fps on a single 8800GTX at 1680x1050, 4xAA with the full 2mil polygons. The video above was captured live using FRAPS.
Enjoy!
Last edited by a moderator: