qbsp3 (Quake2) vertex corruption fix

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
Jay Dolan
Posts: 59
Joined: Tue Jan 22, 2008 7:16 pm
Location: Naples, FL
Contact:

qbsp3 (Quake2) vertex corruption fix

Post by Jay Dolan »

One of our intrepid contributors, tapir, found and fixed a 20 year old flaw in qbsp3, the Quake2 BSP compiler. If you've ever struggled with complex, intricate brushes being mangled by qbsp3, consider adopting this one-line fix:

https://github.com/jdolan/quetoo/pull/241/files

This epsilon value specifies the threshold the compiler uses to determine if a vertex requested by a winding is "close enough," or if a new vertex should be allocated. The original value of 0.5 means that no two vertices can be closer than 0.7 units -- they become merged into one. This leads to hairline cracks in brushes pretty often, especially in curved geometry (arches, spherical volumes, etc).

Changing this epsilon to 0.1 fixed numerous errors in several of our more intricately brushed maps. I highly recommend it for other idTech2 projects still kicking out there.
Dr. Shadowborg
InsideQC Staff
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Re: qbsp3 (Quake2) vertex corruption fix

Post by Dr. Shadowborg »

Nice, I'll give this a try later in my modded jitspoe qbsp3 later as the point epsilon in faces.c was only set to 0.4.

Thanks again! :smile:

edit: whoops it was actually set to 0.04 in my version O_o. Nevertheless, this is something that is essential as q2bsp compile tools desperately need updating.
Jay Dolan
Posts: 59
Joined: Tue Jan 22, 2008 7:16 pm
Location: Naples, FL
Contact:

Re: qbsp3 (Quake2) vertex corruption fix

Post by Jay Dolan »

Hah, I'm not surprised that Jitspoe already fixed this in his tools :)

I read in another thread that you're doing some idTech2 work. We should talk! Maybe our projects could share or combine our efforts. If you're at all interested in that, please find me in #quetoo on Freenode.

Jay
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: qbsp3 (Quake2) vertex corruption fix

Post by qbism »

I've been poking at qbsp3 and the other tools, intending to improve the v220 map compiling for J.A.C.K. The tools also work with standard q2 map format. But I haven't touched it for a while and not enough testing to release.
https://github.com/qbism/quake2-220-tools
Search for "//qb" code comments. Small fixes for linux compiling, path determination, Jitspoe fixes.

The q3rad radiosity changes from Alien Arena tools fix some dark edge and banding problems.
Jay Dolan
Posts: 59
Joined: Tue Jan 22, 2008 7:16 pm
Location: Naples, FL
Contact:

Re: qbsp3 (Quake2) vertex corruption fix

Post by Jay Dolan »

Cool, right on. I will sift through this in the near future. Thanks for sharing!

Btw, is J.A.C.K. open source or what? I would totally consider providing OS X support for them.. but I can't even find a link to a repository or anything.
Dr. Shadowborg
InsideQC Staff
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Re: qbsp3 (Quake2) vertex corruption fix

Post by Dr. Shadowborg »

Nice, I'll have to check it out too later. :smile:
hogsy
Posts: 198
Joined: Wed Aug 03, 2011 3:44 pm
Location: UK
Contact:

Re: qbsp3 (Quake2) vertex corruption fix

Post by hogsy »

Jay Dolan wrote:J.A.C.K. open source or what? I would totally consider providing OS X support for them.. but I can't even find a link to a repository or anything.
It was supposed to be made open-source but that's yet to happen. I have my suspicions as to why that is but I guess we'll have to wait and hear, though it was quite a few years ago when they said it would be made open-source from what I recall.
Post Reply