Racing Ghosts (As this unfolds)
Moderator: InsideQC Admins
37 posts
• Page 3 of 3 • 1, 2, 3
Re: Racing Ghosts (As this unfolds)
I can always revisit this and do dynamic allocation, but I don't want to do this now because other things on my list that interest me more. I don't disagree that eventually I should use dynamic memory allocation, but I can do that in the future.mh wrote:it's a cop-out, it's saying "I can't be bothered fixing this right, you deal with it"
Yet I'm rather convinced what I have done above is a user-transparent solution that will work for 100% of the single player releases at Quaddicted and any Quake mod that works with GLQuake.
I have a list of things I want to get done. I can always come back and do the optimal solution later. But keep in mind that the optimal solution like DarkPlaces/FTEQW/DirectQ do may have an advantage of 0.000000% over this solution in the actual real-world usage that someone is going to do with FitzQuake.
The really exotic mods that actually exist that are capable of causing problems don't target GLQuake, they'd be DarkPlaces/FTEQW mods and I don't think someone is going to FitzQuake with them (if any of them even work with FitzQuake). And if someone actually found something that broke my scheme, everyone knows where to find me.
I am for the ideal solutions. I only have so much time, so will I take what is likely a real-world 100% solution that isn't actually perfect from a design standpoint? For now, yes!
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Racing Ghosts (As this unfolds)
baker, regarding transparent models - draw the model with glColorMask(0,0,0,0); once, then draw it again with glColorMask(1,1,1,1);glDepthFunc(GL_EQUAL);
first time around you write just the depth (nothing actually visible at all), second time, you actually write colour, but only for the surfaces that actually match the nearest depth value written, resulting in a 'solid transparent' model. That's the theory, anyway.
would that be transparency of a backface culled model?
-

gnounc - Posts: 424
- Joined: Mon Apr 06, 2009 6:26 am
Re: Racing Ghosts (As this unfolds)
Spikes's method there doesn't backface cull in the literal sense, but causes the "backfaces" to Z-fail in the renderer.
So while it isn't actually backface culling, for what you see on the screen it might as well be.
[I haven't tried it yet, but it sounds like it should work ...]
So while it isn't actually backface culling, for what you see on the screen it might as well be.
[I haven't tried it yet, but it sounds like it should work ...]
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Racing Ghosts (As this unfolds)
Not so much as "back face" culling as "embedded face" culling: back face culling is already done for alias models.
As an aside, I have to double check, but I believe the player model's verts are nicely organized something like: body, gun, axe. If that's true, it would be possible to optionally not draw parts.
As an aside, I have to double check, but I believe the player model's verts are nicely organized something like: body, gun, axe. If that's true, it would be possible to optionally not draw parts.
Leave others their otherness.
http://quakeforge.net/
http://quakeforge.net/
- taniwha
- Posts: 399
- Joined: Thu Jan 14, 2010 7:11 am
Re: Racing Ghosts (As this unfolds)
Here is the un-cleanedup source code to create a ghost.
http://quake-1.com/docs/utils/_Fitz_Mark5_R8_Demo5.rar
Type "ghostdemo demo1; map e1m3" in the console after compiling.
I'm mostly releasing the source in this thread right now since right now I'm in the midst of coding other stuff and don't want to take a hour cleaning up the source. To clearly see the changes, WinMerge or diff against FitzQuake Mark V Revision 7 ( http://quake-1.com/docs/utils/fitzquake_mark_v_r7.zip )
I don't want to hold back anyone who has any ideas or thoughts or curiosity ...
http://quake-1.com/docs/utils/_Fitz_Mark5_R8_Demo5.rar
Type "ghostdemo demo1; map e1m3" in the console after compiling.
I'm mostly releasing the source in this thread right now since right now I'm in the midst of coding other stuff and don't want to take a hour cleaning up the source. To clearly see the changes, WinMerge or diff against FitzQuake Mark V Revision 7 ( http://quake-1.com/docs/utils/fitzquake_mark_v_r7.zip )
I don't want to hold back anyone who has any ideas or thoughts or curiosity ...
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Racing Ghosts (As this unfolds)
Spike wrote:glColorMask(0,0,0,0); once, then draw it again with glColorMask(1,1,1,1);glDepthFunc(GL_EQUAL);
Spike, thanks for this great trick! I just tried it with an alpha situation that is virtually impossible to cull and it worked perfectly.
Happy factor +1.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Racing Ghosts (As this unfolds)
you'll likely still need to sort transparent models with respect to each other, of course
you can write all the depth first, then the transparencies, but doing so will not show models through other models.
you can still do alpha testing with it too, for fence testures, if needed.
you can write all the depth first, then the transparencies, but doing so will not show models through other models.
you can still do alpha testing with it too, for fence testures, if needed.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
37 posts
• Page 3 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 1 guest