water effects

33
WATER EFFECTS

Upload: thora

Post on 24-Feb-2016

25 views

Category:

Documents


0 download

DESCRIPTION

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. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Water Effects

WATER EFFECTS

Page 2: Water Effects

Breakdown Background

Review – terrain and bump mapping What is water rendering?

Water Rendering Reflection Refraction

Techniques Lakes, Oceans Displacement

Page 3: Water Effects

Recommended Reading Real-Time Rendering doesn’t have

anything specific Review reflection, refraction, cube maps

Page 4: Water Effects

Background

Page 5: Water Effects

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

Page 6: Water Effects

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

Page 7: Water Effects

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

Page 8: Water Effects

Advanced Examples Bioshock

http://www.youtube.com/watch?v=t-utU84zp-Q

From Dust http://www.youtube.com/watch?v=gSOQGa

zo7Oo

Page 9: Water Effects

Lake Rendering Lake rendering is

for small bodies of water

No large waves usually involved

Page 10: Water Effects

Ocean Rendering Ocean rendering

is for larger bodies of water

Waves are the required for ocean rendering

Page 11: Water Effects

Questions?

Page 12: Water Effects

Water Rendering

Page 13: Water Effects

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

Page 14: Water Effects

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

Page 15: Water Effects

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

Page 16: Water Effects

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

Page 17: Water Effects

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

Page 18: Water Effects

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

Page 19: Water Effects

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

Page 20: Water Effects

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

Page 21: Water Effects

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

Page 22: Water Effects

Questions?

Page 23: Water Effects

Techniques

Page 24: Water Effects

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

Page 25: Water Effects

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

Page 26: Water Effects

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

Page 27: Water Effects

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

Page 28: Water Effects

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

Page 29: Water Effects

Wave Crests For ocean water, we normally have wave

crests White at the top of waves

Can be height based, or steepness based

Page 30: Water Effects

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

Page 31: Water Effects

Questions?

Page 32: Water Effects

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

Page 33: Water Effects

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