A follow-up with much greater detail to this post can be found here.
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.
33 thoughts on “Behind Fez : Trixels (and why we don’t just say voxels)”
pixelated 16^3 little carved cubes you say… nice… :)
Wow, that’s beautiful! :)
Anything like a playable demo any time soon?
the project is amazing…
I was pissed that Crush was only going to be available for the PSP, so I really want to try this. When will it be available?
Can’t wait to give this a shot. It was great meeting you at the party on Saturday (I was the guy with the dog). Looking forward to seeing what you come up with next!
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.
trixel work in XNA or only c++?
@Elvis : It’s XNA / C#, but it won’t be released as an engine/toolset… it’s just the underlying technology for development of our game Fez.
have you a limited trile grid size for a level ?
how do you store each triles … x,y,z position at grid or a 3d array ?
@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.
How do you determinate visibles triles, do you parse all level’s triles for camera culling ?
what do you think about octree for fast camera culling ?
In game, do you generate polygons from visibles triles (and trixels) in real time ?
Do you calc collision from trixels ?
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
Im searching so hard to find a place where i can download fezzer. I mean i started wondering about its even avaible at a place or it is just something phil got for himself or what. Please reply!!!
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.
I finally got around to Fez, and it was amazing. Of course, now I’m inspired by the artwork. I was thinking of creating a tool to make trixel art. So my question is:
Can I use the word ‘trixel’ to describe it, or is that something you’d like to keep for yourselves?
Sure, but it would be more accurate and more understandable for people who don’t know FEZ to call them voxels. Be aware that other people are using the word “trixel” to mean other stuff, like hexels for example : http://tedmartens.wordpress.com/2013/01/20/trixel-buildings/
Yeah, I found those other uses while I was looking it up. People will just have to accept that. ;) I think the arguments above for calling then ‘trixels’ are pretty compelling.
fez is amazing :-)
I read each games made with xna/c#, just can released for xna indie game, but, Fez released for xbox arcade,
how it was done?
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.
Thanks ! :-)
XNA Game Studio is very good and easy. The game is being produced more quickly.
Why Microsoft decided not to support the XNA in XBOX ONE?
Microsoft has decided to drop all further work on XNA, so it doesn’t make sense for them to support it for their new products.
They haven’t yet announced a replacement.
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!