A Procedural Character Generation System
Total Page:16
File Type:pdf, Size:1020Kb
Aalto University School of Arts Master’s Programme in Game Design and Production Yuanqi Shan A procedural character generation system Master’s Thesis 26/04/2021 Supervisor and Advisor: Perttu Hämäläinen, Professor Aalto University, P.O. BOX 31000, 00076 AALTO www.aalto.fi Master of Arts thesis abstract Author Yuanqi Shan Title of thesis A procedural character generation system Department Department of Media Degree programme New Media: Game Design & Production Year 2021 Number of pages Language 55 English Procedural content generation refers to using algorithms and code to create content like text or audiovisual assets. In the context of video games, the term is usually associated with generated levels and environments which are often used to increase replayability and lower the development costs of a game. In a world where more games are being made every year, some with high development costs, it would be natural to see some developers shifting towards using procedural content generation for many high-cost game development tasks such as character creation. Procedural character generation is not a new thing, as games such as Spore and No Man’s Sky have used it to great effect. However, the topic in general appears to be still unexplored. This thesis presents a design for a procedural character generation system called Unity Procedural Character System. The system was designed for the Unity game engine with the goal of being an accessible, out-of-the-box solution that could simplify the character creation part of the game development process by allowing developers to easily generate 3D characters. In addition, the system is capable of mutating and fusing characters together, allowing developers to generate large amounts of different characters in a short period of time. The design of the Unity Procedural Character System was based on existing procedural tools and video games that used procedural character generation. In order to evaluate the capabilities of the Unity Procedural Character System, an implementation of the system was made and used to procedurally generate a variety of 3D characters. Although there were still improvements to be made on the quality of the generated characters, the system was well capable of generating large amounts of different characters. Therefore, the author recommends the system to be used for game projects with short development cycles or lower standards for visual quality, such as mobile games, game prototypes or game jam projects. Keywords procedural generation, character generation, game development Aalto-yliopisto, PL 11000, 00076 AALTO www.aalto.fi Taiteen maisterin opinnäytteen tiivistelmä Tekijä Yuanqi Shan Työn nimi Proseduraalinen hahmogenerointijärjestelmä Laitos Median Laitos Koulutusohjelma New Media: Game Design & Production Vuosi 2021 Sivumäärä 55 Kieli englanti Proseduraalisella generoinnilla tarkoitetaan sisällön tuottamista algoritmien avulla. Pelien kehityksessä sitä käytetään usein pelien uudelleenpelattavuuden parantamiseen sekä kehityskustannusten vähentämiseen, esimerkiksi generoimalla tasoja sekä peliympäristöjä. Julkaistujen pelien määrä sekä pelien kehityskustannukset ovat kasvaneet vuosittain, minkä seurauksena olisi luonnollista että pelikehityksessä aloitetaan vähitellen käyttämään proseduraalista generointia tuottamaan muuta pelisisältöä kuten esimerkiksi hahmoja. Muun muassa Spore sekä No Man’s Sky ovat esimerkkejä peleistä, joissa proseduraalista hahmogenerointia on käytetty onnistuneesti. Tästä huolimatta proseduraalinen hahmogenerointi on akateemisen tutkimuksen aiheena harvinainen. Tässä opinnäytetyössä esitellään proseduraalinen hahmogenerointijärjestelmä nimeltä Unity Procedural Character System, joka suunniteltiin toimimaan Unity-pelimoottorissa. Työn tavoitteena on tarjota pelikehittäjille yksinkertainen tapa generoida iso määrä 3D hahmoja lyhyellä aikavälillä. Tämän mahdollistaa järjestelmän kyky mutatoida ja yhdistää hahmoja keskenään. Järjestelmän toimintaperiaate perustuu olemassa oleviin proseduraalisiin työkaluihin sekä peleihin, joissa on käytetty proseduraalista hahmogenerointia. Järjestelmän toimivuutta arvioitiin tarkastelemalla generoituja hahmoja. Arviointi tuo ilmi, että järjestelmä kykenee generoimaan paljon erilaisia hahmoja, mutta hahmojen laadussa on vielä parannettavaa. Tästä johtuen järjestelmää suositellaan käytettäväksi pääosin peliprojekteihin, joissa on lyhyt aikataulu tai matalat vaatimukset peligrafiikan laatuun, kuten mobiilipeleihin, peliprototyyppeihin tai game jam -peleihin. Avainsanat proseduraalinen generointi, hahmogenerointi, pelikehitys Table of Contents 1. Introduction 6 2. Background 9 2.1 Examples of procedural character generation in video games 9 2.1.1 Impossible Creatures 9 2.1.2 Spore 11 2.1.3 No Man’s Sky 12 2.2 Procedural tools for video game development 13 2.2.1 Houdini 13 2.2.2 Autodesk Character Generator / Character Creator 3 13 2.3 Other tools 15 3. Design 17 3.1 Terminology 17 3.1.1 Unity Procedural Character System 17 3.1.2 Node 17 3.1.3 Modifier 18 3.1.4 Blueprint 19 3.2 Creature generation 21 3.2.1 Creating a blueprint from scratch 22 3.2.2 Mutating an existing blueprint 22 3.2.3 Fusing blueprints 24 4. Implementation 26 4.1 Important Unity features 26 4.1.1 Physics 26 4.1.2 Mesh manipulation 27 4.1.3 Scriptable objects 27 4.2 UPCS 27 4.2.1 Graphical user interface 28 4.2.2 Generation logic 29 4.3 Results 32 5. Conclusion 45 5.1 Acknowledgements 47 6. Appendices 48 6.1 List of body part node properties 48 6.2 Mutation descriptions for each modifier/node property 50 6.3 Generation performance 51 6.4 Web demo link 52 References 53 1. Introduction Procedural content generation (PCG) refers to automatic and algorithmic creation of content. In the context of video games, PCG is often used to generate graphical assets, such as environments and visual effects. Instead of an artist creating an object or environment from scratch, a computer program generates them instead using predetermined sets of rules. [1] Certain roguelike and strategy games, such as Dead Cells (Motion Twin, 2018) and the Sid Meier’s Civilization (Firaxis Games) franchise, use procedural generation for increased replayability by generating their levels during runtime. In other words, the levels are generated on the fly when the user starts playing the game rather than being constructed manually during development by a designer. Most of the time, the levels are generated by combining certain building blocks, such as tiles or hexes, together by following a series of rules set by developers. For many players, procedurally generated levels bring increased replay value to the games, since each level is different from the previous. This means that the players can experience different challenges even if they start the same game from the beginning. For developers, procedural level generation saves development time and costs since it removes the need for manual level design and creation, which was also the case for Dead Cells according to the Lead Designer of the game, Sebastien Benard [2]. However, a common critique of procedurally generated levels is that the levels can often feel bland and lack the amount of details that would normally be carefully added by a designer. The amount of visual detail and the overall quality of the worlds in video games has risen a lot in recent years. With new technologies and more powerful hardware emerging in short timespans, many game developers have been trying to match the increase of resulting performance budgets in graphics by adding larger, higher-quality worlds and assets into their games. The increasing quality of games often results in larger install sizes. This can be seen, for example, in the Call Of Duty video game franchise by Activision. In 2003, the first Call of Duty game was released for PC with an install size of 1.4 gigabytes. Since then, Activision has released a new game for the Call of Duty franchise annually, with nearly every new game larger than its predecessors [3]. The install size of the newest game in the franchise, Call of Duty: Modern Warfare, with all of its content is roughly 175 gigabytes, an over hundred times increase compared to the original [4]. Some developers, however, have used procedural generation to achieve smaller install sizes. A recent example can be found in No Man’s Sky (2016, Hello Games), a space exploration game that takes place in a procedurally generated universe which, according to developers, consists of over 18 quintillion explorable planets [5]. Despite the unbelievably large number, the actual install size of the game is roughly 10 gigabytes [6]. Compared to many of the recent AAA video games and considering the sheer size of its world, the install size of No Man’s Sky is extremely small. In addition to large install sizes, procedural generation offers possible relief to another major problem in the game industry, development costs. Game development is often an iterative process, meaning many assets and features are constantly changed and remade until they reach satisfactory levels of completion [7]. Large amounts of changes to assets results in longer development time which results in higher development costs. The increasing costs were also a topic in the Blender Conference 2018 talk, The Next Leap: How A.I. will change the 3D industry, by professional 3D artist Andrew Price. In his talk, Price explains that the expensive assets are by-products of a static workflow, and suggests that in the future procedural workflows and machine learning will become commonplace