Recent blog entries for MJ


Okay, I have an SourceForge Project for my RA2 import/export code. All I need now is time.

Personal time

Hardly any this week, and not for the next two either, I don't think. One of our customers will be launching then, and I have unconvered some problems with the Squid ESI that I am working with Robert Collins to solve. Which means this Memorial Day weekend is gonna involve some non-family time... *grmbl*.

RA2 Export

I now have passable exports of RA2 bots to VRML. If you want to see what I mean, have a look at the example exports of all bots included in the game (plus some extras).

I have also been given permission by our CEO to make all related code Open Source; Zope Corp has no commercial interest in 3D Studio-rleated formats to VRML. bounce.

There still seems to be an edge case in my transformation matrix decomposition code though; some arenas have weirdly rotated items. I'll sort those out eventually.


I had my first Aikido training session last night. Wow, I like this sport very much. It directly addresses all the reasons for stopping with Judo all those years ago.

Insight: My matrix decomposition presents rotations a quaternions, and I still ned to convert these to an angle and axis vector combo. Duh
RA2 export Update 2

Sigh. It is clear that my decomposition of the transformation matrices is incorrect; I get vastly incorrect rotation and sometimes incorrect scaling values. Banging my head against the desk didn't help either..

The problem seems to be that the matrices are assuming a left-handed coordination system, while my algorithms are for a right-handed one. So far, my research has failed to bring up anything useful.

Other than that I have a complete export of all RA2 components, and the minor scaling and rotation issues should be solvable by hand.

8 May 2003 (updated 8 May 2003 at 19:16 UTC) »
RA2 export

Okay, further research has shown me that RA2's Havoc engine must be expecting left-handed coordinates, unlike VRML and 3D Studio Max's right-hand coordinate systems.

This means I'll have to negatively scale all x coordinates and flip all normals. May as well include that rotation around the X-axis as well then (VRML has Y as up, while 3D Studio Max sees Z as up).

Update: Negating the x-axis, and changing the face vertex direction solved the mirror image problem. I still have the rotation problem though; There must be a way to convert the transformation matrices.

RA2 export

Okay, so I have full VRML export working, except that there is a bit of a glitch. Texture maps are applied in mirror view.. Simply flipping the image doesn't cut it either, because then assymetric parts of the map end up in the wrong places.. I also seem to have some problems still with extracting the rotation component from the transformation matrix; items end up at the wrong angle in the wrong place.

Not yet sure how to solve this yet. Inverting the faces from clockwise to counterclockwise didn't solve it for example. I'll actually will have to think instead of just twiddle the values.

For now I seem to be stuck with mirror writing on the exported items.

5 May 2003 (updated 6 May 2003 at 17:58 UTC) »
RA2 exports

Hacked away at the GMI importer over the weekend, and I now can import all .gmf files in the RA2 directory tree! Kewl.

There are plenty of gaps in the model of course, but it doesn't look like I'd need any more information to create VRML models of everything now. At least all files parse and all known fields fall into place.


Few things in the life of a parent are more wonderful than seeing your child win a race; especially when you weren't expecting any kind of placement at all, the race was 'just for fun'. Whee! :)

2 May 2003 (updated 2 May 2003 at 14:39 UTC) »
RA2 exports

Woot! Found text versions of .gmf files (*_txt.gmf). Now I have names for the extension nodes. I knew using a unittest that tries to import *all* .gmf files in the RA2 tree were a good idea.


I cleared the 'people I certed' list; it was way outdated and maintaining it was a pain. Can we have an XML-RPC interface to the account fields please?

Yeah, I am still alive.

For the record, in my spare time I am hacking out a community website to exchange Robot designs for Robot Arena 2; their exchange just doesn't cut it.

So far, I have analysed the .bot and .gmf file formats, and have done some rudimentary exports of both formats to VRML. The .bot file format was easy, it's mostly newline-separated (albeit unlabelled) data with some bitmaps thrown in for good measure; .gmf was a bit harder to crack, until I realised it is essentially a binary version of the 3D Studio Max .ase export format.

Using this we can have 3D previews of uploaded bots. In the process, I learned more about linear algebra than I care; decomposing a 3D Studio Max tranformation matrix into rotation, transformation and scale components was, hmm, 'interesting'. I'll see about releasing the Python version of the Graphics Gems IV algorithms someday.

When did I earn the level 'Master'? *Shrug* Don't count on me adding anything here on a regular basis, BTW.

14 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!