1 / 33

Water Effects

Water Effects. Breakdown. Background Review – terrain and bump mapping What is water rendering? Water Rendering Reflection Refraction Techniques Lakes, Oceans Displacement. Recommended Reading. Real-Time Rendering doesn’t have anything specific Review reflection, refraction, cube maps.

thora
Download Presentation

Water Effects

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. Water Effects

  2. Breakdown • Background • Review – terrain and bump mapping • What is water rendering? • Water Rendering • Reflection • Refraction • Techniques • Lakes, Oceans • Displacement

  3. Recommended Reading • Real-Time Rendering doesn’t have anything specific • Review reflection, refraction, cube maps

  4. Background

  5. Review – Terrain Rendering • Terrain rendering is the process of rendering realistic world surfaces • Can be real-world or alien world • The goal of terrain rendering is to provide an outdoor environment for your game • Even cityscapes can have underlying terrain • Terrain rendering generally focuses on the development of hills, valleys, mountains, etc. • These can be procedurally generated

  6. Bump Mapping • Bump mapping is the technique used to add detail to a surface • Think roughness / texture • Bump mapping is the simplest technique for adding detail using textures

  7. What is Water Rendering? • Water rendering is actually a collection of techniques that allow us to render realistic-ish water like effects • Remember in games we want real-time performance • Depending on the type of water, you need to adopt a different technique to provide a realistic effect • Generally fall into two categories for normal water • Lake and ocean

  8. Advanced Examples • Bioshock • http://www.youtube.com/watch?v=t-utU84zp-Q • From Dust • http://www.youtube.com/watch?v=gSOQGazo7Oo

  9. Lake Rendering • Lake rendering is for small bodies of water • No large waves usually involved

  10. Ocean Rendering • Ocean rendering is for larger bodies of water • Waves are the required for ocean rendering

  11. Questions?

  12. Water Rendering

  13. Cube Maps • Cube (or environment) maps are a form of texture used for reflection techniques • Cube maps are a lookup technique we use to determine the colour of a reflective pixel

  14. Sky Dome • Sky domes or sky boxes are one of the techniques that utilise cube maps • Render the cube with the cube map • Move the cube with the camera • One of the standard effects in a 3D game

  15. Core Concepts • Two core concepts are required when dealing with water • Reflection • Refraction • We have been talking about these ideas from a lighting point of view already • Light reflection • Light absortion

  16. Reflection • Reflection from the water means we have to render on the water plane what we would see from a different angle • A sees the view from B on the pane • This involves a two stage view process

  17. Reflection Map • Our reflection view render provides us with a reflection map texture we can use on our water • We just use this as a normal post-processing stage

  18. Refraction • Refraction is the view we see under the water • What is under the water is defined by the height of the water plane • We use clipping to create a further texture from the viewers viewpoint for what is under the water

  19. Refraction Map • The refraction stage creates another texture we can use in a post-process • The refraction map is blended with the reflection map to create the final water pixel colours

  20. Fresnel Term • Finally, we blend the two textures together using a blend weight that depends on the viewing angle • Fresnel Term • The greater the angle made by the eye position to the normal, the more reflection to use

  21. Final Colour • The final colour of a pixel on the water plane is determined by the blend of the reflection and refraction textures • On the right, ripples have been added by using a normal map

  22. Questions?

  23. Techniques

  24. Lake Water • Lake water is the commonest water type seen in games • Much cheaper to produce • Only need two triangles • Normal maps take care of the rippling effect • Combining reflection, refraction, and a normal map will provide you with a generally realistic effect of water

  25. Ripples • Ripples can be added to water using a normal map • Normal map just changes the normals at particular points • Blending normal maps, and moving texture coordinates will create a fairly realistic rippling effect

  26. Ocean Water • Ocean water may be required for larger bodies of water • Big difference with ocean water is the number and size of the waves • We can use the standard two triangle and normal map approach • Looks ok • Usually want a triangle grid and deform the positions to look like water • Think terrain

  27. Wave Deforming • To create wave effects, we just need to displace the heights of the individual vertices on the triangle grid • How we do this depends on the effect we want • Random • Use of blended heightmaps

  28. Specular Reflections • We can add further lighting effects by using specular lighting on the water plane • Really, we just use the same technique as standard specular lighting

  29. Wave Crests • For ocean water, we normally have wave crests • White at the top of waves • Can be height based, or steepness based

  30. Particle Water • Also possible to use particle effects to create other water types • Fountains, waterfalls • This can be extended into volumetric rendering • Talk to Lukasz

  31. Questions?

  32. To do this week… • Practical this week is on texturing • I need to tweak the one on WebCT a little • I know 3rd years have MAD CW due this week • Get it out of the way so you can move onto this one • I won’t be producing a practical on water effects • If interested, investigate yourself

  33. Summary • Realistic water rendering is quite a common feature in modern games • Key components are reflection and refraction • Number of other techniques can be used on top of this • Normal maps • Displacement • Particle effects also an option

More Related