Rendering Quake 1 BSP

Started by
1 comment, last by Evil Steve 16 years, 1 month ago
As this is my first proper attempt at a 3d engine (i've previously done 2d engines etc) I'd like to implement rendering for Quake BSP. I've read a lot of articles on the internet but they all seem to be for Quake3. Basically, as my first attempt i just want to create a "BSP viewer" for Quake 1 maps. I figured this might be easier than trying to render the newer BSP formats. Any help is greatly appreciate, i really don't know where to begin for this... I've been reading up on the BSP format and how it works, but i'm unclear on how to implement this knowledge in to practical rendering. At first i'm not fussy about rendering the textures, i just want to render the actual brushes in the BSP, from there i'll extend it to texturing etc. Any help is greatly appreciated, thanks.
Advertisement
Just a quick suggestion: I don't want to discourage you from persuing Quake 1 maps if you really want to, but in my experience I found it much easier to get a Quake3 BSP viewer running. It's really REALLY easy to find documentation and examples for online, and there's plenty of people to ask if you get stuck on something. The only part that you may find a little difficult is curved surfaces (which really aren't bad at all) and the material system's "Shaders" (which you can ignore completely many times and just go for the textures.) In any case, I got basic geometry up and running in a day or so and it just builds from there.

Good luck on whatever you do!
I've written a (brute force) BSP renderer in D3D, it should be pretty similar in OGL. This documentation is very useful, as is the Quake source code (Last link on the page, I don't want to link directly).

I've uploaded the main parts of my BSP renderer, I can't really privide working source though since it's part of my engine.

BSPStructs.h
PMapContextBSP.h
PMapContextBSP.cpp
And slightly less useful, BSP.txt (BSP.vsh, renamed; HLSL vertex shader)

It's still work in progress, it doesn't use the vis data, and doesn't handle lightmaps. But it does handle texture animations and properly textures the world.

An OpenGL version would be easier since you could use immediate mode for a quick and dirty version.

This topic is closed to new replies.

Advertisement