Notes for "The Future of Scene Description on 'God of War'" GDC2019
TLDW Summary: This talk sheds light on the decisions that were made by the Santa Monica Studio’s engine team while tackling the problems of time and complexity in transforming source data into game-ready data.
Keywords
- Data Design
- Data Duality
- Scene Description
- Data Definition Language (DDL)
- Nondeterminism
Presentation Time Stamps
- at min 1 Backgound: Game Content Pipeline
- at min 16 Past: Redefining SmSchema
- at min 20 Present: A view after years of investment
- at min 27 Present: Connecting the parts of the design into one
- at min 37 Looking into the future: many opportunities still remain
- at min 41 Lessons we’ve learned
- at min 43 Q&A
Backgound: Game Content Pipeline
timestamp: 1 min into the presentation
- God of War data breakdown
- What Source Data and Run-time data have in common
- The design philosophy was inspired by the scene description from the film industry
- Patch size was a common enemy
- Nondeterminism made patch sizes huge
- Patching was always an afterthought.
- Parts of the run-time was an afterthought.
- Nondeterminism made patch sizes huge
- Exploring data formats to find a better way
- 2 types of explicit data formats
- Low level: FlatBuffers, ProtocolBuffers
- Higher level: COLLADA and USD
- None satisfied the requirements
- This was the catalyst for the SmSchema Data Definition Language
- The SmSchema proof of concept had 3 main parts
- The definition itself
- C++ code generation with (Jinja Python)
- Sterilization into JSON
- The first attempt to apply it to a real-world problem showed that the mental model that they had envisioned had missing parts
Past: Redefining SmSchema
timestamp: 16 min into the presentation
- Decided to use the serialization as an anchor point to design around
- The redesign started with laying down the foundation with first-prenciples
- Wanted to get away from a JSON-based Language
- Issues with Maya scalability brought more questions that needed answers
Present: A view after years of investment
timestamp: 20 min into the presentation
- The DDL was inspired by Insomniac’s DDL
- Used ANTLR for language definition
- Process of code generation
- Used special Compile-Time Type Info (CTTI) to decouple the DDL and the code generation
- Used a functional approach to make it easier to generate code to any current or future target
- Used special metadata in the form of annotations to enable user-driven code generation without making changes in the parser
- Serialization formats
- JSON - Human readable for merging, diffing and fixing issues
- Leverage open source tools and libs
- Binary - For performance & compression
- Experimenting with MsgPack to encode large assets
- X3D scene loader increased performance by an order of magnitude while saving and loading
- JSON - Human readable for merging, diffing and fixing issues
Present: connecting the parts of the design into one
timestamp: 27 min into the presentation
- The defining structure of SmSchema that brings all of the parts together is called the document.
- The Document is a “Section of data with a header”
- Defining the semantics of pointers used in the referencing solution. Used to reference other documents.
- Pointers was a common request for SmSchema
- See details on the implementation of pointer @ min 28
- The pointer had to provide
- Ownership semantics: unique, weak
- Locality semantics: local, section, external
- Used Frozen/Alive concept to determine if the reference is loaded
- The concept of the section was introduced to SmSchema
- A document is segmented into several memory blocks
- These memory blocks are called sections and are used for storing things like debug data or GPU data
- With the Document structure, they were able to design workflows with a minimum amount of transformations from the source data to the run-time data
- The document could be
- Shipping streaming resource
- A string hash look-up table
- A source X3D scene graph
- The document could be
Looking into the future: many opportunities still remain
timestamp: 37 min into the presentation
- Current and future research
- Challenges with external pointer resolution
- Who is responsible for resolving?
- This led to the creation of a data structure for arbitrating external pointer resolution called the “document store”
- The document arbitration takes a form of transaction
- The combination of the Document Store and Streaming Policies could produce complex decision-making behavior for streaming resources
Lessons we’ve learned
timestamp: 41 min into the presentation
- While answering what is the future of Scene Description on “God of War”
- They understood that there are other questions that they need to answer before answering the original question
- What are the primitives used in the design of
- The engine
- The workflows
- The formats
- What are the primitives used in the design of
- They understood that there are other questions that they need to answer before answering the original question
These notes are just the main ideas of the talk. They don’t contain anecdotes and examples. If you want to learn more, I would advise watching the talk on the GDC Vault.
The Toolsmiths
I took these notes as part of our little “Book Club” for GDC Vault Videos The Toolsmiths #vault club
Koray Hagen is a member of the Toolsmiths community. The Toolsmiths are a community of Game Tool Developers that are passionate about improving the way people make games.
Join us on Slack.
Join us on Twitter.
Links
- The Future of Scene Description on ‘God of War’
- Slides for The Future of Scene Description on ‘God of War’