- hauptprojekt - fachprojekt det ss 2019 · • procedural content generation • user interface,...
TRANSCRIPT
![Page 1: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/1.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Fachprojekt DET SS 2019- Hauptprojekt -
![Page 2: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/2.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
2
HauptprojektVoxel Engine
![Page 3: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/3.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Ziel• Tiefgehender Einstieg in Elemente der Game Engine Unity
– z.B. Job System– z.B. Entity-Component-System– z.B. UI & Event System– z.B. Assetbundle– z.B. Profiler
3
![Page 4: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/4.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Ziel• Tiefgehender Einstieg in Entertainment Technologies
– z.B. Procedural Content Generation– z.B. AI, Pathfinding Methoden– z.B. UI
4
![Page 5: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/5.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Wahlthemen• Procedural Content Generation• User Interface, Crafting System, Modding System• Kampfsystem und KI
• Thema wird bis zum 07.05.2019 festgelegt• Mehrfach- oder Nichtbelegung von Themen ist möglich• Andere Themen, insbesondere komplexere Themen, nur
nach Vereinbarung (z.B. Multiplayer)5
![Page 6: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/6.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Aufgaben• Entwickeln Sie Spielideen/Features und skizzieren diese
(z.B. auf Papier)• Planen Sie Ihr Projekt mit einem Meilensteinplan und
einem Gantt Chart• Implementieren Sie Ihre Spielidee und dessen Features
anhand Ihrer Projektplanung• Versionieren Sie häufig Ihr Projekt
6
![Page 7: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/7.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Voxel Engine Download• https://github.com/MarcoMeter/DET-SS2019
Referenz: https://www.udemy.com/unityminecraft/
7
![Page 8: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/8.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Einstieg in die Grundlage• Was ist ein Voxel?• Was ist ein Cube?• Mesh Zusammenfassung• Datenverarbeitung in einem Voxel Array• Texture Atlas• Procedural Content Generation• Perlin Noise• Fractional Brownian Noise
8
![Page 9: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/9.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Was ist ein Voxel (Volume Pixel)?• Ein Voxel repräsentiert einen einzelnen Datenpunkt in
einem dreidimensionalen Array• z.B. chunk[0, 2, 1] = DirtBlock• Ein Voxel kennt seine relative Position in einem Volumen
(z.B. Position innerhalb eines Chunks)• Rendering: Interpretation der Daten• Anwendung: z.B. Terrain
9
![Page 10: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/10.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Was ist ein Cube?• Ein Mesh aus Polygonen• Die einfachste Form eines Polygons in Unity is ein Triangle• Die drei Punkte des Dreiecks haben 3D Koordinaten• Eine Fläche eines Würfels hat zwei Dreiecke• Ein Dreieck hat eine Normale
10
![Page 11: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/11.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Was ist ein Cube?• Ein Cube in Unity besteht aus 12 Triangles
• GetComponent<MeshFilter>().mesh– Vertex Array– Normal Array– UV Array– Triangle Array
11
![Page 12: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/12.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Vertex Array(0.5, -0.5, 0.5)(-0.5, -0.5, 0.5)(0.5, 0.5, 0.5)(-0.5, 0.5, 0.5)(0.5, 0.5, -0.5)(-0.5, 0.5, -0.5)(0.5, -0.5, -0.5)(0.5, 0.5, -0.5)
(-0.5, -0.5, 0.5)(-0.5, -0.5, -0.5) (-0.5, -0.5, 0.5)(-0.5, 0.5, 0.5)(-0.5, 0.5, -0.5) (-0.5, -0.5, -0.5) (0.5, -0.5, -0.5)(0.5, -0.5, 0.5)
12
(-0.5, -0.5, -0.5) (0.5, 0.5, 0.5)(-0.5, 0.5, 0.5)(0.5, 0.5, -0.5)(-0.5, 0.5, -0.5)(0.5, -0.5, -0.5)(0.5, -0.5, 0.5)(0.5, 0.5, 0.5)
![Page 13: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/13.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Normal Array(0.0, 0.0, 1.0)(0.0, 0.0, 1.0)(0.0, 0.0, 1.0)(0.0, 0.0, 1.0)(0.0, 1.0, 0.0)(0.0, 1.0, 0.0)(0.0, 0.0, -1.0)(0.0, 0.0, -1.0)
(-1.0, 0.0, 0.0)(-1.0, 0.0, 0.0)(-1.0, 0.0, 0.0)(-1.0, 0.0, 0.0)(1.0, 0.0, 0.0)(1.0, 0.0, 0.0)(1.0, 0.0, 0.0)(1.0, 0.0, 0.0)
13
(0.0, 1.0, 0.0)(0.0, 1.0, 0.0)(0.0, 0.0, -1.0)(0.0, 0.0, -1.0)(0.0, -1.0, 0.0)(0.0, -1.0, 0.0)(0.0, -1.0, 0.0)(0.0, -1.0, 0.0)
![Page 14: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/14.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
UV Array(0.0, 0.0)(1.0, 0.0)(0.0, 1.0)(1.0, 1.0)(0.0, 1.0)(1.0, 1.0)(0.0, 1.0)(1.0, 1.0)
(0.0, 0.0)(0.0, 1.0)(1.0, 1.0)(1.0, 0.0)(0.0, 0.0)(0.0, 1.0)(1.0, 1.0)(1.0, 0.0)
14
(0.0, 0.0)(1.0, 0.0)(0.0, 0.0)(1.0, 0.0)(0.0, 0.0)(0.0, 1.0)(1.0, 1.0)(1.0, 0.0)
![Page 15: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/15.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Triangle Array0, 2, 3,0, 3, 1,8, 4, 5,8, 5, 9,10, 6, 7,10, 7, 11,
15
12, 13, 14,12, 14, 15,16, 17, 18,16, 18, 19,20, 21, 22,20, 22, 23
![Page 16: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/16.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Mesh Zusammenfassung1. Erstelle Quads
a. Erstelle Liste mit Verticesb. Erstelle UV Koordinatenc. Berechne Normalend. Verbinde Vertices zu Triangles
2. Kombiniere Quad Meshes
16
![Page 17: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/17.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Datenverarbeitung in einem Voxel Array
Verschachtelte Schleife:
for(int z = 0; z < chunkSize; z++) for(int y = 0; y < chunkSize; y++) for(int x = 0; x < chunkSize; x++)
17
![Page 18: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/18.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Texture Atlas• Einsparung von Performance durch
ein einziges Material• UV Koordinaten müssen auf den
gewünschten Ausschnitt zugeschnittenwerden
18
![Page 19: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/19.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Procedural Content Generation• Autonome Generierung von Inhalten mit limitierten
menschlichen Einfluss
19
• Terrain• Level• Karten• Texturen• Musik
• Regeln• Geschichten• Charaktere• ...
![Page 20: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/20.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Procedural Content Generation• Schneller und günstigere Produktion
– 2D und 3D Assets verschlingen 40% der Produktionskosten (Yannanakis, 2017)
• Ziel: Augmentation der Fähigkeiten eines menschlichen Künstlers
20
![Page 21: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/21.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Procedural Content GenerationPCG Schritte:● Verstehen des Design Prozesses● Auflistung der Einschränkungen● Verstehen des Prozesses● Auswählen einer Methoden zum Generieren● Iterieren
21
![Page 22: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/22.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Perlin Noise• “Smooth and organic” noise• The Theory of Noise: An Overview of Perlin Noise
– https://www.youtube.com/watch?v=H6FhG9VKhJg
22
![Page 23: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/23.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Fractional Brownian Motion• Auch genannt “Fractal Noise”• Mehrere “Oktaven” von Wellen werden überlagert und
führen zu einer höheren Detailgenauigkeit• https://thebookofshaders.com/13/
23
![Page 24: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/24.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
Ressourcen• Implementieren eines Cubes von Hand
http://ilkinulas.github.io/development/unity/2016/04/30/cube-mesh-in-unity3d.html
• Implementieren eines Cubes und Kombination mehrer Mesheshttps://drive.google.com/open?id=1eqwZCBHvnuJtTfQwHIb_hDl8C2jCW4z5
24
![Page 25: - Hauptprojekt - Fachprojekt DET SS 2019 · • Procedural Content Generation • User Interface, Crafting System, Modding System • Kampfsystem und KI • Thema wird bis zum 07.05.2019](https://reader033.vdocuments.mx/reader033/viewer/2022060409/5f1035cb7e708231d447fc43/html5/thumbnails/25.jpg)
Marco Pleines | Dortmund, 30.04.2019
Lehrstuhl 11 Fakultät für Informatik
ReferenzenGeorgios Yannakakis & Julian Togelius, 2018, Artificial Intelligence and Games, Springer
25