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

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

    20-Dec-2015
  • Category

    Documents

  • view

    221
  • download

    3

Transcript of Order-Independent Texture Synthesis Li-Yi Wei Marc Levoy Gcafe 1/30/2003.

Order-Independent Order-Independent Texture SynthesisTexture Synthesis

Li-Yi Wei Marc Levoy

Gcafe 1/30/2003

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

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

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)☺

ExampleExample

Generation 2 Generation 1 Generation 0

ExampleExample

Level 3

Level 2

Level 1

Level 0

Generation 2 Generation 1 Generation 0

Single PolygonSingle Polygon

Rendering Mipmap Texture

19% requested23% computed

QuakeQuake

Texture 64 64Unnatural repetition

Texture 512 512Less repetition

Ray CastingRay Casting

Scene Texture

Simulation ResultSimulation Result

Future WorkFuture Work

Implementation as fragment shader☻

EndEnd

OverviewOverview

Procedurally Statistical Texture Synthesis– algorithm– architecture

Applications– procedural shader– interactive tools– texture mapping hardware

Texture MappingTexture Mapping

• Bottleneck in graphics pipeline– computation– texture memory access

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

texture

image

How It WorksHow It Works

noise

Input pyramid

noise

Output pyramid

Search

Copy

GoalGoal

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

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

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

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

Implementation : CacheImplementation : Cache

• no full pyramid required, use cache instead

• output determined solely by lowest resolution

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

Cache Footprint : Single PixelCache Footprint : Single Pixel

Level 3 Level 2 Level 1 Level 0

Generation 2

Generation 1

Generation 0

Cache Footprint : SCache Footprint : S

Level 3 Level 2 Level 1 Level 0

Generation 2

Generation 1

Generation 0

Cache Footprint : SphereCache Footprint : Sphere

Level 3 Level 2 Level 1 Level 0

Generation 2

Generation 1

Generation 0

Cache Footprint : RandomCache Footprint : Random

Level 3 Level 2 Level 1 Level 0

Generation 2

Generation 1

Generation 0

Cache Footprint: Cache Footprint: Single PixelSingle Pixel

Level 3

Level 2

Level 1

Level 0

Generation 2 Generation 1 Generation 0

1148 pixels!

Cache Footprint:Cache Footprint:Poisson PointsPoisson Points

Level 3

Level 2

Level 1

Level 0

Generation 2 Generation 1 Generation 0

Cache Footprint:Cache Footprint:Circular PatternCircular Pattern

Level 3

Level 2

Level 1

Level 0

Generation 2 Generation 1 Generation 0

Cache Usage StatisticsCache Usage Statistics

Percentage of input requested

Per

cent

age

of c

ache

use

d

random

sphere

ideal (linear)

Cache CoherenceCache Coherence

Quality ComparisonQuality Comparison

old new

QuakeQuake

Texture 64 64 Texture 512 512

Input

44% requested48% computed

QuickTime VRQuickTime VR

Original Result

Input

invisible

Simulation ResultSimulation Result

Architecture DesignArchitecture Design

PitfallsPitfalls

• not feasible for current hardware

• can only be applied to repeating patterns

Finished WorkFinished Work

• Verification using an infinite cache

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

MotivationMotivation

Texture mapping is important

Texture mapping can be a bottleneck

Solution: Texture Mapping by Synthesis

Hardware TrendHardware Trend

Computation >> Memory Speed

• Transform memory access into computation