Tuesday, August 30, 2005

Somehow, it's working

Somehow, my QBSP3 is now correctly aligning textures on entities with 'origin' brushes. This is wierd. I have no idea how it's doing it.

It only happens for QuArK ETP map files, so that would imply that it's something to do with Armin's code that I added yesterday. But it's still wierd, since Armin's code doesn't do it correctly!

Testcase as it appears in QuArK:

Testcase as it appears ingame (using my QBSP3 + my QVIS3 + ArghRad 3.00 beta):

Unfortunately, I've got a fairly serious regression: something I've done has broken my QRAD3. It just doesn't work at all, which is pretty worrying, and I'm not sure how to find out where the breakage is...

Update: It's not my fault! GDW's QRAD3 doesn't work either! Oh, wait... that means I don't have any clues as to how to get it working.

Let's just hope I can get my hands on the ArghRad source code.

Monday, August 29, 2005

Success!

I've successfully added support for QuArK's enhanced texture positioning MAP format, so that means that my version of QBSP3 matches Armin's in terms of functionality, while incorporating most of GDW's enhancements. Yay!

Lots more stuff to do, though. In particular, I want to remove the way-to-frequent appearance of printf in the code to do debugging/error reporting and centralise it into some utility functions (probably in cmdlib.c -- this is the way Armin's QBSP3 does it, by the way). And that's on top of fixing the origin-brush-displacing-textures problem.

Get the Windows build from my downloads directory.

Update: Uploaded new Win32 build with stripped binaries (i.e. download is now a tenth of the size).

Fun and games with QBSP3 and textures

Among other things, the QBSP3 tool is responsible for aligning textures on the faces of polyhedrons, taking its information from the .map file output by whichever editor you're using.

In my opinion, the QBSP3 tool should ensure that the way the texturing appears ingame is identical to the way it appears in the map editor. How else can the mapper know how to get the textures looking the way he wants them to?

So, I thought I'd compare the performance of the various versions of QBSP3 I've got available to me. First off, the testcase, as it appears in QuArK. The two floating boxes are func_wall entities, and the left-hand one has an brush with the 'origin' texture on it to set the entity origin somewhere away from the default. Note that both boxes are identicaly textured in the editor, and the textures are square with the face edges:

This is how it appears using the TXQBSP3-derived QBSP3 modified by Armin Rigo and distributed as the recommended QBSP3 for QuArK. Note that right hand box is textured correctly, but the left hand one has had the textures displaced by the 'origin' brush.

Next, the output of Geoffrey DeWan's QBSP (my build). The textures are distorted, and it fails the 'origin' displacement test.

Finally, the output of the same tool with the -origfix command-line option. This makes an attempt at fixing the 'origin' displacement test, but fails.

So my current aims are to:

  1. Fix texture distortion in my QBSP3 build
  2. To fix displacement of textures when an 'origin' brush is used.

Sunday, August 28, 2005

QuArK, MoinMoin, and Quake II build tools

A bit of a saga to relate.

Since I'm going to be leaving my job, I decided to get back involved with QuArK development. I thought that, since this was a long weekend, I'd be able to get some stuff done.

The first order of business was to get shell access to the QuArK SourceForge project again, because cdunde had removed them while I was inactive (I'm now an admin again -- yay). The reason this was urgent was that SourceForge.net changed the way that project web servers worked, and this had terminally broken the QuArK wiki.

Well, thanks to a very helpful page on the MoinMoin wiki, I manage to get the thing working again, and it's actually working better now than it was before. There are two big problems though: firstly, I couldn't get access to the old database to copy it across, so I had to reset the wiki, which sucks; secondly, the data directory is now world-writeable, which means that anyone can just rm -rf the whol wiki if they want to. So I suppose I'll just have to get round to actually making backups...

Having done that, I moved on to doing some housekeeping tasks: restoring the LatestVersion page (and all of the older version pages), creating page templates, etc, etc. I also wrote an article on HowToInstallQuark.

This morning, I came to start writing some more howtos, and decided to start with an explanation of how to set up QuArK for Quake II editing. While doing so, I realized something suprising, and slightly worrying: the tools recommended for use with QuArK haven't been updated in years, and there are tools with enhanced features that don't work properly with QuArK. So I decided to do something about it.

I got the source code to Geoffrey DeWan's tools, which are currently accepted as the best available, and decided to add the QuArK support functions to them. The only problem was, no Microsoft Visual C compiler. So I duly got out my automake and autoconf manuals, and got busy writing the necessary scripts.

The end result? I've got my own distribution of the Quake II map compilers, available from my website. Madness.

Now to try and add Armin's enhancements for QuArK into the mix. Should be lots of fun!

Saturday, August 20, 2005

Success!

Well, I reached a big milestone with my GDDDS towards the end of this week: I got it working!

Yes, I successfully used it to display an image on one of the groups prototype panels. Over the last week or so I've ironed out quite a few problems with the system. It now takes less than three seconds to download an image into the framebuffer, rather than seven minutes, and it works more reliably in general.

There's just one hitch though: I've got an op-amp that's misbehaving -- or rather, is overheating -- due to my miscalculation of the amount of current it could supply, and I think it might have finally died on Friday. This despite having fitted it with an enormous heatsink.

I've only got about a week and a half left now, so I'm going to write the user manual first and only then worry about the op-amp. I think I've got enough time to get everything working, and then I need to prepare the presentation of my project and results to the rest of the group.

In some ways, it's been very stressful for the last few weeks, but in others very enjoyable. It was really satisfying to see an image finally appear on the panel, and it makes all of the work I've done this year into something really worthwhile.

Monday, August 08, 2005

Church Makeover

Since Christmas our parish church (the church of Our Lady and St Hugh of Lincoln, Witney) has been unusable due to some extensive modifications that have been being made. They were finally completed a couple of weks ago, and I got to see the results first-hand when I went to Sunday morning mass this weekend.

I'd neglected to take any photos of how it was before (mainly because I didn't have a suitable camera back then) but I've taken some pictures of what it looks like now it's completed.

The most immediately obvious change is to the sanctuary and altar. The raised area of the sanctuary has been reduced in size and made rounded in shape, where it used to be rectangular, and at the same time the pulpit that was to the left of the sanctuary has been removed. There's a new (smaller) altar, and a matching lectern.

I'm not a big fan of the curved screens on either side of the altar. I feel that they make the sanctuary seem small|and the area around the altar somewhat cramped. My brothers, who quite often serve for mass on a Sunday morning, aren't pleased about the altar servers not being able to sit in the sanctuary any more, either.

The next big change that's noticeable is the roof and lighting. The new lights are much brighter than the old ones, and a much more pleasant colour: the old lights seemed to be sodium vapour bulbs, and reminded me of sports hall lighting. The new ceiling is lowered slightly, and I believe it conceals a new, thicker layer of insulation that'll help make the church a bit more comfortable during the winter.

Speaking of winter comfort, there's a new heating system installed throughout the church and presbytery.

The big change that I'm least fond of is to the choir loft: its removal, in fact. The loft has been walled off to forma first-floor meeting room at the back of the church, and the organ moved down to a position just adjacent to the sanctuary. There's much less room for the choir down at the front of the church, and I get the impression that the choirmaster isn't very impressed by the new arrangements.

In the corner between the house and the church is the new day chapel, which is going to be used for weekday mass, when the congregation is so often small enough that using the main church feels a little uncomfortable.

Despite my gripes about the sanctuary and choir loft, I|quite like the changes that have been made to the church, and I think that they make it a much more pleasant and inviting place to worship.

Saturday, August 06, 2005

Commuting

Since I got back from Poland I've started commuting by bicycle again. I had had quite a long break from cycling to work, due to a knee injury, but that seems to have fixed itself now, so I'm back at it again. It's about 16 miles each way, so that means during the week I put over 150 miles on the clock.

My bike's a 2002 model Orbit Ventura, which I picked up brand new at a knock-down price in the spring of 2003. According to my highly advanced back-of-an-envelope approximations, I've done between three and four thousand miles on it since then. That's a long way! I seem to get fairly regular punctures (I've got one at the moment), and I think it might be because there's quite a lot of debris on the cycle paths from car crashes: broken glass, random bits of metal, etc. In general, though, the bike's hardwares holding up pretty well: I need a new bottom bracket, but apart from that, everything seems to be okay.

While I was injured (I think I overstrained my knee tendons during my skiing trip in January) I travelled to work by bus. I'd leave the house at quarter to seven to catch the bus into Oxford, and then change to another bus out to the Science Park. Of course, sometimes the bus into Oxford would be late, and I'd have to hang around in Oxford for half an hour. Normally, though, I'd leave the house at 0645 and arrive at work at 0755. On my bike, it's ten minutes faster, and if I'm a couple of minutes late leaving home it's no problem.

All this cycling's going to be good practise for battling up and down Huntingdon Road and Castle Hill in the Cambridge rush hour for the next four years!

Thursday, August 04, 2005

Krakow (part 2)

On Thursday, we visited Auschwitz.

When we got back, we enjoyed a relaxed afternoon and evening at the hotel, most of which I spent chatting to young ladies who had had slightly too much to drink (CM. and EF. in particular). I did, however, find the time to chat with some people from the Suffolk County Youth Orchestra, who happened to be staying at the same hotel and playing the same venues as us, on a tour organized by the same tour company. Incidentally, we saw a poster listing the concerts being given over the summer at the church in Zakopane; nearly all of the acts listed were British, and most were youth ensembles (orchestras, windbands etc).

Some people went in the swimming pool, but I relaxed by doing some karate practise in the hotel's tiny gym. Unfortunately, there wasn't really enough room there: I couldn't string together more than a couple of jumping kicks before meeting a wall. It did feel really good, though, to work out for a bit.

Friday, then, was our last day in Poland, and the weather was really, really hot. Once again, the venue was a church: this time, a beautiful Augustinian monastery curch within about ten minutes' walking distance from the city centre. Unfortunately, we were't able to get the coaches down to the church to unload, so we had to lug the big instruments a couple of hundred metres down little side streets to get them into the venue. There was one house on the route backwards and forwards where I heard very loud dance music playing, and a group of small Polish children watching its doors and windows as we lugged the timps across the flagstones in the baking heat.

Once we'd stored everything safely in the monastery, we walked together to the same coach park we'd stopped at on Tuesday. We had a bit of disagreement in our group about what to do next: PG., CK. and myself wanted to do a bit of shopping for clothes (for the girls) and souvenirs (for me), while most of the rest of the group wanted to lounge around and do nothing. In the end we split down the middle, and half went shopping while the rest sat around and chilled out. Soon after we split, we bumped in to Mr. S. in the street, and he nearly busted us for not sticking together. Fortunately, cooler heads prevailed; in fact, we were saved by Mrs. L. Just about the last thing I expected to happen!

We wandered around for a bit. PG. was looking for some clothes for school, and CK. was, as usual, looking for shoes. I can't remember whether they bought anything or not in the end, but I found a really good t-shirt shop where I bought a t-shirt and a very nice polo shirt. I would have bought more, but they didn't have very much stuff in my size, unfortunately. I also bought a new hat, because I was getting quite worried about sunburn and heat stroke wearing just a baseball hat. The hat was only 35 zt (about £7), but it's a really nice one, and I certainly felt more comfortable with it on!

We met the others for lunch at Pizza Hut. Although we had to hurry through our food in order to be able to get back to the venue in time to set up for a 2:30 pm rehearsal, we really enjoyed our meal. We were really suprised by the price: we got food and drinks for nine people for 130 zt, which is just over £20! The slight downside was that we found that AL. had joined our party, and that he had a hangover and was throwing up everywhere. I think he had some heat exhaustion and was dehydrated, which wouldn't have been helping him much.

The interesting thing about this concert was that EH. had had to fly back to Poland at the crack of dawn on Thursday morning in order to play in the National Youth Wind Orchestra, and so it was that I came to find myself sight-reading the first horn part of the Tchaikovsky (the programme was Cockaigne, Kilar, Tchaikovsky). Fortunately, we weren't doing the Enigma Variations, and I thought it went okay: although I wasn't note perfect, I think I played well enough to deserve to feel happy about it.

Immediately after the concert, we set off for the UK. The only notable things that happened on the way back was an hour-long traffic jam at two o'clock in the morning; getting stopped at French customs because they thought they could smell marijuana in the hold of our coach; and me leaving a large bottle of whisky on the coach and only remembering early on Sunday morning (that was really annoying, let me assure you).

It's hard to believe that that was my last OCYO tour ever; I've been doing the county orchestras (the Oxfordshire Schools' Orchestra, the Oxfordshire Senior Schools' Orchestra and the Oxfordshire County Youth Orchestra) on and off for 12 years, and I've been principal horn in all of them. I really wish I'd journalled what happened on the various tours, like I've done for this one. The real highlight of OCYO was our trip to Canada, and that's rapidly blurring into the past (it was, after all, three years ago now). It's a shame that I'm just so bad at writing things down.

Wednesday, August 03, 2005

Krakow (part 1)

So, I haven't posted to my blog for just over a week. Why? I was on an Oxfordshire County Youth Orchestra tour -- my fifth, and last. Unfortunately I haven't got any photographs, as I neglected to take a camera with me. Again.

This year, we travelled to Krakow, in Poland, to give three concerts. The programmes were chosen from:

Krzesany was met with considerable distaste by many members of the orchestra; it's an extraordinarily abstract work, with many effects used, and the separation into parts hadn't been done particularly well. Highlights for the horn section included 200 bars rest without cues; an entire page of top As; and the opportunity at the end of the work to stand up with our bells up and improvise, loudly, at high speed. I initially hated the piece, but by the end of the tour I was actually quite enjoying playing it.

At the beginning of the tour, we had a little incident with a member of the section which eventually meant that he didn't come with us on the tour. This caused a bit of a headache for the remaining six horn players, and in particular EH. and myself as co-principals of the section, as we had to shuffle everyone around in order to cover the parts. But we managed it, and it all went pretty well for us.

The tour started with the long trek out to Krakow. We left Oxford at 5 pm on Sunday, and arrived at the hotel at 9:30 pm on Monday (both times CET): that's 29.5 hours on the coach! (Well, okay, we had a couple of stops, but most of them just long enough to get to the loo). I found it pretty miserable: I hardly slept at all, because after a few hours the coach seat literally hurt to sit on. I didn't enjoy it one bit.

When we arrived, though, the hotel was lovely! Big rooms, comfy beds, hot showers, free internet. And the food was nice too!

The first morning in Poland was spent at the hotel, where we had a section principals' meeting. As usual, it consisted of Mr. H. telling us what he had decided and then waiting for us to agree with him. We then loaded up the coaches and headed into Krakow (except we got a bit lost, and started off heading out of Krakow). We parked next to the river, near to Wawel (the fortification that dominates the centre of the city), and I headed off with my friends CZ., CM., CH., ZM., and PG. towards the main square to see if we could find some food. CZ. decided she wanted pizza, so we looked around for somewhere that sold pizza. And we were successful! But it was over-priced and not particularly nice.

At 2 pm we gathered back at the coaches, unloaded them and walked the half a mile or so to the venue: a large, gloomy church. The architecture of said church seemed to be Byzantine, but strangely it lacked the characteristic mozaics and marbles; in fact, it was almost bare of decorations... but I digress. While we set up the orchestra it became apparent that we'd be in for some trouble that evening, as the acoustic was one of the wettest I've ever played in. As soon as we started rehearsing, it was obvious we were in for lots of trouble. The rehearsal was appalling: no one could hear each other and there seemed several different tempos going on, chords were drowning out quiet bits bars later, and generally the whole shebang was chronic.

To make things better, once the rehearsal was done we had to take the orchestra apart again and clear the church, so that mass could be said while we hung around outside in the baking sun for two hours in our concert gear (our hot, heavy concert gear). And then we had fifteen minutes to set up the church again and get ready to play a concert. No suprise, then, that the concert (programme of Cockaigne, Enigma Variations and Tchaikovsky) wasn't very good, and Mr. H. flipped out and sent us all to bed early.

While hanging around waiting to be allowed back in the church, I bought a mug.

The next day (Wednesday) we set off early and travelled to Zakopane, a ski resort in the mountains. We were scheduled to take an hour and a half to get there, but in the end it took closer to three hours, due to getting stuck in roadworks several times. The church we were playing in for this concert was a lot better: the acoustic was nicer, we had more space to set up in, and most importantly of all there were toilets. Unfortunately we had the same need to dismantle the orchestra after the rehearsal and then set it up again before the concert, but at least this time we had plenty of time to do so. The concert programme was Verdi, Kilar, Tchaikovsky first three movements, and Enigma Variations, and most of it went very well: the Verdi in particular was excellent. By the time we got to the Enigma Variations, though, people were getting tired, and the tuning in E.D.U. was fairly pain-inducing.

Inbetween the rehearsal and the concert, we spent a few hours in the town centre, shopping and looking around. Zakopane's very touristy: in the winter, it's one of Poland's most popular ski resorts, and in the summer it's a base for mountain activities such as climbing, mountain biking and white-water rafting. The place was very crowded, and the weather hot, but fortunately there was a nice breeze that made it bearable. Many of the souvenir stalls on the central pedestrianised street were selling carved wooden knives and axes, which I found quite suprising; predictably, ZM. bought one, and spent the rest of the afternoon waving it around and saying, 'Look, I have a knife!' I bought a wooden spoon, for some reason I still haven't quite managed to work out.

As usual, CZ. went shoe-shopping, but I'm happy to say that on this occasion she was unsuccessful.

That's enough for now: I'll finish the saga tomorrow.