Thursday, March 3, 2011

A rant about r_mirroralpha

When GLQuake was released it came with a few additional features over software Quake - shadows, water alpha and mirrors. If you're one of those strange people that actually reads readme files, you'll know that these are intended as novelty features. If not, let me quote the relevant part of GLQuake's readme at you:

novelty features
----------------
These are some rendering tricks that were easy to do in glquake. They aren't very robust, but they are pretty cool to look at.
Now, it should be quite clear what the intention is here, and there's lots of things wrong with these features. Water doesn't depth-sort properly, shadows only work on flat planes, and mirrors have all manner of restrictions. However, and for some bizarre reason, over time these have come to be seen as somehow "essential" features of GLQuake, despite their original stated intention. People want to see their crap shadows and they want to see their crap mirrors. And will sometimes get very upset if they can't.

As a generalisation, with a novelty feature you have maybe 3 options. You can work on it and build a more robust implementation. You can accept it as a novelty and leave it as it is. Or you can drop it. With DirectQ I've taken all 3 approaches.

For water alpha I did the work and added proper depth sorting against both other water surfaces and other alpha objects. For shadows I just said "whatever" and left them largely as they were; I did remove the angle to resolve one rendering glitch when a MDL goes offscreen but it's shadow remains onscreen, slightly de-crappified them by using the stencil buffer and allowing intermediate values of r_shadows, but otherwise I did the bare minimum. And I killed mirrors until they were dead.

I don't know about the rest of you, but r_mirroralpha was one of those things that I turned on once, looked at the crap mirror, then turned off again and carried on getting on with the rest of my life.

The problem with Quake mirrors is that they need a more sensible standard built up around them. Otherwise it's just not possible to build a proper implementation, and they will always be crap. Let's quote from that readme again:
This changes one particular texture (the stained glass texture in the EASY start hall) into a mirror. The value is the opacity of the mirror surface.
Well whoop-de-fucking-doo indeed. This just isn't good enough; they need a proper texture naming convention, proper usage guidelines for mappers, and this just isn't it.

So, as a postscript, I'll finish by saying that I occasionally get requests from people for stuff. I haven't had a request for restoring the crap mirrors yet (which kinda confirms that most others don't see them as a big deal either), but just in case I ever do, this is to save you the time and effort required to ask, and to save me the time and effort required to answer.
No.
I won't.
And that's final.

2 comments:

=peg= said...

Amen! Sure it would be nice if mirrors actually worked properly, but to me, that certainly is not a big deal ;)

Baker said...

Haha!

I love MH.

Yeah the mirrors are crappy. But they are neat.