SLIDE 1
Texture mapping World/object coordinates 2D/3D Sources : scanners, - - PowerPoint PPT Presentation
Texture mapping World/object coordinates 2D/3D Sources : scanners, - - PowerPoint PPT Presentation
Texture mapping World/object coordinates 2D/3D Sources : scanners, raytracers Mapping one object pixel to a texture pixel Object parameterization Planar map shape Planar map shape Planar map shape Cylindrical map shape Cylindrical map
SLIDE 2
SLIDE 3
World/object coordinates
SLIDE 4
2D/3D
SLIDE 5
Sources : scanners, raytracers
SLIDE 6
Mapping one object pixel to a texture pixel
SLIDE 7
Object parameterization
SLIDE 8
Planar map shape
SLIDE 9
Planar map shape
SLIDE 10
Planar map shape
SLIDE 11
Cylindrical map shape
SLIDE 12
Cylindrical map shape
SLIDE 13
Cylindrical map shape
SLIDE 14
Spherical map shape
SLIDE 15
Spherical map shape
SLIDE 16
Spherical map shape
SLIDE 17
Cube map shape
SLIDE 18
SLIDE 19
Cube map shape
SLIDE 20
What do we get from the texture?
SLIDE 21
Parametric patches
SLIDE 22
Parametric patches
SLIDE 23
Parametric patches
SLIDE 24
Parameterized cube
SLIDE 25
Non-linear mapping
SLIDE 26
Triangular meshes
- One texture coordinate per vertex
- Regular parameterization of the mesh
- Requirements:
– Continuous – Small angular deformations – Small area deformations – Covers the entire mesh – In practice: at most two
SLIDE 27
Triangular mesh example
SLIDE 28
Singularities (poles)
SLIDE 29
Bump mapping
SLIDE 30
Examples
SLIDE 31
Bump mapping
- Input = normal map (nx, ny, nz)
- Local frame:
– z = geometric normal – x,y = tangent, bitangent
Follow the texture coordinates!
SLIDE 32
Bump mapping
- Example : note how blue (z) is dominant
SLIDE 33
Bump mapping
- Shading normal : local frame
- Light, eye: global frame
- Move everything to the same frame
- [TBN]: transformation matrix
– To inverse, or not to inverse?
- Note:
– textures in [0,1]3 – normals in [-1,1]3
SLIDE 34
Bump mapping
SLIDE 35
Displacement mapping
SLIDE 36
Displacement mapping: how?
- Not in the fragment shader
– Except towards the inside? – Candidate for tesselation shader
- Easier with other rendering methods
– ray-tracing
SLIDE 37
Relief textures
- displacement mapping extreme case
SLIDE 38
Relief textures
- How?
- Warp textures before mapping
- Or follow rays in a height field
- Polygons = convex hull
SLIDE 39
Environment mapping
SLIDE 40
Raytracing/Env. mapping
SLIDE 41
Raytracing/Env. mapping
SLIDE 42
SLIDE 43
Environment mapping
- Texture = distant light
- Parameterization: cube, sphere
- Incoming ray + reflection = outgoing ray
- Query texture in this direction
SLIDE 44
Environment mapping
Example environment map (spherical parameterization)
SLIDE 45
Environment mapping
SLIDE 46
Environment mapping
- Can also work with refracted rays
- Only one interface
– huge approximation
SLIDE 47
Environment mapping
SLIDE 48
Environment mapping
SLIDE 49
Aliasing
SLIDE 50
Under-sampling
SLIDE 51
Need pre-filtering
SLIDE 52
Multiple samples per pixel
SLIDE 53
SLIDE 54
SLIDE 55
SLIDE 56
SLIDE 57
SLIDE 58
Aliasing
- Texture + distance = aliasing
– Looks bad – Multi-sampling is not enough
- Color textures: can pre-filter
- Normal maps, height maps:
– Pre-filtering doesn’t make sense – Open research problem
SLIDE 59
3d textures
SLIDE 60
3D parameterization
SLIDE 61
Examples: distance to a plane
SLIDE 62
Distance to a line
SLIDE 63
Color ramps, sinus…
SLIDE 64
Color-table
SLIDE 65
Noise is useful
SLIDE 66
SLIDE 67
SLIDE 68
SLIDE 69
Simplex noise
- Same as gradient noise
- Use a simplex instead of a cube
- 3D: tetrahedron + gradient interpolation
- Underlying structure is invisible
http://en.wikipedia.org/wiki/Simplex_noise
SLIDE 70
Frequency
8 16 32
SLIDE 71
5 octaves together
Persistence = 0.5
SLIDE 72
5 octaves together
Persistence = 0.2
SLIDE 73
Noise
- Parameters :
– Number of octaves – Amplitude of first octave – Persistence: ratio amplitude octaves
- Geometric sequence
– Lacunarity: ratio of octave periods
SLIDE 74
Noise
- Often compared to salt in cooking
- Only noise: not very good
- 3D textures without noise: a bit bland
- Combination textures 3D + noise
– Really interesting
SLIDE 75
Procedural textures
SLIDE 76
Perturbations
SLIDE 77
SLIDE 78
SLIDE 79
SLIDE 80
SLIDE 81
SLIDE 82
Procedural textures + noise
- Not limited to color
- Normals, material parameters...
- Regular structure + a bit of noise
– Wood, bricks, floor tiles...
- Filtering / anti-aliasing : harder, but
necessary
SLIDE 83
Procedural textures for object definition
SLIDE 84