Forum

Bug adding big maps to WinQuake: Unhidden faces

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Bug adding big maps to WinQuake: Unhidden faces

Postby qbism » Thu Nov 04, 2010 11:28 pm

Occasionally in big maps, faces that should not appear in a view are visible. Below is a shot from warpb (Bile Plant) with some offending faces.

When I run it with BJP's WinQuake, which was made to work with Warpspasm, this error does not occur.

Anyone ever run across this issue? I'm just starting to dig into it. I suspect the answer is in the model loading code. In the past I was able to fix the opposite issue of dropped faces by increasing MAX_MAP_LEAFS. Currently MAX_MAP_LEAFS and related maxes in bspfile.h match those in BJP WinQuake.

Image
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Postby mh » Thu Nov 04, 2010 11:39 pm

Are you drawing your skybox at a fixed distance away from the player, like Quake II does? This I guess is a face that would normally be depth-culled but because it's actually in front of the skybox in the z-order it isn't.

The same happens in GLQuake (with added skyboxes). Two solutions.

First is to construct a cubemap from the skybox textures and just draw that on the regular sky faces, reusing the vertex positions as texture coords and translating the texture matrix for them by r_origin. Likely a total pain to port this technique to software Quake.

Second is to do an initial pass for the sky faces writing to Z but not to color. Then do a second pass drawing the skybox where the depth test fails (turn z-writing off for this one). This could probably be very easily ported to software Quake.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Baker » Fri Nov 05, 2010 5:03 am

I'm not sure if this is on-topic or not, but here goes ...

On e1m1 near the area that has the traditional flicker-issue at the Quad secret area there is a clip brush at about the vertical height of the "Earth" image you shoot to open the Quad secret.

And in GLQuake if you jump there, you can hit your head on the invisible clip brush and it impedes your movement. It does so in GLQuake and Enhanced GLQuake. Probably FitzQuake. But I don't believe it does it in JoeQuake, Qrack or DarkPlaces.

What does this have to do with this topic?

I'm not sure off-hand. Still, there may be a link between this oddness and brushes that are not supposed to be seen. I said it was a clip brush, but actually now that I think about it I'm thinking it is just a trigger brush model.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby metlslime » Fri Nov 05, 2010 6:36 am

I bet if you turned on r_showtris in fitzquake, those polygons would be visible as wireframes.
metlslime
 
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm

Postby qbism » Fri Nov 05, 2010 11:11 pm

metlslime wrote:I bet if you turned on r_showtris in fitzquake, those polygons would be visible as wireframes.
They are :shock:
Baker wrote:Still, there may be a link between this oddness and brushes that are not supposed to be seen.
Try r_showtris :)
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Postby qbism » Sat Nov 06, 2010 1:40 pm

I'm more of a "modder" than a "coder", but it appears that FQ (glquake) is projecting the skybox onto the sky faces, vs. discarding those faces and letting the skybox show through in ToChris sky (winquake). So far it's not clear to me if this solution can translate from openGL to software. Need software equivalent of glDisable (GL_TEXTURE_2D) I suppose.

Discarding the sky faces allows unintentional map faces to show through in some locations. As another solution, I wonder if these can be detected somehow by the engine.

I also wonder if these artifacts go away if 'skip' texture is used on the back faces of these brushes during map creation in conjunction with skip removal tool.

[EDIT: further study... 'discard' isn't the right word... the sky is set to infinite distance. Otherwise entities can get behind the sky. Yes, I'm in uncomfortable depth here... ]
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest