PAGES

Archives

Behind Fez : Trixels (and why we don’t just say voxels)

Alright, here’s a couple of explainations about the rendering technology behind Fez, what we call trixels.

Some people on deviantART and the TIGS blog post have pointed out how these are pretty much just voxels, but with a trendy name. As the lead programmer, I beg to differ… a bit.

First, everything is rendered 3D, at all times. The 2D views are just orthographic (a.k.a. isometric) views of the world from a direction or another. Since the Z component disappears, the character considers the whole world as 2D and can go from very far objects to very close objects without distinction.

Each visible pixel-art tile that you see while playing the game in 2D view is part of a 3D cube, which we call a trile. Each trile is a 16x16x16 volume which is formed of 4096 potential trixels. Obviously, not all trixels are rendered, else it would be incredibly slow… so only the border trixels are considered. But in the data storage, it’s basically a 3D presence array which tells the renderer if a trixel is present/on, or absent/off.

Up to now, I could’ve called them voxels and it wouldn’t have made any difference… but when it comes to rendering, we want every 2D side of the trile to look like believable pixel art, so it needs to be made of smaller cubes. Standard voxel triangulation is complicated because it wants to look as close to the initial (curved, organic) shape as possible… but we don’t! We want that pixelated, 8-bit look.

So we make assumptions. And that allows very intuitive polygon reduction and culling algorithms, allowing pretty good detail on these triles.

As for the texturing, cubemaps are used, which links trixels to pixels even more. Each pixel of the cubemap (so each visible 2D pixel) ends up as trixel of the trile.

So there you have it. Trixels are voxels, but with some special properties, a special (simpler) triangulation algorithm, and in a pretty special game. :)

The pretty pictures :

1st : Pretty ugly trile with sculpted trixels in “fezzer”, the game content editor.2nd : Wireframe version of that trile, computed in realtime; notice how little polygons are needed and used.3rd : A scene, rendered with the game engine.

You guys know that you have to open this up to the game hackers now, don’t you? Even if you have to charge a tiny bit for the engine or editor, keeping the lock on it will make that little “powered by trixels” note in the preview seem like just pretentiousness.

@johann : There’s no finite level size, but for convenience you specify the level size in the editor so that I know where the bounds are. You can specify any size, however.
The very first version of the engine used 3D arrays, but it has too big a memory footprint and it’s annoying to use. I’m using a Dictionary now (java equivalent would be a HashMap), where TrileEmplacement is a struct that contains X/Y/Z coordinates (and with efficient Equals and Hashcode implementations) and the instance is the trile data.

You might want to read the second part ( http://theinstructionlimit.com/?p=200 ), I talk more about the culling mechanisms.
I don’t use an octree because there are easier/faster ways when the camera is almost always axis-aligned.

The polygons are generated for each trile, when compiling the content (so at design-time). Then the game uses geometry instancing to copy+paste the trile to every instance.

Collision is managed per-trile, not per trixel. But I’d need to write a whole article about it… There’s too much to say. :P

It’s an internal tool that I created to make the game, it’s not something you can download. We might make it public much later, but right now it doesn’t make sense because it exposes all of the game’s content.

There are a few XNA games on XBLA (Schizoid, Bastion, Dust:aET,…), but as it was you needed to either find a publisher or get greenlit by Microsoft Games Studios. We went with the latter, since it’s the closest you could get to self-publishing. Now with their ID@Xbox initiative it could change, but I’m not familiar with their policies.

So, does that mean Xbox One is only big-box titles at this time??? There is no possibility for indie games such as Fez, Braid, and SMB on the platform at this time? That’s a very compelling reason to pass on the expense then! I’m sure there’s a plan in place but it seems MSFT rushed this product to market and severed the most intriguing marketplace aspect: the indie games!