Forum

IT WORKS ... kinda ... not really

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

Moderator: InsideQC Admins

IT WORKS ... kinda ... not really

Postby MeTcHsteekle » Thu Apr 16, 2009 1:57 am

SUP, so i did this nuice little tutorial to add motion blur to quake [http://home.earthlink.net/~rottenturd/Tutorials/tuts.html], and it works..in the sense that stuff is blurring. BUT when blur is activated it has this lil nasty side effect where t dosen't draw the map [as in the walls n shit, the other stuff seems ok] but it does draw fullbrights 0_o?

i was thinking screenshot to show what i mean but then i realized it wouldn't show the blur good enough so anywaysexample is here

personaly i think it might be this little spot of code
Code: Select all
   if(gl_motionblur.value > 0)    R_RenderMotionBlur();  //RottenTurd's motion blur
   else R_DrawWorld();  //adds static entities to the list

somthing about it doesn't seem right :S


..oh yeah the source im working from is the, i think its the latest proquake source, with extras crap added by me [model glows, square transparent lingering particles etc.]
bah
MeTcHsteekle
 
Posts: 399
Joined: Thu May 15, 2008 10:46 pm
Location: its a secret

Postby revelator » Thu Apr 16, 2009 9:04 am

sounds a bit like messed up TMU's, had a ton of those to fix when i added bloom to my engine from one of the tutorials since every quake engine and its mother does it a different way :(

some use the original GL_EnableMultiTexture/GL_DisableMultiTexture some has there own TMU switching functions and some even do it directly so its a mess.

and to kick the groin even more some uses TMU paths that where not originally there like TMU2 TMU3.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby Spike » Thu Apr 16, 2009 9:32 am

That motion blur tutorial is a bit vile, truth be told.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby mh » Thu Apr 16, 2009 10:44 am

I've some pretty good OpenGL motion blur code that works well and is happy with TMU switching; I'll post it up later on today. :D
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 MeTcHsteekle » Thu Apr 16, 2009 11:30 am

oh ok's :O



Spike wrote:That motion blur tutorial is a bit vile, truth be told.

would u compare it to a rottenturd?
bah
MeTcHsteekle
 
Posts: 399
Joined: Thu May 15, 2008 10:46 pm
Location: its a secret

Postby Spike » Thu Apr 16, 2009 12:23 pm

Its just that that tutorial is tailored for unmodified quake. It doesn't state what it is doing, nor why it is doing it.
It looks to me like it darkens the screen then draws the world with slight transparency.
Well that does indeed preserve some of the framebuffers contents from the previous frame, at least.
But it doesn't blur alias models. It just draws over the world with those.
And nor does it support texture sorting. Which is actually the faster way to draw the world.
And the amount it darkens the screen by isn't matched by the amount it lightens it again by drawing the world.
And quake is generally not single buffered.
The author binds texture object 0, and still uses texcoords?
Depth testing is disabled for the darkening, but depth writing is left enabled?
And he disabled culling to draw a quad at a known location. When he could have just made it face the camera.
So from a technical stand point, its simply not very robust/consistant.
From a tutorial stand point, the fact that the author's name is mentioned in 71% of the comments implies that they feel that documentation is 30% their name, and 80% copy+paste.

I just wish I could remember where the depth buffer was cleared.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby mh » Thu Apr 16, 2009 12:27 pm

Spike wrote:Its just that that tutorial is tailored for unmodified quake. It doesn't state what it is doing, nor why it is doing it.
It looks to me like it darkens the screen then draws the world with slight transparency.
Well that does indeed preserve some of the framebuffers contents from the previous frame, at least.
But it doesn't blur alias models. It just draws over the world with those.
And nor does it support texture sorting. Which is actually the faster way to draw the world.
And the amount it darkens the screen by isn't matched by the amount it lightens it again by drawing the world.
And quake is generally not single buffered.
The author binds texture object 0, and still uses texcoords?
Depth testing is disabled for the darkening, but depth writing is left enabled?
And he disabled culling to draw a quad at a known location. When he could have just made it face the camera.
So from a technical stand point, its simply not very robust/consistant.
From a tutorial stand point, the fact that the author's name is mentioned in 71% of the comments implies that they feel that documentation is 30% their name, and 80% copy+paste.

I just wish I could remember where the depth buffer was cleared.

And the really funny thing is that you don't even need to do most of those things. In fact you don't even need to capture the framebuffer; the code I have is about 7 or 8 lines and is pure accumulation buffer stuff.
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 Spike » Thu Apr 16, 2009 1:52 pm

mh wrote:And the really funny thing is that you don't even need to do most of those things. In fact you don't even need to capture the framebuffer; the code I have is about 7 or 8 lines and is pure accumulation buffer stuff.

The thing about the accumulation buffer is that I have no idea if it'll actually work on Intel cards.
Well, that and that you have to request one at startup. Eww.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby mh » Thu Apr 16, 2009 2:16 pm

Spike wrote:
mh wrote:And the really funny thing is that you don't even need to do most of those things. In fact you don't even need to capture the framebuffer; the code I have is about 7 or 8 lines and is pure accumulation buffer stuff.

The thing about the accumulation buffer is that I have no idea if it'll actually work on Intel cards.
Well, that and that you have to request one at startup. Eww.

Yeah, it works on Intel. :wink:
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 Spike » Thu Apr 16, 2009 2:24 pm

Same as it works in mesa's software renderer?.. :P
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby mh » Thu Apr 16, 2009 4:54 pm

:lol: :lol: :lol: :lol: :lol:

Judge for yourself...

viewtopic.php?p=16007#16007
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 Spike » Thu Apr 16, 2009 5:21 pm

Wait! That's not a tutorial! It has comments!
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby revelator » Thu Apr 16, 2009 5:35 pm

preposterous !!! :twisted: :lol: :twisted:
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest