Inside3D!
     

IT WORKS ... kinda ... not really

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming
View previous topic :: View next topic  
Author Message
MeTcHsteekle



Joined: 15 May 2008
Posts: 397
Location: its a secret

PostPosted: Thu Apr 16, 2009 1:57 am    Post subject: IT WORKS ... kinda ... not really Reply with quote

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 anyways example is here

personaly i think it might be this little spot of code
Code:
   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
Back to top
View user's profile Send private message AIM Address
reckless



Joined: 24 Jan 2008
Posts: 390
Location: inside tha debugger

PostPosted: Thu Apr 16, 2009 9:04 am    Post subject: Reply with quote

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 Sad

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.
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Thu Apr 16, 2009 9:32 am    Post subject: Reply with quote

That motion blur tutorial is a bit vile, truth be told.
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
mh



Joined: 12 Jan 2008
Posts: 909

PostPosted: Thu Apr 16, 2009 10:44 am    Post subject: Reply with quote

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. Very Happy
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines
Back to top
View user's profile Send private message Visit poster's website
MeTcHsteekle



Joined: 15 May 2008
Posts: 397
Location: its a secret

PostPosted: Thu Apr 16, 2009 11:30 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message AIM Address
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Thu Apr 16, 2009 12:23 pm    Post subject: Reply with quote

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.
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
mh



Joined: 12 Jan 2008
Posts: 909

PostPosted: Thu Apr 16, 2009 12:27 pm    Post subject: Reply with quote

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.
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines
Back to top
View user's profile Send private message Visit poster's website
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Thu Apr 16, 2009 1:52 pm    Post subject: Reply with quote

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.
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
mh



Joined: 12 Jan 2008
Posts: 909

PostPosted: Thu Apr 16, 2009 2:16 pm    Post subject: Reply with quote

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
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines
Back to top
View user's profile Send private message Visit poster's website
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Thu Apr 16, 2009 2:24 pm    Post subject: Reply with quote

Same as it works in mesa's software renderer?.. :P
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
mh



Joined: 12 Jan 2008
Posts: 909

PostPosted: Thu Apr 16, 2009 4:54 pm    Post subject: Reply with quote

Laughing Laughing Laughing Laughing Laughing

Judge for yourself...

http://forums.inside3d.com/viewtopic.php?p=16007#16007
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines
Back to top
View user's profile Send private message Visit poster's website
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Thu Apr 16, 2009 5:21 pm    Post subject: Reply with quote

Wait! That's not a tutorial! It has comments!
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
reckless



Joined: 24 Jan 2008
Posts: 390
Location: inside tha debugger

PostPosted: Thu Apr 16, 2009 5:35 pm    Post subject: Reply with quote

preposterous !!! Twisted Evil Laughing Twisted Evil
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group