This no-content post is brought to you by sloth, incompetence, and malfeasance. I have lots of content in the pipeline, but I recently got sidetracked by a project that I figured ought to take “a few hours”, and has now devoured much, much more than a few hours.
It all started when my son Issac showed me a Garry’s Mod level he was working on…
I thought this looked really cool. We started talking about what you could do with this. Eventually I got the idea in my head to load this map in Unity. That seemed like a fun afternoon project. After all, Gmod uses the Source Engine 2 BSP format, which is based on the Source Engine format, which is based on, no kidding, Quake 2. That engine is literally older than Issac. Some of the games that use these maps are open source. It should be trivialFamous last words. to load that into a modern setting and render it. I might need to flip some coordinates around or do a little scaling to get the map right-side-up and sized properly, but that’s easy. I can probably bash this out in a couple of hours.
So I underestimated this project by an order of magnitude or so. The main problems were:
- It’s been like 18 months or so since the last time I looked at Unity. I never fail to be amazed at how much you can forget in that span of time. I spent ages stumbling around, Googling things, and then slapping myself in the forehead saying, “Oh, right, right. THAT’S how that works.” It’s exactly like being a newbie where you don’t know what you’re doing, but then when you look it up you feel dumb because you realize you used to know this.
- Yes, it’s good when technology is old because that means the documents are mature and all the likely pitfalls have been documented and explained on StackOverflow. But that only helps up to a certain point. If something is TOO old, then modern knowledge-sharing sites won’t cover it and all the docs are 404 links. This is the only document I could find. It’s good, but it’s not detailed enough to work as a full spec. There are some very important details that it leaves out and that can’t be intuited or guessed.
- Yes, being old is good because graphics engines were simpler 23 years ago. They didn’t have to contend with shaders or any of the complex modern lighting systems. It was just a bunch of polygons that you shove over to the GPU. Kid’s stuff, by today’s standards. HOWEVER, those games were ALSO pushing up against the hardware limitations of later-90s devices and so they had lots of optimizations that would be pointless (or even counterproductive!) by today’s standards, but which make the code very hard to follow. Yes, a ground-up implementation of Quake 2 would be easy to do today, but the versions of yesteryear needed to be much more complex, and that complexity makes it seem very convoluted.
This was all very clear after the first couple of hours. At that point a responsible man would shelve the project and get back to work on the blog. This was obviously turning into a boondoggle and I had more important things to work on. (Like, for example, content for this blog.) But at that point I just couldn’t let it go. I wasn’t working on it because I needed to see a BSP in Unity. I wasn’t working on it because I had a brilliant idea for a game. I was working on it because I couldn’t rest until I’d solved the problem.
I’m not going to do the math and figure out how much time I threw into this hole, but it was more than a reasonable person would spend on a project with no particular goal beyond, “It might be cool if I did this.” After $unreasonable_number of hours, I FINALLY managed to read the geometry, figure out how the polygons were formed, get them all facing the right way, and sort out the surface normals.
The other thing that ate a bunch of time is that I was a fool and tried to use Unity’s new raytracing system. I’ve said before that Unity’s docs are always criminally incomplete. The docs will tell you 75% of what you need to know, but then that last 25% is folk knowledge that you can only obtain by pleading for help from other users.
If that’s the state of their regular documents, then you can imagine what a patchwork the beta documentation is. I slammed my head against this problem for about half a day, just trying to render a simple box room with a few small objects and a couple of light sources. Everything the engine was doing claimed that it was raytracing, but it was very obviously still using current-gen shadow volumes and regular shaders. Also, sometimes the docs talked about “raytracing” and other times it talked about “path tracing”. Now, from the point of view of the gaming public, it’s 100% okay to use these terms interchangeably. That’s fine. I do it myself. You can’t afford to stop and explain to Joe and Jane gamer the difference between the two every time the topic comes up. But I feel strongly that if you’re making an engine for developers, then you should be 100% clear about what the engine is supposed to be doing.
As an example of what a disaster area the docs / tutorials are. You get exactly one example project of raytracing / path tracing. If you open it in the latest version of Unity, then Unity will complain that it was built using an older version of the platform and might not work. (Which is true. It doesn’t render properly.) So then you download the previous version of Unity. That version claims the project is too NEW, and it won’t even compile. So the one example program they offer is for some in-between version of Unity that is no longer available. I’m sure you could fix the demo program, if you already knew how it was supposed to work. But since the point of this project is to teach you that, you wind up with a chicken vs. egg problem.
In the end, I threw away all the raytracing stuff. It’s obviously not ready for casual inspection, even by hobbyists. I’m sure it’ll be ready for general use in another couple of months, and the documentation will be done in the next decade or so. Maybe I’ll try again if I live to be 60.
Anyway. That’s why you didn’t get a post today.
 Famous last words.
How to Forum
Dear people of the internet: Please stop doing these horrible idiotic things when you talk to each other.
Juvenile and Proud
Yes, this game is loud, crude, childish, and stupid. But it it knows what it wants to be and nails it. And that's admirable.
What was the problem with the Playstation 3 hardware and why did Sony build it that way?
Why Google sucks, and what made me switch to crowdfunding for this site.
Spec Ops: The Line
A videogame that judges its audience, criticizes its genre, and hates its premise. How did this thing get made?