html5-img
1 / 45

Our Goal

Our Goal. Texture mapping seamless hardware supported low distortion general object. Texture Atlas (multi-chart approach to parameterization). disk-like patches. texture charts. v. +. =. u. 3D mesh. 2D texture image. textured bunny.

zarita
Télécharger la présentation

Our Goal

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Our Goal • Texture mapping • seamless • hardware supported • low distortion • general object

  2. Texture Atlas(multi-chart approach to parameterization) disk-like patches texture charts v + = u 3D mesh 2D texture image textured bunny images courtesy of Lévy, Sylvain, Ray and Maillot , SIGGRAPH 02

  3. Cube-Maps • Typically used for environment mapping mesh environment texture images from Bubble demonstration program, nVidia

  4. w u v Abusing Cube-Maps • What if we store surface color in a cube-map? object space texture space object space + = mesh with per-vertex 3D texture coord. (u,v,w) cube-map textured apple

  5. texture from chart B texture from chart A • texture atlas • seams • a triangle cannot span multiple charts • mesh dependency • mipmapping difficult • chart packing: wasted texels • artifacts at boundaries • no defined neighbors for boundary texels • cube-map • seamless • a triangle can span multiple faces • mesh independent • mipmapping ok • no packing: no wasted texels • no boundaries, no artifacts • texel neighbors always defined

  6. texture from chart B texture from chart A • texture atlas • seams • a triangle cannot span multiple charts • mesh dependency • mipmapping difficult • chart packing: wasted texels • artifacts at boundaries • no defined neighbors for boundary texels • cube-map • seamless • a triangle can span multiple faces • mesh independent • mipmapping ok • no packing: no wasted texels • no boundaries, no artifacts • texel neighbors always defined

  7. texture atlas • seams • a triangle cannot span multiple charts • mesh dependency • mipmapping difficult • chart packing: wasted texels • artifacts at boundaries • no defined neighbors for boundary texels • cube-map • seamless • a triangle can span multiple faces • mesh independent • mipmapping ok • no packing: no wasted texels • no boundaries, no artifacts • texel neighbors always defined

  8. texture atlas • seams • a triangle cannot span multiple charts • mesh dependency • mipmapping difficult • chart packing: wasted texels • artifacts at boundaries • no defined neighbors for boundary texels • cube-map • seamless • a triangle can span multiple faces • mesh independent • mipmapping ok • no packing: no wasted texels • no boundaries, no artifacts • texel neighbors always defined

  9. texture atlas • seams • a triangle cannot span multiple charts • mesh dependency • mipmapping difficult • chart packing: wasted texels • artifacts at boundaries • no defined neighbors for boundary texels • cube-map • seamless • a triangle can span multiple faces • mesh independent • mipmapping ok • no packing: no wasted texels • no boundaries, no artifacts • texel neighbors always defined

  10. texture atlas • seams • a triangle cannot span multiple charts • mesh dependency • mipmapping difficult • chart packing: wasted texels • artifacts at boundaries • no defined neighbors for boundary texels • works (is general) • cube-map • seamless • a triangle can span multiple faces • mesh independent • mipmapping ok • no packing: no wasted texels • no boundaries, no artifacts • texel neighbors always defined • does not (~spheres only!)

  11. What we Keep from CubeMaps … from rasterizer interpolated coordinates in 3D texture space • Per-fragment • Hardware implemented • Texture defined in 3D BUTstored in 2D projection coordinates in 3D texture domain (a 2-manifold similar to the mesh) FRAGMENT SHADER mapping coordinates in 2D texture domain 2D texture fetch…

  12. Going Beyond Apples • Cube-Maps work well only for sphere-like objects world space texture space  sphere-like mesh cubic texture domain

  13. Going Beyond Apples • But for more general objects? world space ? texture space  arbitrary meshes cubic texture domain

  14. ...huge distortions, incompatible topology Going Beyond Apples • But for more general objects? world space ? texture space  arbitrary meshes cubic texture domain [Praun Hoppe SIGGGRAPH 2003]

  15. far too complex (GPU) Going Beyond Apples • But for more general objects? world space texture space  arbitrary mesh coarse mesh

  16. Space & Domain • R3-Object space • T3-3D texture space R3 T3 T3 T2 • T3-3D texture domain • T2-2D texture domain

  17. surface of a polycube as 3D texture domain T3 Introducing Polycubes Po·ly·cube: n. (Geom.) A solid composed by multiple unit cubes attached face to face

  18. Choosing a Polycube • Polycube should roughly resemble the mesh world space texture space mesh polycube

  19. Process • Assign each vertex v of the mesha unique 3D texture position • At rendering time • Vertices, 3D texture positions → Graphics pipeline → Rasterizer(interpolates 3D texture position fI3 for every produced fragmentf) → Pass fI3 into fragment shader vT3= (vr, vs, vt) ∈T3

  20. T3 T2 Process R3 • Problem: Even if all 3D texture positions vT3line on T3 , this is not necessarily the case for the interpolated 3D texture position fI3 • Fragment shader • Projection P: T3 → T3 • Mapping M: T3 → T2 T3

  21. Projection & Mapping 3D texture domainT3 texture stored in 1D values defined in a 2D space • 2D analogue 3D texture space T3 Most important feature of PolyCube-Maps:Continuously → seamless texture mapping(texture information itself is stored as a collection of square images)

  22. How PolyCube-Maps Work? • Dual partition – cubic cells • Cell configurations -- facelets • The projection P • The mapping M

  23. cell case A case B dual grid Partition of Texture Space • 2D analogue polycube

  24. facelet texture patch squarelet S Partition of the Parameter SpaceCell Configurations and The Projection P • back to 3D case 3 case 4-a case 4-b case 5 case 6-a case 6-b

  25. The Mapping M • The upper left corner can be stored as a global 2D offset for each particular cell • Local offsets don’t need to be stored • A point p∈T3 inside a cell (3 steps) • relative position of p inside the containing facelet is determined → multiplied with S to give the relative position in the corresponding squarelet • offset the result according to the fixed packing of the squarelets inside the texture patch • global offset of that patch in T2 is added

  26. A Simple PolyCube-Map example Subdivide into 8 cells of type 3 Each cell contains three facelets thatsotred as a set of three texture squarelets

  27. partition of theparameter space • back to 3D dual cells case 4-a case 5 case 4-b case 3

  28. partition of theparameter space dual cells case 4-a case 5 case 4-b case 3

  29. 3D Look-up Table • Store cell-structure of T3 in 3D look-up tableT3LUT(define each cell through a set of parameters in the corresponding entry of T3LUT) • Processing a fragment f (fragment shader) • determine the cell that contains the fI3 • access to T3LUT at the corresponding entry returns all the parameters needed to compute P and M (use to find the final 2D texture position fT2 ∈T2 )

  30. 3D Look-up Table – Parameter • Each entry of T3LUT is packed in one (r, g, b)-texel • An entry e is composed of 3 parts • e.C – cell configurations (index) • e.R – axis-to-axis rotation (index) • e.O – global offset of the patch (in T2) • T3LUT is always smaller than on Kilo texel • T2 can be several Mega texels • Construction of the look-up table !!

  31. not necessarily on the polycube surface: project texture space (3D!) stored in texture RAM as: a fragment with interpolated texture coord final texel value for the fragment w map to 2D v u a packed texture image plus a tiny structure to store polycube layout the polycube polycube-maps in a nutshell object space the mesh (with per-vertex text. coord)

  32. Examples of poly-cubic parameterizations in texture RAM object polycube-map w u v world space texture space

  33. Examples of poly-cubic parameterizations object polycube-map w v u world space texture space

  34. Examples of poly-cubic parameterizations object polycube-map w u v world space texture space

  35. Examples of poly-cubic parameterizations object polycube-map w v u world space texture space

  36. An example application: same texture for different LOD w + = Geometry 3 u v + = Geometry 2 • the same polycube-map • texture + = Geometry 1

  37. T3 warp project optimize warp-1 How to build aPolycube-Map(for a given mesh) • Not automatic, to this point • get a suitable polycube • warp it aroundthe mesh • project mesh over it • unwarp • global optimization M

  38. MIPS ext. MIPS mean value Global optimization projection (not optimized)

  39. Most Isometric ParametrizationS θ = 0.3 θ = 1.0 θ = 3.0 the horse head model parameterized using different angle/area preservation tradeoffs

  40. Experimental Results Frame Rate 30 fps (mip-mapping) 10 fps (mip-mapping + bilinear interpolation) nVIDIA GeForce FX 5600 ATI Radeon 9800 ProoPentium 4 2.4 Ghz

  41. Pros truly seamless texture mapping no patch boundaries no color bleeding very low distortion nearly optimal texture packing bilinear filtering possible mipmapping possible mesh independency Cons long fragment program ~60 GPU instruction long could be improved, with little branching support 3 t-coords per vertex instead of 2 Limits cannot handle arbitrary shape/topology complexity e.g. a tree Discussion

  42. Thank you! Questions? http://vcg.isti.cnr.it/~polycubemaps/or, just Google for “polycube-map” Marco Tarini · Kai Hormann · Paolo Cignoni · Claudio Montani Visual Computing Lab · ISTI · CNR · Pisa, Italy

  43. w v u Q: Aren’t cubemaps just another atlas? • A: true, but such chart borders are: • transparent for triangles • invisible for mipmapping... • hidden from the user texture charts? chart boundaries?

  44. Q: isn’t it a lot of work to build a polycube map? • Polycube-maps • Get a fitting polycube • Warp it around mesh • Project mesh over it • Unwarp back • Global optimization • Atlases • Find a good division into disk-like patches • Pack charts togheter • Global optimization

  45. Q: isn’t it a lot of work to build a polycube map? • Polycube-maps • New. Not studied at all. • Future work: design tools to make task a lot easier (but still user guided) • In any case, final result will be clean (seamless...) • Atlases • Very much studied problem • Automatic results inferior w.r.t. manual results • In any case, final parameterization bound to have drawbacks (seams...)

More Related