OrderIndependent Texture Synthesis LiYi Wei Marc Levoy Gcafe










































- Slides: 42

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 less general, hard to set parameters

Goal 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 Algorithm Key Ideas: – multiple generations – neighborhood contains only old values • lower generations, lower resolutions – pyramidal cache • Details: – see the paper (4 pages only)☺

Example Generation 2 Generation 1 Generation 0

Example Level 3 Level 2 Level 1 Level 0 Generation 2 Generation 1 Generation 0

Single Polygon 19% requested 23% computed Rendering Mipmap Texture

Quake Texture 64 Unnatural repetition Texture 512 Less repetition

Ray Casting Scene Texture

Simulation Result

Future Work Implementation as fragment shader☻

End


Overview Procedurally Statistical Texture Synthesis – algorithm – architecture Applications – procedural shader – interactive tools – texture mapping hardware

Texture Mapping • Bottleneck in graphics pipeline – computation – texture memory access • Solutions – caching – pre-fetching – compression [VQ] texture image

How It Works Copy noise Search noise Input pyramid Output pyramid

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

Order-Independent Texture 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 Algorithm dependency graph level row col 0 -1 0 0 +1 0 0 0 -1 0 0 +1 -1 0 0 cycles in the dependency graph!

New Algorithm dependency graph Keep multiple generations Acyclic dependency graph level row col generation 0 -1 0 +1 0 -1 0 0 -1 -1 0 0 +1 -1 -1 0 0 newest Order-independent evaluation

Implementation : Cache • no full pyramid required, use cache instead • output determined solely by lowest resolution

Algorithm evaluate (level=L, row = x, col = y, generation = g) 1. If in cache, return it 2. Collect neighborhood level row col generation Cached? 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 3. Find best match evaluate (L, x-1, y, g-1)

Cache Footprint : Single Pixel Generation 2 Generation 1 Generation 0 Level 3 Level 2 Level 1 Level 0

Cache Footprint : S Generation 2 Generation 1 Generation 0 Level 3 Level 2 Level 1 Level 0

Cache Footprint : Sphere Generation 2 Generation 1 Generation 0 Level 3 Level 2 Level 1 Level 0

Cache Footprint : Random Generation 2 Generation 1 Generation 0 Level 3 Level 2 Level 1 Level 0

Cache Footprint: Single Pixel 1148 pixels! Level 3 Level 2 Level 1 Level 0 Generation 2 Generation 1 Generation 0

Cache Footprint: Poisson Points Level 3 Level 2 Level 1 Level 0 Generation 2 Generation 1 Generation 0

Cache Footprint: Circular Pattern Level 3 Level 2 Level 1 Level 0 Generation 2 Generation 1 Generation 0

Percentage of cache used Cache Usage Statistics random sphere ideal (linear) Percentage of input requested

Cache Coherence

Quality Comparison old new

Quake 44% requested 48% computed Input Texture 64 Texture 512

Quick. Time VR invisible Input Original Result

Simulation Result

Architecture Design

Pitfalls • not feasible for current hardware • can only be applied to repeating patterns

Finished Work • Verification using an infinite cache

Ongoing 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


Motivation Texture mapping is important Texture mapping can be a bottleneck Solution: Texture Mapping by Synthesis

Hardware Trend • Computation >> Memory Speed • Transform memory access into computation