Archived

This topic is now archived and is closed to further replies.

jesshang

problem: motion blurring using glAccum

Recommended Posts

I''m trying to get motion blurring to work for my game engine. It''s a racing game, so I want the car to blur when it''s going really fast. Here''s a general outline of what I''m doing: within my draw function I 1. draw the objects in the scene 2. use glAccum(GL_MULT, .8); 3. glAccum(GL_RETURN, 1.0); which doesn''t work. Is this because I''m not really accumulating any frames on top of each other, which would give a blurring effect? Unlike the examples I''ve seen, I''m not drawing a stationary object, moving it and drawing it to the accum buffer, and returning it (swapping it to the color buffer). Is that where I''m going wrong? Maybe I''m not sure what glAccum(GL_MULT, value) does exactly. Could someone clarify what it''s actually doing, please? It''s drawing the scene, then it''s multiplying each value (R, G, B, A) of the accum buffer by the constant I specify, then returns the accum buffer to the current color buffer that''s being written to. When does the scene that was rendered before calling glAccum come in to play? Any help and/or explanations would be greatly appreciated. Thanks, Jessica

Share this post


Link to post
Share on other sites
The accum buffer isn''t implemented on hardware for any current video, even if you do get this to work, it will be too slow for a real time racing game. Instead try the gametutorials method, render your scene to a texture and then blend that over the screen in ortho mode

Share this post


Link to post
Share on other sites
Well, I looked it up and yes those cards do have a hardware accum buffer, that is quite cool!! Too bad I wrote a lot of code to encapsulate the functionallity described in the gametutorials.net code. Oh well.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Thanks for your replies. I am using the geforceFX. Can anyone help with the questions I originally posted?

Thanks,
Jessica

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I think I got it.
Thanks for your suggestions.

Jessica

Share this post


Link to post
Share on other sites
Rainbow Six: Raven Shield has a nice-looing blurring effect when you get killed. How did they achieve that? RS runs on GeForce2MX with that effect, so I guess pretty old cards should be able to do this fast enough.

Far Cry also has something like that... But I don''t know if that effect is only for higher end cards on that game though.

-Trond

Share this post


Link to post
Share on other sites