by discarding sample taps
play

by Discarding Sample Taps Robert Toth Intel, Advanced Rendering - PowerPoint PPT Presentation

Avoiding Texture Seams by Discarding Sample Taps Robert Toth Intel, Advanced Rendering Technology 2014-03-15 1 Part I Seams: Atlases and Ptex Texture Seams Atlas Source: Microsoft DirectX SDK Visual & Parallel Computing Group 3


  1. Avoiding Texture Seams by Discarding Sample Taps Robert Toth Intel, Advanced Rendering Technology 2014-03-15 1

  2. Part I Seams: Atlases and Ptex

  3. Texture Seams Atlas Source: Microsoft DirectX SDK Visual & Parallel Computing Group 3

  4. Texture Seams Connected Atlas Connected Connected Source: Microsoft DirectX SDK Visual & Parallel Computing Group 4

  5. Texture Seams Atlas Texture filter Source: Microsoft DirectX SDK Visual & Parallel Computing Group 5

  6. Texture Seams Ptex Visual & Parallel Computing Group 6

  7. Texture Seams Ptex Connected Connected Visual & Parallel Computing Group 7

  8. Texture Seams Ptex Texture filter Visual & Parallel Computing Group 8

  9. Realtime Ptex implementations Algo gorith ithm Wide de filt lter Mem emory ory Loo ookup kups McDonald, Burley: SIGGRAPH 2011 Yes Large 1 Real-time Ptex (Per-Face Texture Mapping) Kim, Hillesland, Hensley: SIGGRAPH Asia 2011 No Small 1 A Space-efficient and hardware-friendly Implementation of Ptex McDonald: GDC 2013 Yes* Small 5/10 Eliminating Texture Waste: Borderless Ptex *: over edges only, not corners Visual & Parallel Computing Group 9

  10. Part II Analysis: What, and Why?

  11. Goal Need to determine pixel colors • Scene is a continuous signal • Display has finite number of pixels Visual & Parallel Computing Group 11

  12. Two interpretations Interpretation 1: • This is a sampling and reconstruction problem! Interpretation 2: • This is an error minimization problem! Regardless: integrate scene modulated by filter function, f(x) Visual & Parallel Computing Group 12

  13. Integrate 𝑄 = 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 Visual & Parallel Computing Group 13

  14. Integrate 𝑄 = 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 Pixel color value Visual & Parallel Computing Group 14

  15. Integrate 𝑄 = 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 Integrate over each contributing surface Visual & Parallel Computing Group 15

  16. Integrate 𝑄 = 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 Pixel filter function Visual & Parallel Computing Group 16

  17. Integrate 𝑄 = 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 Texture Texcoords Visual & Parallel Computing Group 17

  18. Integrate 𝑄 = 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 Visual & Parallel Computing Group 18

  19. Integrate 𝑄 = 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 MSAA: 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 Visual & Parallel Computing Group 19

  20. Integrate 𝑄 = 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 Resolve filter MSAA: Many † visibility samples 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 -> Riemann integral Ω 𝑗 𝑗 † a few Visual & Parallel Computing Group 20

  21. Integrate 𝑄 = 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 Pixel shader MSAA: Pass the problem on to the developer  𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Pass the problem on Ω 𝑗 𝑗 to the texture sampler Visual & Parallel Computing Group 21

  22. Solution 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 Visual & Parallel Computing Group 22

  23. Solution: Simple 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑇 = 𝑢 𝑗 𝒗 𝑗 𝒚 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑄 Visual & Parallel Computing Group 23

  24. Solution: Simple 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑇 = 𝑢 𝑗 𝒗 𝑗 𝒚 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑄 Extrapolation Visual & Parallel Computing Group 24

  25. Solution: Simple 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑇 = 𝑢 𝑗 𝒗 𝑗 𝒚 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑄 𝑇 𝑔 𝒚 𝑒𝒚 𝑄 ′ = 𝑑 𝑗 ≠ 𝑄 Ω 𝑗 𝑗 Visual & Parallel Computing Group 25

  26. Solution: Traverse 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑈 = 𝑢 𝑘 𝒗 𝑘 𝒚 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑘 𝑘 Visual & Parallel Computing Group 26

  27. Solution: Traverse 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑈 = 𝑢 𝑘 𝒗 𝑘 𝒚 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑘 𝑘 Visual & Parallel Computing Group 27

  28. Solution: Traverse 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑈 = 𝑢 𝑘 𝒗 𝑘 𝒚 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑘 𝑘 𝑈 𝑔 𝒚 𝑒𝒚 𝑄′ = 𝑑 𝑗 = 𝑄 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑗 Ω 𝑗 𝑗 𝑗 Visual & Parallel Computing Group 28

  29. Solution: Traverse 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑈 = 𝑢 𝑘 𝒗 𝑘 𝒚 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑘 𝑘 𝑈 𝑔 𝒚 𝑒𝒚 𝑄′ = 𝑑 𝑗 = 𝑄 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑗 Ω 𝑗 𝑗 𝑗 Visual & Parallel Computing Group 29

  30. Solution: Traverse 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑈 = 𝑢 𝑘 𝒗 𝑘 𝒚 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑘 𝑘 Connectivity 𝑈 𝑔 𝒚 𝑒𝒚 𝑄′ = 𝑑 𝑗 = 𝑄 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑗 Ω 𝑗 𝑗 𝑗 Visual & Parallel Computing Group 30

  31. Solution: Traverse 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑈 = 𝑢 𝑘 𝒗 𝑘 𝒚 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑘 𝑘 Neighboring textures 𝑈 𝑔 𝒚 𝑒𝒚 𝑄′ = 𝑑 𝑗 = 𝑄 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑗 Ω 𝑗 𝑗 𝑗 Visual & Parallel Computing Group 31

  32. Solution: Traverse 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑈 = 𝑢 𝑘 𝒗 𝑘 𝒚 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑘 𝑘 Curvature 𝑈 𝑔 𝒚 𝑒𝒚 𝑄′ = 𝑑 𝑗 = 𝑄 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑗 Ω 𝑗 𝑗 𝑗 Visual & Parallel Computing Group 32

  33. Solution: Traverse 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑈 ≈ 𝑢 𝑘 𝒗 𝑘 𝒚 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑘 𝑘 𝑈 𝑔 𝒚 𝑒𝒚 𝑄 ′ = 𝑑 𝑗 ≈ 𝑄 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑗 Ω 𝑗 𝑗 𝑗 Visual & Parallel Computing Group 33

  34. New solution: Discard 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 𝐸 = Ω 𝑗 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 Visual & Parallel Computing Group 34

  35. New solution: Discard 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 𝐸 = Ω 𝑗 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 Visual & Parallel Computing Group 35

  36. New solution: Discard 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 𝐸 = Ω 𝑗 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 Normalize filter weight = Visual & Parallel Computing Group 36

  37. New solution: Discard 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 𝐸 = Ω 𝑗 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝐸 𝑔 𝒚 𝑒𝒚 𝑄′ = 𝑑 𝑗 = 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑗 Ω 𝑗 𝑗 𝑗 Visual & Parallel Computing Group 37

  38. New solution: Discard 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 𝐸 = Ω 𝑗 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝐸 𝑔 𝒚 𝑒𝒚 𝑄′ = 𝑑 𝑗 = 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑗 Ω 𝑗 𝑗 𝑗 Visual & Parallel Computing Group 38

  39. New solution: Discard 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 𝐸 = Ω 𝑗 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 Resolve filter Texture filter 𝐸 𝑔 𝒚 𝑒𝒚 𝑄′ = 𝑑 𝑗 = 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑗 Ω 𝑗 𝑗 𝑗 Visual & Parallel Computing Group 39

  40. New solution: Discard 𝑄′ = 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 𝑗 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 𝐸 = Ω 𝑗 𝑑 𝑗 𝑔 𝒚 𝑒𝒚 Ω 𝑗 Local information 𝐸 𝑔 𝒚 𝑒𝒚 𝑄′ = 𝑑 𝑗 = 𝑢 𝑗 𝒗 𝑗 𝒚 𝑔 𝒚 𝑒𝒚 = 𝑄 Ω 𝑗 Ω 𝑗 𝑗 𝑗 Visual & Parallel Computing Group 40

  41. New solution: Discard Restrict all the edges? Visual & Parallel Computing Group 41

  42. New solution: Discard Restrict all the edges? • No, only texture boundaries Interiors are less problematic Sampler would need edge information Visual & Parallel Computing Group 42

  43. John McDonald [2013] * (Traverse) C = lookup(texture, texcoord(p)) W = lookup(one, texcoord(p)) for each neighboring patch K: C += lookup(K.texture, K.texcoord(p)) W += lookup(K.one, K.texcoord(p)) return C/W * Eliminating Texture Waste: Borderless Ptex https://developer.nvidia.com/gdc-2013/ Visual & Parallel Computing Group 43

  44. New solution (Discard) C = lookup(texture, texcoord(p)) W = lookup(one, texcoord(p)) //for each neighboring patch K: // C += lookup(K.texture, K.texcoord(p)) // W += lookup(K.one, K.texcoord(p)) return C/W Visual & Parallel Computing Group 44

  45. Part III Really?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend