220 likes | 320 Views
What We’ll Be Covering Today:. Modified Butterfly Subdivision Texturing and Antialiasing Global Illumination via Radiosity. Modified Butterfly Subdivision. Based on Dyn/Levin/Gregory Butterfly Subdivision Adds rules for non-regular vertices Standard Butterfly is not C 1 at k=3 or k>7.
E N D
What We’ll Be Covering Today: • Modified Butterfly Subdivision • Texturing and Antialiasing • Global Illumination via Radiosity
Modified Butterfly Subdivision • Based on Dyn/Levin/Gregory Butterfly Subdivision • Adds rules for non-regular vertices • Standard Butterfly is not C1 at k=3 or k>7
Mesh Data Structure • List of vertices • Each vertex has a set edges (vertices it is connected to) • sorted in order around vertex • Not guaranteed CCW (normal problems)
Vertex Normals • Formulas from SIG2000 course notes • Problems with boundary edge rules • Possibly due to bad vertex orientation
Anti-Aliasing • Standard OpenGL Accumulation Buffer techniques • Helpful Tip: Don’t save your antialiasing example pictures as JPEG’s
Texture Mapping • Calculate vertex texture coordinates using spherical projection • Issues to Deal with: • Texture coordinate problems • Polar Distortion
Wrapped Texture Coordinates • Vertices can only have one texture coordinate • Some need two • Two Solutions: • Duplicate vertices (bad, fast) • Detect & Fix at render time (good, slow)
At-Pole Texture Coordinates • Singularity at poles • entire line of texture on one point • OpenGL cannot handle this gracefully • Again, can be detected and corrected at render-time
Polar Distortion Problem • Texture mapped like lines of lattitude / longitude • Lines get closer at poles • Distort texture to counter this effect • WARNING: distorted texture will not tile!
Radiosity • Progressive Refinement (Shooting) • My machine only has 256 MB of RAM • Large Scenes == Thrashing • Throw away form factors after each ‘shot’ • Use hemicube to calculate form factors • Projecting faces – easy way and hard way
Form Factors the Hard Way • Clip and project each poly onto faces of hemicube (geometrically) • Find pixels that intersect projected poly A HUGE WASTE OF PROGRAMMING EFFORT(and it’s really slow, too)
Form Factors the Easy Way • Use OpenGL’s Z-buffer • Encode each face with a color • Graphics Hardware speeds this up • Can be less accurate than geometric method • Standard Z-Buffer accuracy problem
Other Implementation Issues • Use double precision! • Dealing with summation of lots of tiny values • Single precision ‘loses light’ • Particularly for Fq’s in HemiCube • OpenGL and multi-threading do not really mix together so nicely…