Determanistic Asset Creation

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Determanistic Asset Creation

      So I'm implementing the "Level File" right now in my personal project and I'm having horrible flashbacks to a previous project I worked on and I thought I'd throw out some pearls of wisdom.

      As many of you know, most commercial game engines not only "package" their assets, similar to how GCC zips them together, but also "compresses" or "finalizes" or "cooks" the individual files so they are as compressed/optimized as possible. If any of you ever work on the "Asset Pipeline" remember this -

      Generating Final Assets should be deterministic.

      What does this mean, deterministic? It means, if 10 different developers sync down to the latest and they take the same raw assets and finalize them, they should generate the EXACT same finalized data. If they trade and mix and match the finalized files among themselves, as long as they are using the same game exe then the assets should work fine and the game should perform identically. Here are a few examples of why this is important

      1) Budgeting
      Say you have a finalized image asset. Say you're worried about this particular image using up too much memory in the memory budget, or using too much bandwidth in the streaming budget, or using too many CPU cycles when being decompressed/processed. If the finalization process is variable ( not deterministic ) than how can you know that for a later build this asset, unchanged, won't suddenly require more Mem/CPU resources.

      2) Reproducibility
      QA says "When that asset is visible on screen FPS drops by 50%"
      Artist says "Works fine for me"
      Reason - Compression is variable when the asset was finalized. The build QA is using compressed the asset much more and now performance is impacted on his machine.

      3) Diffing
      If something unexpected has changed between 2 builds you want to be able to compare, aka diff, 2 asset files. Say you are looking at player_teapot.xml in GCC. That file has 4 components. How easy will it be to find whats changed if the editor reorders all the components and their properties every time? If the spacing and tabs are inconsistent?