Persistent Realtim E Building Interior Generation
Total Page:16
File Type:pdf, Size:1020Kb
Persistent Realtime Building Interior G eneration By Evan Hahn A thesis submitted to the Faculty of Graduate Studies and Research in partial fulfilment of the requirements for the degree of Master of Computer Science Ottawa-Carleton Institute for Computer Science School of Computer Science Carleton University Ottawa, Ontario September 2006 © Copyright 2006, Evan Hahn Reproduced with permission of the copyright owner. Further reproduction prohibited without permission. Library and Bibliotheque et Archives Canada Archives Canada Published Heritage Direction du Branch Patrimoine de I'edition 395 Wellington Street 395, rue Wellington Ottawa ON K1A 0N4 Ottawa ON K1A 0N4 Canada Canada Your file Votre reference ISBN: 978-0-494-18353-3 Our file Notre reference ISBN: 978-0-494-18353-3 NOTICE: AVIS: The author has granted a non L'auteur a accorde une licence non exclusive exclusive license allowing Library permettant a la Bibliotheque et Archives and Archives Canada to reproduce,Canada de reproduire, publier, archiver, publish, archive, preserve, conserve,sauvegarder, conserver, transmettre au public communicate to the public by par telecommunication ou par I'lnternet, preter, telecommunication or on the Internet,distribuer et vendre des theses partout dans loan, distribute and sell theses le monde, a des fins commerciales ou autres, worldwide, for commercial or non sur support microforme, papier, electronique commercial purposes, in microform,et/ou autres formats. paper, electronic and/or any other formats. The author retains copyright L'auteur conserve la propriete du droit d'auteur ownership and moral rights in et des droits moraux qui protege cette these. this thesis. Neither the thesis Ni la these ni des extraits substantiels de nor substantial extracts from it celle-ci ne doivent etre imprimes ou autrement may be printed or otherwise reproduits sans son autorisation. reproduced without the author's permission. In compliance with the Canadian Conformement a la loi canadienne Privacy Act some supporting sur la protection de la vie privee, forms may have been removed quelques formulaires secondaires from this thesis. ont ete enleves de cette these. While these forms may be includedBien que ces formulaires in the document page count, aient inclus dans la pagination, their removal does not represent il n'y aura aucun contenu manquant. any loss of content from the thesis. i * i Canada Reproduced with permission of the copyright owner. Further reproduction prohibited without permission. A bstract We present a novel approach to generate virtual building interiors in realtime. The interiors are generated in a top-down fashion using architectural guidelines. Although a building interior in its entirety may be quite large, only the portions that are needed immediately are generated. This lazy generation scheme allows the use of only a fraction of the memory that a model of the entire interior would take. Our method provides realtime frame rates, making it attractive for interactive applications such as videogames and simulators. Memory is controlled by deleting regions of the interior that are no longer needed. Any changes made in these regions is not lost as we provide a simple and efficient method to allow changes made to the interior to persist past the lifetime of the regions that contain them. This allows a dynamic, consistent environment and increases control over the content by allowing developers to make changes. Reproduced with permission of the copyright owner. Further reproduction prohibited without permission. Contents 1 Introduction 1 1.1 Motivation ............................................................................................................ 4 1.2 Scope ................................................................................................................... 5 1.3 C o n trib u tio n s ..................................................................................................... 5 1.4 Thesis O verview .................................................................................................. 6 2 R elated Work 7 2.1 Procedural Geometry Synthesis.................................................................... 7 2.2 Generating Architecture ................................................................................. 12 2.3 Persistence............................................................................................................ 13 3 Lazy Building Interior Generation 16 3.1 Lazy Generation ............................................................................................... 17 3.2 Generation R u l e s ............................................................................................... 19 3.3 Temporary Region T y p e s................................................................................. 23 3.4 Portal Types ..................................................................................................... 24 3.5 Building Setup .................................................................................................. 25 3.5.1 Texture S e le ctio n.................................................................................. 25 3.5.2 Elevator Shaft Creation .................................................................... 26 3.6 Floor D ivision...................................................................................................... 27 3.7 Hallway D iv is io n............................................................................................... 27 3.7.1 Portal P la c e m e n t.................................................................................. 30 3.7.2 Hall Segments ........................................................................................ 36 i Reproduced with permission of the copyright owner. Further reproduction prohibited without permission. 3.7.3 Hall Loops.............................................................................................. 38 3.8 Room Cluster D iv isio n .................................................................................... 40 3.9 Built Region Creation .................................................................................... 43 3.10 Object Placement.............................................................................................. 45 3.11 Random Number G eneration .......................................................................... 46 3.12 Graphical Summary ........................................................................................... 48 4 Memory Management 56 4.1 The Generation T r e e ....................................................................................... 56 4.2 C a c h in g ............................................................................................................... 58 4.3 Deleting R e g io n s .............................................................................................. 59 5 Persistent Change Management 61 5.1 R e c o r d s .............................................................................................................. 62 5.2 Removal T im e .................................................................................................... 62 5.3 Types of C h a n g e .............................................................................................. 63 5.3.1 Face Appearance Changes ................................................................ 63 5.3.2 Non-Generated Object Changes ...................................................... 63 5.3.3 Generated Object Changes ................................................................ 64 5.3.4 Portal Changes .................................................................................... 65 5.4 Objects Occupying multiple regions ............................................................ 66 5.5 D iscussion ........................................................................................................... 66 6 R esults 68 7 Conclusions and Future Work 75 7.0.1 Future W ork .......................................................................................... 76 A Important System Calculations 79 A.l Collision Detection.......................................................................................... 79 A.2 Point Location ................................................................................................. 80 A.3 Visibility.............................................................................................................. 81 ii Reproduced with permission of the copyright owner. Further reproduction prohibited without permission. Bibliography iii Reproduced with permission of the copyright owner. Further reproduction prohibited without permission. List of Tables 3.1 Legend of Region Types iv Reproduced with permission of the copyright owner. Further reproduction prohibited without permission. List of Figures 1.1 Left: A screen shot showing a building’s first person view and its gener ated contents. Right: A wireframe view of the same building generated completely....................................................................................... 3 3.1 An example generating a section of a building around a point ............... 18 3.2 An example floor with a large portion of dead space................................. 21 3.3 An example floor demonstrating the proper widths for room clusters. 22 3.4 A side view of a lazy generated building showing the floor divisions necessary to create a single floor....................................................................