Study of Mesh Generation and Optimization Techniques Applied to Parametric Forms

Study of Mesh Generation and Optimization Techniques Applied to Parametric Forms

University of Liège - Faculty of Applied Sciences Master thesis ATFE0002-1 Study of mesh generation and optimization techniques applied to parametric forms Graduation Studies conducted for obtaining the Master’s degree in Computer science by Julien Vandenbergh Academic promoter: Éric Béchet Industrial promoters: Sébastien Magdelyns & Terry Moës Academic year of 2019-2020 Abstract This master thesis is focused on the creation of 3D meshes from parametric forms, in particular texts and fonts. The algorithm developed in this work is focused towards being in- tegrated into a real-time rendering engine. This master thesis is done with the collaboration of the University of Liège and Deltatec. The first step is to find a way to extract the parametric form of the text to be drawn. This extraction is based on a previous R&D done at Deltatec. It is using Direct Write and Direct 2D, both are libraries provided by DirectX. Once the parametric forms that describe the text is extracted, a discretisation step is done to create concrete points in 2D space. Those points are then used to create a mesh by triangulating them either using Monotone Polygons Triangulation1 or by Constrained Delaunay Triangulation. Once a 2D mesh is generated, depth is added through extrusion. The normal computation process is done during the extrusion but it has some pitfalls. The normal computation request a special attention to avoid lighting inconsistencies and errors. The algorithm as a whole is timed and compared with the current in-use solution in Deltatec’s proprietary engine. The results show that the developed algorithm, despite not being optimised, is close to the current one in terms of efficiency. We could expect that the developed algorithm, once optimised, will be as efficient if not even more efficient than the current in-use. The quality of the resulting mesh was created to be equivalent to the current algorithm. 1The algorithm first split the input polygon (with holes) into monotone sub-polygons. Then it triangulate each sub-polygon. 1 Acknowledgements First, I would like to thank Terry Moës for the numerous meetings and wise advice that helped me a lot during the making of this thesis. And for his help on the redaction of this report. Then, I would like to thank Sébastien Magdelyns for the very interesting conversations and their very interesting divergences. I would like to thank Éric Béchet for his guidance on the parametric aspect of this work, it helped me a lot understanding more deeply the ins and outs, especially for the discretisation of such parametric forms. Moreover, thanks to its course about computational geometry and computer aided design, the majority of the algorithms seen or used during this work were already understood. I would also like to thank Christophe Leblanc for his help on the implementation of the Monotone Polygons algorithm. I would like to thank my family, especially my partner, for having supported my detailed conversations on the subject despite the fact that neither of them understand anything that I was saying. Last but not least, I would like to make a special thank to my partner who supported and advised me during my years of study. 2 Contents 1 Introduction 8 1.1 Deltatec . .8 1.2 Environment and Objectives . .8 1.2.1 Template Editor . .9 1.2.2 Preliminary R&D . 10 1.3 Work plan . 11 2 Definitions 12 2.1 General concepts . 12 2.1.1 Bézier . 12 2.1.2 Glyph . 13 2.1.3 Figure . 13 2.2 Licenses . 14 3 DirectX 15 3.1 Direct Write . 15 3.2 Direct 2D . 15 3.3 Direct 3D . 15 3.4 Vertex . 16 3.5 Index & vertex buffers . 16 3.6 Culling . 17 3.7 Lighting . 17 3.8 Existing method for mesh generation . 18 3.8.1 Texture mapping . 18 3.8.2 Quality parameters . 20 3.9 3D modelling . 20 4 Extraction of parametric forms 21 4.1 Design of the Proof-of-Concept . 21 4.2 Missing information and bugs . 22 4.3 Fonts and their representation . 22 4.3.1 TrueType & OpenType fonts . 22 4.3.2 Self-intersection . 22 4.3.3 Conventions inside/outside a glyph . 23 4.3.3.1 Contours & holes . 24 4.3.4 Shape & number of curves in a glyph . 26 4.4 Bézier curve discretisation . 27 4.4.1 First easy approach . 28 4.4.2 Adaptive subdivision . 29 4.4.3 Quality parameters matching . 31 5 2D Mesh generation 33 5.1 Tessellation formalisation . 33 5.2 Methods and algorithms . 33 5.2.1 Monotone polygons . 33 5.2.1.1 Monotone decomposition . 34 5.2.1.2 Triangulation of x-monotone polygons . 37 3 5.2.1.3 Full algorithm . 38 5.2.2 Constrained Delaunay . 38 5.2.2.1 Delaunay triangulation . 38 5.2.2.2 Adding constraints . 39 5.2.3 Quadtree . 42 5.2.3.1 Quadtree structure . 42 5.2.3.2 Quadtree balancing . 43 5.2.3.3 Quadtree triangulation . 43 5.2.4 No discretisation triangulation . 45 5.2.5 Miscellaneous & exotic . 45 5.2.6 Algorithm(s) selection . 46 5.3 Implemented algorithms . 47 5.3.1 Triangulated elements . 47 5.3.2 Monotone Polygons . 47 5.3.3 Constrained Delaunay . 48 5.4 Texturing . 49 6 3D mesh generation: Extrusion 51 6.1 Naive approach . 51 6.2 Improved version . 52 6.3 Final version . 54 7 Performance assessment 55 7.1 Benchmark protocol . 55 7.2 Results . 57 7.2.1 Overall performance comparison . 57 7.2.1.1 Detailed cost of developed code . 57 7.2.1.2 Extrusion . 58 7.2.2 Category comparison . 59 7.2.3 Quality parameters comparison . 60 7.2.4 Font comparison . 60 7.3 Compatibility with current engine . 61 8 What’s next 62 8.1 Possible Optimisations . 62 8.1.1 Complexity improvements . 62 8.1.1.1 Discretisation . 62 8.1.1.2 Triangulation . 62 8.1.1.3 Extrusion . 62 8.1.2 Glyph extraction into the sink . 62 8.1.3 Monotone Polygons . 62 8.1.4 Extrusion . 63 8.1.5 Multi-threading . 63 8.2 Bevelling . 63 9 Conclusion 65 4 A Appendix: Benchmark 66 A.1 Benchmark detailed variables . 66 A.1.1 Algorithms . 66 A.1.2 Fonts . 66 A.1.3 Characters . 66 A.1.4 Small words and typical cases . 67 A.1.5 Long text . 67 A.2 Samples of generated tessellations . 67 B Appendix: Demonstration of complexity reduction 69 References 70 5 List of Figures 1 Template Editor. 10 2 Bézier curve. ..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    71 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us