19.07.2019 1 Teil 7: 3D-Spiele 7a: Virtuelle Welten Erstes 3D-Spiel ● Monster-Maze (Sinclair ZX81) ● ZX Spectrum “Der sagenhafte Schatz des Minotaurus” Malcolm Evans Historie ● Elite (C64), erstes 3D-Weltraumspiel ● DOOM ▪“Quasi-3D-Spiel” ▪ Nur vertikale Wände ▪ 2D-Leveldesign ● John Carmack (ab 2013 Oculus) ● John Romero (bis 1996) (To win the game you must kill me, John Romero) Painters Algorithm (DOOM) ● Optimierung durch Binary Space Partitioning Painters Algorithm (DOOM) ● Optimierung durch Binary Space Partitioning
18
Embed
Teil 7: 3D-Spiele 7a: Virtuelle Welten - user.uni-frankfurt.dexmatter/VElek-IF-SS19/elek_ss19_12web6.pdf · 19.07.2019 2 Historie II 1992: Alone in the dark (halbgerenderte Szenen)
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
19.07.2019
1
Teil 7: 3D-Spiele7a: Virtuelle Welten
Erstes 3D-Spiel
● Monster-Maze(Sinclair ZX81)
● ZX Spectrum “Dersagenhafte Schatz des Minotaurus”
Malcolm Evans
Historie
● Elite (C64), erstes3D-Weltraumspiel
● DOOM
▪ “Quasi-3D-Spiel”
▪ Nur vertikaleWände
▪ 2D-Leveldesign
● John Carmack(ab 2013 Oculus)
● John Romero(bis 1996)
(To win the game you must kill me, John Romero)
Painters Algorithm(DOOM)
● Optimierung durch Binary Space Partitioning
Painters Algorithm(DOOM)
● Optimierung durch Binary Space Partitioning
19.07.2019
2
Historie II
● 1992: Alone in the dark(halbgerenderteSzenen)
● Tomb Raider
Spiele-Engine
● Darstellung der 3D-Objekte
● Animation der 3D-Objekte
● Spielablaufsteuerung (Skripte)
● Physikalisches Verhalten (fallende Objekte)
● Spielinhalt meist in speziellen Dateiformaten(nicht Teil der Engine)
▪ Z.B. DOOM (WAD-Dateien)
▪ Ggf. Herausgabe von Tools zum Selbstdesign (Mod)
Beispiel
● SCUMM (Lukas Arts)Script Creation Utility for Maniac Mansion
● SCUMM-VM (Virtuelle Maschine zum Spielen von Lukas Arts Adventures)
▪ (keine Verletzung des Copyrights, Original wird benötigt)
Beispiele
● Quake-Engine
● OGRE
● CryEngine
● Unity
● Gamebryo (Creation Engine)
● …
Modding Tools
● Wird von Spielehersteller angeboten
● Wirtschaftlicher Hintergrund:
▪ Spiel attraktiver machen
▪ Erweiterungen werden kostenlos (!) durchPrivatpersonen bereitgestellt
▪ Erhöht die Lebenszeit des Spieles
„Mods (modifications) of a computer game can be made by a person who has legally acquired a licensed copy of the game and exclusively for the purpose of its use on the hardware belonging to the person performing the modification or persons to whom the modification was given on non-commercial basis (such as freely over the Internet).
This means that the person who makes a mod for a computer game can use this modification exclusively on non-commercial basis.
The author of the mod retains authorship and exclusive rights on the mod. However, the resources used for development of the given mod belong to another person. As such, the mod does not wholly belong to the author of the modification, who does not have full control over it (such as for commercial use).“
Statement on Tesnexus
19.07.2019
3
Objekte
● World-Objekte und Charaktere (Menschen, Tiere, Monster)
● Basisobjekt
● Meshes (near, far, Inventar, ….)
● Eigenschaften der Instanz (Scale, Position, etc…)
● Scripte
● AI (bei Charakter)
● Inhalt (z.B. bei Kisten)
● …
Gollum‘s Kiste
ScriptName RiddleChestScript
Short controlvar
Short button
Begin OnActivate
If ( controlvar == 0 )
MessageBox "Voiceless it cries, wingless flutters, toothless
bites, mouthless mutters. What is it?",
"Bat", "Old woman", "Wind", "Wraith"
Set controlvar to 1
ElseIf ( controlvar > 1 )
Activate
EndIf
End
Begin GameMode
If ( controlvar == 1 )
Set button to GetButtonPressed
If ( button == -1 )
Return
ElseIf ( button == 2)
MessageBox "Your answer was correct."
Activate
Set controlvar to 2
Else
MessageBox "Your answer was wrong."
Set controlvar to -1
EndIf
EndIf
End
Script
Story
Referenzen
19.07.2019
4
Patches Middleware
● Fertige Engines (z.B. Gamebryo)
● Speedtree
● Havok / NVidia GameWorks
● Facegen
Speedtree
● Wind
● Dimming(Baumkrone)
● Sanftes Einblenden der Billboards für entfernte Bäume
if (Color.r<0.2 || Color.r>0.8) Color.r = 0.0f; else Color.r
= 1.0f;
if (Color.g<0.2 || Color.g>0.8) Color.g = 0.0f; else Color.g
= 1.0f;
if (Color.b<0.2 || Color.b>0.8) Color.b = 0.0f; else Color.b
= 1.0f;
Update Morrowind Water Shader (2008)
19.07.2019
15
DirectX 10 (Vista)
● Shader-Model 4.0
● GT200 Grafikchip (GTX280)
▪ 1,4 Milliarden Transistoren
▪ 280 Streamprozessoren
Unified Shader
GT200
● 10 Thread Processing Cluster
▪ Je 3x8 Stream-prozessoren
Raster Operator
Raster Operators (ROPs) handle several chores near the end of the ofthe pixel pipeline. ROPs handle anti-aliasing, Z and color compression, andthe actual writing of the pixel to theoutput buffer.
Thread Processing Cluster
Die von NVIDIA vorgestellte CUDA-Architektur (Compute Unified Device Architecture) macht Gebrauch von massenhaft ablaufgesteuerten Threads, wodurch die zur Verfügung stehenden Ressourcen effizient genutzt werden können. Der hohe Grad der Parallelisierung spiegelt sich auch im Hardware-Design einer solchen GPU wieder: Die GPU GT200, die z.B. in der Grafikkarte NVIDIA GeForce GTX 280 zum Einsatz kommt, besteht aus einem Thread-Verteiler, L2-Cache, mehreren Raster Operation Processor (ROP) sowie aus 10 Thread Processing Clustern (TPC). Ein TPC besteht aus 3 x 8 Stream-Prozessoren mit jeweils eigenem Speicher, gemeinsam genutzten Textur-Einheiten sowie einer Steuereinheit für den gesamten TPC. Aufaddiert besteht ein GT200-Kern also aus 240 Stream-Prozessoren, die zu je 24 Kernen 10 TPC bilden
Grafikkarten/chip-Hersteller
● S3: Bis in die 90er führender Hersteller von Grafikchips
▪ Grafiksparte später von Via übernommen
● 3dfx: 1994 mit Risikokapital gegründet
▪ Spätere Rechtsstreitigkeiten zwischen Nvidia und 3dfx
▪ 3dfx 2000 von Nvidia aufgekauft
● 3dlabs: 1994 gegründet, 2002 von Creative Labs gekauft
19.07.2019
16
Grafikkarten/chip-Hersteller
● Nvidia:
▪ 1993 gegründet
▪ 2008 Übernahme von Ageia (PhysX)
● Matrox:
▪ Familienfirma seit 1976 aus Kanada
▪ Heute nur noch im Firmenbereich (Medizin) tätig
● ATI:
▪ 1985 mit 300.000US$ Startkapital gegründet.
▪ Z.B. VGA-Wonder
▪ 2006 für 5,4Milliaren US$ von AMD gekauft
GPGPU(General Purpose
Computing on Graphics
Processors)
● Fermi-Architektur
Fermi-ArchitekturOpenCL
● Offener Standard für (wissenschaftliche) parallele Berechnungen (nicht nur auf Grafikkarten)
● 2 Bestandteile:
▪ Code, der auf der GPU läuft (repräsentiert durch Kernel)
▪ Code der auf dem Host läuft, und welcher die Kernel aufruft