order-independent texture synthesis

42
Order-Independent Order-Independent Texture Synthesis Texture Synthesis Li-Yi Wei Marc Levoy Gcafe 1/30/2003

Upload: silas

Post on 11-Jan-2016

46 views

Category:

Documents


0 download

DESCRIPTION

Order-Independent Texture Synthesis. Li-Yi Wei Marc Levoy. Gcafe 1/30/2003. Previous Work. Statistical Synthesis general, requires only a sample cannot be evaluated randomly on the fly Procedural Synthesis evaluation on the fly (e.g. Perlin noise) efficient - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Order-Independent  Texture Synthesis

Order-Independent Order-Independent Texture SynthesisTexture Synthesis

Li-Yi Wei Marc Levoy

Gcafe 1/30/2003

Page 2: Order-Independent  Texture Synthesis

Previous WorkPrevious Work

• Statistical Synthesisgeneral, requires only a sample

cannot be evaluated randomly on the fly

• Procedural Synthesisevaluation on the fly (e.g. Perlin noise)

efficient

less general, hard to set parameters

Page 3: Order-Independent  Texture Synthesis

GoalGoal

Combine Advantages from both Camps:– general as statistical methods

• generate new textures from a given example

– flexible as procedural methods• evaluate texels on demand

• result always identical regardless of evaluation order

Page 4: Order-Independent  Texture Synthesis

New AlgorithmNew Algorithm

Key Ideas:– multiple generations– neighborhood contains only old values

• lower generations, lower resolutions

– pyramidal cache

• Details:– see the paper (4 pages only)☺

Page 5: Order-Independent  Texture Synthesis

ExampleExample

Generation 2 Generation 1 Generation 0

Page 6: Order-Independent  Texture Synthesis

ExampleExample

Level 3

Level 2

Level 1

Level 0

Generation 2 Generation 1 Generation 0

Page 7: Order-Independent  Texture Synthesis

Single PolygonSingle Polygon

Rendering Mipmap Texture

19% requested23% computed

Page 8: Order-Independent  Texture Synthesis

QuakeQuake

Texture 64 64Unnatural repetition

Texture 512 512Less repetition

Page 9: Order-Independent  Texture Synthesis

Ray CastingRay Casting

Scene Texture

Page 10: Order-Independent  Texture Synthesis

Simulation ResultSimulation Result

Page 11: Order-Independent  Texture Synthesis

Future WorkFuture Work

Implementation as fragment shader☻

Page 12: Order-Independent  Texture Synthesis

EndEnd

Page 13: Order-Independent  Texture Synthesis
Page 14: Order-Independent  Texture Synthesis

OverviewOverview

Procedurally Statistical Texture Synthesis– algorithm– architecture

Applications– procedural shader– interactive tools– texture mapping hardware

Page 15: Order-Independent  Texture Synthesis

Texture MappingTexture Mapping

• Bottleneck in graphics pipeline– computation– texture memory access

• Solutions– caching– pre-fetching– compression [VQ]

texture

image

Page 16: Order-Independent  Texture Synthesis

How It WorksHow It Works

noise

Input pyramid

noise

Output pyramid

Search

Copy

Page 17: Order-Independent  Texture Synthesis

GoalGoal

• Combine advantages from both camps– general– independent texel evaluation

Page 18: Order-Independent  Texture Synthesis

Order-Independent Order-Independent Texture SynthesisTexture Synthesis

• Simple modifications of our old algorithm– evaluate pixel in any order– consistent result (given the same initial value)– time complexity depends only on neighborhood size

(not on output texture size)

• interface much like procedural synthesis– greater flexibility– more computation

Page 19: Order-Independent  Texture Synthesis

Problem with Old AlgorithmProblem with Old Algorithm

dependency graph

cycles in the dependency graph!

level row col

0 -1 0

0 +1 0

0 0 -1

0 0 +1

-1 0 0

Page 20: Order-Independent  Texture Synthesis

New AlgorithmNew Algorithm

level row col generation

0 -1 0 -1

0 +1 0 -1

0 0 -1 -1

0 0 +1 -1

-1 0 0 newest

dependency graph

Keep multiple generationsAcyclic dependency graph

Order-independent evaluation

Page 21: Order-Independent  Texture Synthesis

Implementation : CacheImplementation : Cache

• no full pyramid required, use cache instead

• output determined solely by lowest resolution

Page 22: Order-Independent  Texture Synthesis

AlgorithmAlgorithm

level row col generation

L x-1 y g-1

L x+1 y g-1

L x y-1 g-1

L x y+1 g-1

L-1 x y g

evaluate (level=L, row = x, col = y, generation = g)

Cached?evaluate (L, x-1, y, g-1)

2. Collect neighborhood

3. Find best match

1. If in cache, return it

Page 23: Order-Independent  Texture Synthesis

Cache Footprint : Single PixelCache Footprint : Single Pixel

Level 3 Level 2 Level 1 Level 0

Generation 2

Generation 1

Generation 0

Page 24: Order-Independent  Texture Synthesis

Cache Footprint : SCache Footprint : S

Level 3 Level 2 Level 1 Level 0

Generation 2

Generation 1

Generation 0

Page 25: Order-Independent  Texture Synthesis

Cache Footprint : SphereCache Footprint : Sphere

Level 3 Level 2 Level 1 Level 0

Generation 2

Generation 1

Generation 0

Page 26: Order-Independent  Texture Synthesis

Cache Footprint : RandomCache Footprint : Random

Level 3 Level 2 Level 1 Level 0

Generation 2

Generation 1

Generation 0

Page 27: Order-Independent  Texture Synthesis

Cache Footprint: Cache Footprint: Single PixelSingle Pixel

Level 3

Level 2

Level 1

Level 0

Generation 2 Generation 1 Generation 0

1148 pixels!

Page 28: Order-Independent  Texture Synthesis

Cache Footprint:Cache Footprint:Poisson PointsPoisson Points

Level 3

Level 2

Level 1

Level 0

Generation 2 Generation 1 Generation 0

Page 29: Order-Independent  Texture Synthesis

Cache Footprint:Cache Footprint:Circular PatternCircular Pattern

Level 3

Level 2

Level 1

Level 0

Generation 2 Generation 1 Generation 0

Page 30: Order-Independent  Texture Synthesis

Cache Usage StatisticsCache Usage Statistics

Percentage of input requested

Per

cent

age

of c

ache

use

d

random

sphere

ideal (linear)

Page 31: Order-Independent  Texture Synthesis

Cache CoherenceCache Coherence

Page 32: Order-Independent  Texture Synthesis

Quality ComparisonQuality Comparison

old new

Page 33: Order-Independent  Texture Synthesis

QuakeQuake

Texture 64 64 Texture 512 512

Input

44% requested48% computed

Page 34: Order-Independent  Texture Synthesis

QuickTime VRQuickTime VR

Original Result

Input

invisible

Page 35: Order-Independent  Texture Synthesis

Simulation ResultSimulation Result

Page 36: Order-Independent  Texture Synthesis

Architecture DesignArchitecture Design

Page 37: Order-Independent  Texture Synthesis

PitfallsPitfalls

• not feasible for current hardware

• can only be applied to repeating patterns

Page 38: Order-Independent  Texture Synthesis

Finished WorkFinished Work

• Verification using an infinite cache

Page 39: Order-Independent  Texture Synthesis

Ongoing WorkOngoing Work

• Measuring and understanding various parameters– cache size, associativity, replacement policy– evaluation order for missing pixels (register

allocation)– benchmarking

• Combination with patch-based texture synthesis– patch boundaries?– complicate caching behavior

Page 40: Order-Independent  Texture Synthesis
Page 41: Order-Independent  Texture Synthesis

MotivationMotivation

Texture mapping is important

Texture mapping can be a bottleneck

Solution: Texture Mapping by Synthesis

Page 42: Order-Independent  Texture Synthesis

Hardware TrendHardware Trend

Computation >> Memory Speed

• Transform memory access into computation