ENVIRONMENT MAPPING. Kriglstein, WallnerEnvironment mapping2 INTRODUCTION What is environment mapping? Parameterization Prefiltering & Phong Model Fresnel.

Post on 15-Jan-2016

217 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

ENVIRONMENT MAPPING

Kriglstein, Wallner Environment mapping 2

INTRODUCTION

What is environment mapping?

Parameterization

Prefiltering & Phong Model

Fresnel Term

Environment mapped bump mapping

Environment mapping with OpenGL

Kriglstein, Wallner Environment mapping 3

What is environment mapping?

Kriglstein, Wallner Environment mapping 4

What is environment mapping?

Developed by Blinn and Newell (1976)Reflecting the surroundings on an objectDescribes the incoming or outgoing lightObjects can not reflect themselvesAnother problem is distortionCube mapping, spherical mapping,

parabolic mapping

Kriglstein, Wallner Environment mapping 5

What is environment mapping?

Kriglstein, Wallner Environment mapping 6

Parameterization

Directions

Texture coordinates

Kriglstein, Wallner Environment mapping 7

Parameterization

No recreation of the map for every frame

Easy creation of the map

Easy calculation of texture coordinates

Kriglstein, Wallner Environment mapping 8

Parameterization

Spherical Cubic

Parabolic

Kriglstein, Wallner Environment mapping 9

Sphere Maps

Kriglstein, Wallner Environment mapping 10

Sphere Maps

Kriglstein, Wallner Environment mapping 11

Sphere Maps

Kriglstein, Wallner Environment mapping 12

Sphere Maps

Kriglstein, Wallner Environment mapping 13

Sphere Maps

Disadvantages

Only suitable for original viewing directionDoesn´t reflect changes in the scene

Kriglstein, Wallner Environment mapping 14

Sphere Maps

Kriglstein, Wallner Environment mapping 15

Sphere Maps

Disadvantages

Only suitable for original viewing direction

Doesn´t reflect changes in the scene

Kriglstein, Wallner Environment mapping 16

Parameterization

Spherical

CubicParabolic

Kriglstein, Wallner Environment mapping 17

Cube Maps

Advantages

No warping step required

Viewpoint independent

Kriglstein, Wallner Environment mapping 18

Cube Maps

Kriglstein, Wallner Environment mapping 19

Cube Maps

Kriglstein, Wallner Environment mapping 20

Cube Maps

2

1

2

1

mtc

tmsc

s

Kriglstein, Wallner Environment mapping 21

Parameterization

Spherical

Cubic

Parabolic

Kriglstein, Wallner Environment mapping 22

Parabolic Maps

Kriglstein, Wallner Environment mapping 23

Phong Model

Linear combination of 3 components:

Diffuse

Ambient

Specular

Kriglstein, Wallner Environment mapping 24

Phong Model

Kriglstein, Wallner Environment mapping 25

Phong Model

Kriglstein, Wallner Environment mapping 26

Fresnel Term

2

2

2

2

)1)((

)1)((1

)(2

)(

cgc

cgc

cg

cgF

Kriglstein, Wallner Environment mapping 27

Fresnel Term

Reflectivity of a material depending on it`s optical density and angle of the incoming light.For metallic surfaces the incoming illumination = outgoing illumination.For non-metallic surfaces the angle of incoming light is important.

Kriglstein, Wallner Environment mapping 28

Fresnel Term

DiffuseMirrorout LLFL

Kriglstein, Wallner Environment mapping 29

Fresnel Term

Kriglstein, Wallner Environment mapping 30

Environment mapped bump mapping (EMBM)

Objects get more details

Is a possibility to represent plastically objects

Three different textures

Kriglstein, Wallner Environment mapping 31

Three different textures

1.Base

texture

2.Bump

map

3.Environment

map

Kriglstein, Wallner Environment mapping 32

Environment mapped bump mapping (EMBM)

Kriglstein, Wallner Environment mapping 33

Environment mapped bump mapping (EMBM)

Bump mapping with a light mapReal environmental bump mapping

Kriglstein, Wallner Environment mapping 34

Bump mapping with a light map

Kriglstein, Wallner Environment mapping 35

Environment mapped bump mapping (EMBM)

Bump mapping with a light map

Real environmental bump mapping

Kriglstein, Wallner Environment mapping 36

Real environmental bump mapping

Kriglstein, Wallner Environment mapping 37

Environment mapped bump mapping (EMBM)

Same effects with cube environment maps possible

Makes environment mapping possible in all directions

Non-cube environment mapped bump mapping is limited to few directions

Kriglstein, Wallner Environment mapping 38

OpenGL sphere mapping

Four steps:

Create texture

Define texture generation

Enable texture coordinate generation

Draw object

Kriglstein, Wallner Environment mapping 39

OpenGL Cube mapping

New extension Ext_texture_cube_map

Six images

Quadratic images

glCopySubTexImage2D

Kriglstein, Wallner Environment mapping 40

The End

Thank you, for your attention !!

top related