1 / 12

Real-time rendering of water and bubbles

Real-time rendering of water and bubbles. William Moss Advanced Rendering Course Project December 4 th , 2008. Desired Effects. Water Local reflections Refraction External Lighting Fresnel Effect Bubbles Refraction External Lighting ( specular highlight). Water Effects.

gaenor
Download Presentation

Real-time rendering of water and bubbles

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Real-time rendering of water and bubbles William Moss Advanced Rendering Course Project December 4th, 2008

  2. Desired Effects • Water • Local reflections • Refraction • External Lighting • Fresnel Effect • Bubbles • Refraction • External Lighting (specular highlight)

  3. Water Effects

  4. Local Reflection • Model water surface as a mirror • Reflect the scene over the rest water height • Clip • Render to a texture

  5. Refraction • Model water surface as a plane • Clip everything below water surface • Scale along vertical direction by 1/1.33 • Render to a texture

  6. Texture to Surface • Find screen position of undisplaced water surface position • Offset by the normal scaled by surface displacement • Lookup in the texture • tex2D(textureMap, screenPos.xy – displacement * normal.xz);

  7. External Lighting • Simple Phong model for specular highlights • Assume light is coming from infinitely far away (as in the sun)

  8. Fresnel Effect • Probability a photon is reflected or transmitted • Dependent on the incident angle • Formula is expensive, implemented as a 1D texture lookup

  9. Bubble Effects

  10. Refraction • Model bubble as one sided hemisphere • Refract the ray from the eye • Calculate the intersection with the ground plane • Lookup in a texture

  11. External Lighting • Simple Phong model for specular highlights • Assume light is coming from infinitely far away (as in the sun)

  12. Results Runs at ~30-40fps on my laptop Shaders written in NVidia Cg

More Related