500 likes | 649 Views
Feature-Based Textures. Ganesh Ramanarayanan Kavita Bala Bruce Walter Cornell University EGSR 2004. Motivation. Textures have fixed resolution Goal: resolution independent texturing Improving texture quality when zooming in Applications: games, interactive walkthroughs. Solution.
E N D
Feature-Based Textures Ganesh Ramanarayanan Kavita Bala Bruce Walter Cornell University EGSR 2004
Motivation • Textures have fixed resolution • Goal: resolution independent texturing • Improving texture quality when zooming in • Applications: games, interactive walkthroughs Ganesh Ramanarayanan, Cornell University
Solution • Feature-Based Textures (FBTs) • Humans are sensitive to features: boundaries in the texture with sharp contrast • Store features as resolution-independent lines / curves • Interpolate from reachable samples: those on the same side of all features Ganesh Ramanarayanan, Cornell University
Quality Using standard texture map Ganesh Ramanarayanan, Cornell University
Quality Using Feature-Based Texture Ganesh Ramanarayanan, Cornell University
Related Work • Vector formats: SVG, Postscript • Procedural textures: [Ebert94] • Superresolution: [Huang84], [Elad97], [Borman98] • Discontinuity detection and use: • Vision: [Canny87], [Perona90], [Malik01] • Point data sets: [Pauly03] • Visibility events: [Drettakis94], [Durand99], [Duguet02] • Discontinuity meshing: [Heckbert92], [Lischinski92] • Silhouette clipping: [Sander00] Ganesh Ramanarayanan, Cornell University
Related Work • Discontinuity-based 2D representations • NPR: [Salisbury96] • Edge-and-point interactive rendering: [Bala03] • Silhouette shadow maps: [Sen03] • Concurrent research • Bixels: [Tumblin04] • Silmap textures: [Sen04] Ganesh Ramanarayanan, Cornell University
Outline of Talk • Overview • FBT Usage • FBT Representation • Results and Discussion Ganesh Ramanarayanan, Cornell University
Overview • Each FBT texel stores samples and features • One sample in each texel region • Most of the FBT works like a standard texture map • Only do more computation near features feature samples + Ganesh Ramanarayanan, Cornell University
Algorithm point Image plane Ganesh Ramanarayanan, Cornell University
texel grid point Image plane Algorithm • Map 3D point to 2D texture point p Ganesh Ramanarayanan, Cornell University
texel grid point p Image plane FBT texel Algorithm • Map 3D point to 2D texture point p • Find the texel containing p Ganesh Ramanarayanan, Cornell University
texel grid point p Image plane FBT texel Algorithm • Map 3D point to 2D texture point p • Find the texel containing p • Find the texel region containing p Ganesh Ramanarayanan, Cornell University
texel grid point p p Image plane FBT texel FBT texel Algorithm • Map 3D point to 2D texture point p • Find the texel containing p • Find the texel region R containing p • Look up reachable samples Ganesh Ramanarayanan, Cornell University
texel grid point p p Image plane FBT texel FBT texel Algorithm • Map 3D point to 2D texture point p • Find the texel containing p • Find the texel region R containing p • Look up reachable samples • Bilinearly interpolate and return result Ganesh Ramanarayanan, Cornell University
Outline of Talk • Overview • FBT Usage • FBT Representation • Results and Discussion Ganesh Ramanarayanan, Cornell University
Step 3: Region Finding • How do we find which of these four regions a point lies in? Ganesh Ramanarayanan, Cornell University
Step 3: Region Finding • Simple feature: divides texel into two regions • Distinguish these regions with a single ray intersection parity test against feature • Cast towards side with no feature intersection 1 0 Ganesh Ramanarayanan, Cornell University
Step 3: Region Testing • n simple features divide area into n+1 regions • Identify region using linear search Ganesh Ramanarayanan, Cornell University
Step 3: Region Testing • n simple features divide area into n+1 regions • Identify region using linear search Ganesh Ramanarayanan, Cornell University
Step 3: Region Testing • n simple features divide area into n+1 regions • Identify region using linear search Ganesh Ramanarayanan, Cornell University
Step 3: Region Testing • n simple features divide area into n+1 regions • Identify region using linear search Ganesh Ramanarayanan, Cornell University
Feature Intersections • When features intersect, parity test for region determination can be ambiguous • Solve by introducing horizontal bands Ganesh Ramanarayanan, Cornell University
p p Step 4: Sample Lookup • If a texel has no features, use ordinary bilinear interpolation • What do we do when there are features? 1 3 1 3 s 2 s 2 Ganesh Ramanarayanan, Cornell University
p p Step 4: Sample Lookup • Sample in lower left region of texel: representative sample • Interpolate using region’s sample s and reachable representatives 1 3 1 1 s 2 s s Ganesh Ramanarayanan, Cornell University
p p Step 4: Sample Lookup • Sample in lower left region of texel: representative sample • Interpolate using region’s sample s and reachable representatives 1 3 3 3 s 2 s 3 Ganesh Ramanarayanan, Cornell University
Outline of Talk • Overview • FBT Usage • FBT Representation • Results and Discussion Ganesh Ramanarayanan, Cornell University
Creating FBTs • Input: samples, features, and FBT resolution • Finding features: • Automatic extraction (vectors, feature detection, tracing) • Manual specification (from scratch or extracted features) Tracing Vectors User-drawn Ganesh Ramanarayanan, Cornell University
Resolution Tradeoff • More FBT texels means: • More memory usage • More texels with no features for faster lookup • Denser sampling of input for better gradients Ganesh Ramanarayanan, Cornell University
Sample Invalidation • Samples close to a feature are prefiltered • Such samples should be eliminated Ganesh Ramanarayanan, Cornell University
Reachability Graph • Decompose space into sub-regions Ganesh Ramanarayanan, Cornell University
Reachability Graph • Decompose space into sub-regions • Divide texel at all feature/feature intersections, feature/texel intersections, curve maxima/minima Ganesh Ramanarayanan, Cornell University
Reachability Graph • Decompose space into sub-regions • Divide texel at all feature/feature intersections, feature/texel intersections, spline maxima/minima • Use sub-regions to form reachability graph Ganesh Ramanarayanan, Cornell University
Hole Filling • Fill holes with closest available samples Ganesh Ramanarayanan, Cornell University
Hole Filling • Fill holes with closest available samples • Collapse sub-regions into main regions Ganesh Ramanarayanan, Cornell University
Outline of Talk • Overview • FBT Usage • FBT Representation • Results and Discussion Ganesh Ramanarayanan, Cornell University
Example Inputs Yin yang (vector) Stop sign (vector) Ganesh Ramanarayanan, Cornell University
Example Inputs Stained glass (user) Flower (user) Wizard skin (user) Ganesh Ramanarayanan, Cornell University
Results SVG Vector Format FBT 230x256 416 KB Ganesh Ramanarayanan, Cornell University
Results FBT 230x256 416 KB FBT 16x16 9 KB Bilinear 460x512 690 KB Bilinear 64x64 12 KB Ganesh Ramanarayanan, Cornell University
Results FBT 128x128 96 KB FBT 256x256 434 KB Bilinear 128x128 48 KB Bilinear 256x256 192 KB Ganesh Ramanarayanan, Cornell University
Results – 3D Models FBT 230x256 416 KB Bilinear 460x512 690 KB Ganesh Ramanarayanan, Cornell University
Results – 3D Models FBT 230x256 416 KB Bilinear 460x512 690 KB Ganesh Ramanarayanan, Cornell University
Results – 3D Models FBT 230x256 416 KB Bilinear 460x512 690 KB Ganesh Ramanarayanan, Cornell University
Results – 3D Models Artwork from Warcraft® III: Reign of Chaos™ provided courtesy of Blizzard Entertainment FBT 256x256 357 KB Bilinear 256x256 192 KB Ganesh Ramanarayanan, Cornell University
Results – 3D Models Artwork from Warcraft® III: Reign of Chaos™ provided courtesy of Blizzard Entertainment FBT 256x256 357 KB Bilinear 256x256 192 KB Ganesh Ramanarayanan, Cornell University
Results – 3D Models Artwork from Warcraft® III: Reign of Chaos™ provided courtesy of Blizzard Entertainment FBT 256x256 357 KB Bilinear 256x256 192 KB Ganesh Ramanarayanan, Cornell University
FBT Properties • 90% of texels: No features • Most texels similar to standard texture maps • Low amortized lookup cost • Low amortized storage cost • 99% of texels: < 2 features • Fixed-size representation possible for GPUs • Promising results on NV40 even without using new functionalities (early-out, etc) Ganesh Ramanarayanan, Cornell University
Conclusions • FBTs combine samples with resolution-independent features • Flexible representation encompassing vector and raster image formats • Applications: games, interactive walkthroughs • Future work: • MIP-mapping and antialiasing • Handling a wider variety of textures Ganesh Ramanarayanan, Cornell University
Questions • graman@cs.cornell.edu • kb@cs.cornell.edu • bjw@graphics.cornell.edu • FBT Webpage: • http://www.cs.cornell.edu/~graman/papers/egsr04fbt Ganesh Ramanarayanan, Cornell University