The x42 Exporter
"x42" a vertex-skinned format for animated character models designed for Space Trader.
News
03-Jul-2008
Not quite a year without an update.
Scott and I finally sat down and got the Maya exporter compiling under Linux. You can now find make files in the repository.
Also: new file format, documentation has been updated, etc.
08-Nov-2007
For all you PPC fans out there...Libx42 now supports loading byte-swapped files. Enjoy.
02-Nov-2007
Libx42's just undergone a massive refactoring in the file format and animation department. The new system is cleaner, clearer, and much more efficient. Unfortunately it is no longer backwards compatible so if you can't re-export your old models with the new tool you may want to stick to the code in this tag.
You can read more about the rationale behind the changes here.
21-Aug-2007
x42view is dead! Long live x42view(.net)!
I've written a .NET wrapper around libx42. At this time it's Win32 only (since it's written in C++/CLI - I have no intention of making it work through P/Invoke at this point). And on top of the new libx42.net project I've built the new and vastly improved x42view (which now has a '.net' in its name). It includes many features the old one was missing like:
- The ability to browse the model data by bone, influence, tag, or mesh and see which elements are connected to which.
- The ability to view the actual weighting values.
- A topology view that shows split edges and triangle strips.
- A number of diagnostic warnings.
And I'm adding new features all the time.
09-Aug-2007
The exporter just got a major upgrade with a vastly improved triangle grouping algorithm that significantly reduces the number of final groups (each of which displays much better adjacency characteristics).
01-Jun-2007
Anyone that's been following the commit log recently will note a flurry of activity in the x42make and x42maya projects, along with some minor loader code updates in libx42. Here's a breakdown of what's changed:
- Interior bones (those that have no tags or influences attached to them) are now collapsed into their children. This shaves off a large number of bones when working with a complex rig that includes a lot of helper nodes.
- Constant bones (those that have constant-valued animation tracks) are now collapsed into their children (including child bones, attached influences, and any attached tags). Again, this trims off a lot of helper nodes (for example the root-offset bone is no longer exported).
- The rotation data track is now stored as 4 shorts rather than as 4 floats. This has shaved quite a bit off of the file size since any complex model's animation data is mostly rotation.
- The model format now allows the normals, tangent basis, and attribute (texture coordinates and vertex colors) data chunks to be omitted. This can save quite a bit of file space if you don't need that data.
30-Apr-2007
Been a long time since I posted an update on this site. A lot's been done with the x42 format since the last update. We now have an open-source runtime x42 implementation and a dedicated x42 exporter available on the site.
21-Jul-2006
Been a while since I updated this site (as though you couldn't tell by the date). Anyways, as we move closer to publishing a ton of code, I'm finally taking the time to document the x42 format and write up a mini-tutorial on how to actually integrate it into a Quake 3 (or any) engine.
The main section titles have already gone up, and I'll be filling in the missing wiki pages as I can.
Stay tuned for more!
10-Jul-2006
Turns out I'd completely forgotten to run x42 models through mesh strip generation, so the generated triangles were pretty much random (for all I know). This has now been fixed.
13-Jun-2006
Testing with various character models showed that the default track cleaning code was a bit too aggressive on rotations. I've decreased the tolerance for rotation track cleanup and changed the cleanup algorithm slightly to compensate. This has made the test cases look much better. The cost is increased file size.
18-May-2006
As promised, x42 now has a new format. All of the old info is still in the file except that the vertex data has been split into multiple streams. The four new streams are:
- Position and weighting information.
- Normal.
- Tangent, bitangent, with the value of dot( normal, cross( tangent, bitangent ) ), which is always plus or minus 1, packed into the w coordinate of each.
- Texture coordinate and color.
The reason for the split is that some (in fact most) effects and materials don't actually need all of the vertex attributes, and this allows as little or as much information to be sent up to the graphics card as necessary.
If anyone's thinking that I've split the normals form the tangent and bitangent because I don't usually need the tangent or bitangent, think again. It's actually the other way around since I'm reconstructing the normal from the tangent and bitangent post transformation (thus the packed dot product). I'm doing it this way because it eliminates the need to compute (or approximate) the inverse transpose of the modelview matrix per vertex.
17-May-2006
Anyone working with the x42 format is in for a shock: I'm changing it. I just finished the first bit of coding for a new render engine and the new format is going to be much more efficient under the new design. It also opens up an interesting alternative when animating normals. More tomorrow...
12-Apr-2006
The exporter now properly removes useless animation track elements. Basically, any keys that lie in the same line (or whatever the geometric equivalent is for quaternions) get culled down to the first and last entry. In the case of a still bone, it goes down to just the last element (which is all the format demands in that case).
It works pretty well so far. We've run several complex characters through it and we've seen file sizes drop from ~4MB to ~300K with no noticable change in the visuals. How's that for useful?
