Fez Viewer

FezViewer

Fez is probably my favorite game of all time. I wanted to do a bit of a tribute to the game as a personal project (I was originally hoping to make some papercraft). To help get a better view of the game, I was looking for a way to visualize the levels. After some research I found that there was a group of fans that had reversed the file formats for the game, and wrote some tools to dump the game data. “fesh0r”, a member of the Xentax forums, wrote a tool called fez_parse that is capable of dumping the game contents from the XBOX version, as well as viewing some of the 3D models from the game. You can view the forum post here. After the original forum posts, fesh0r updated fez_parse (renamed xnb_parse) to dump the PC version’s content, and released posted it to github. This is some amazing progress, but unfortunately there was still no way to view full levels in 3D, so I decided to give it a shot. The programmer for Fez, Renaud Bédard, has several very insightful blog posts on Fez (and many other things), including how the content creation tool for Fez (called “Fezzer”) generates triles. His blog, The Instruction Limit, contains a ton of great posts, but here was a helpful one to read when writing the viewer.

 

Download:

FezViewer v0.2 for Windows
FezViewer v0.2 for Mac OSX
Source Code
xnb_parse

 

How to get the content:

PC Version

  1. Buy Fez on PC (fez_parse requires a windows PC)
  2. Find Essential.pak and Other.pak in the “Content” directory
  3. Download xnb_parse (a.k.a. fez_parse)
  4. Copy the .pak files into the fez_parse “Content” directory
  5. Run full_export.bat
  6. You should end up with an “export” folder, everything else is unused

XBOX Version

  1. Buy Fez on XBLA
  2. Transfer Fez files to PC (fez_parse requires a windows PC)
  3. Unpack files to get Essential.pak and Other.pak (le fluffy, etc.)
  4. Download xnb_parse (a.k.a. fez_parse)
  5. Copy the .pak files into the fez_parse “Content” directory
  6. Run full_export.bat
  7. You should end up with an “export” folder, everything else is unused

 

How to use FezViewer:

  1. Run FezViewer.exe
  2. Press ‘O’ to select a file, or drag and drop a file to open it
  3. Level files are .xml files in the “levels” directory
  4. Art Object files are .xml files in the “art objects” directory with the suffix “ao” (e.g. “big_owlao.xml”)
  5. Navigation works like Maya
    1. Left click and drag to rotate
    2. Right click and drag to zoom
    3. Middle click (or alt + left click) and drag to translate
  6. Press ‘F’ to fullscreen
  7. Press ‘ESC’ to exit

The levels are defined in .xml, and this initial version of the viewer loads the “triles” (polygonized 16x16x16 voxel sets) and “art objects” (detailed models). The level files also contain bounding volumes, the relevant scripts for that level, the background planes, soundtrack information, etc. There are a number of features I would like to add in future updates, including:

  • Faster loading (RapidXML seems very slow)
  • Better perspective camera controls (FPS style)
  • Orthographic viewer, similar to the game
  • Load background planes (particularly useful for interior rooms)
  • Exporter to wavefront .obj files

I noticed a few interesting things in the process of writing the viewer. One thing that stood out to me was that the levels contain triles not just for the outer hull of the level, but rather there are a ton of never-seen triles on the interior of the level. I’m not sure precisely why these are defined, since they probably just waste space in the instanced draw and a bit of time to clip out. I also found it interesting that certain objects that I would normally consider some kind of special “character” objects are actually defined in the level; for example, the cube pieces are actually part of the level geometry. I found a number of triles with an index into the trile set of “-1″, which I just skip over when loading the level. My best guess is that such triles were originally added using Fezzer, then removed and marked for delete using this “-1″ index instead of totally removing the geometry data. There were also some more minor curiosities, such as all art objects requiring a shift of (0.5, 0.5, 0.5) to line up correctly with the trile data, or the differences between “TrilePosition” and “TrileEmplacement” (I got the best results ignoring the emplacement).

I hope other fans of the game find this tool interesting!

FezViewer - Zu Throne Ruins

FezViewer - Mine Bomb Pillar

FezViewer - Sewer Fork

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>