420 likes | 512 Vues
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
E N D
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
Level 3 Level 2 Level 1 Level 0 Generation 2 Generation 1 Generation 0 Example
Single Polygon 19% requested 23% computed Rendering Mipmap Texture
Quake Texture 64 64 Unnatural repetition Texture 512 512 Less repetition
Ray Casting Scene Texture
Future Work Implementation as fragment shader☻
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
Copy Search noise Input pyramid Output pyramid How It Works noise
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!
Order-independent evaluation New Algorithm dependency graph Keep multiple generations Acyclic dependency graph level row col generation 0 -1 0 -1 0 +1 0 -1 0 0 -1 -1 0 0 +1 -1 -1 0 0 newest
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 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 Cached? evaluate (L, x-1, y, g-1) 3. Find best match
Generation 2 Generation 1 Generation 0 Level 3 Level 2 Level 1 Level 0 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
Level 3 Level 2 Level 1 Level 0 Generation 2 Generation 1 Generation 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
Cache Usage Statistics random sphere Percentage of cache used ideal (linear) Percentage of input requested
Quality Comparison old new
Quake 44% requested 48% computed Input Texture 64 64 Texture 512 512
QuickTime VR invisible Input Original Result
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