Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Nick London, posted on February 03, 2002

Image Description, by Nick London

Not an incredibly exiting image, but this is real-time, incredibly fast motion blur in action. :) I assure you it looks awesome moving, although I cant release any binaries due to the nature of the project, sorry. :P

Incredibly easy to do, all you need to do is disable clearing the Color buffer and render the scene with a low alpha, like glColor(1.0, 1.0, 1.0, 0.2), and viola! Fast and quite cool looking. :)

Only problem is that the objects become transparent (obviously) but this can be fixed by sorting and rendering the polygons front to back. And the problem here is that if you use alpha in any of your textures you'll get wierd results.

But I'd imagine for in-game cutscenes or merely incredibly fast-paced games this effect would prove quite handy, since there's almost no performance hit at all.

Has anyone ever tried this method before? And are there better ways to get around the 'transparent object' problem? Let me know.

Image of the Day Gallery


Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

February 04, 2002, 10:56 AM

As I said "D3D8, I don't know anything else".

It is the API I have just used for my lastest project (I might submit it for the IOTD).

My next project is a realtime video mixing software. I will use a 3D engine to mix the images and play a bit with them (the software will be used in parties and clubs). I am still wondering which API to use (D3D or OGL).
I will use DirectShow to play the movies so there's no "port to Mac and Linux" consideration.

What would U use ?


February 04, 2002, 12:58 PM

Yep - Ive done that and used four different scaled down versions of the scene. It works pretty well except that you get blur 'bleeding' when you get a poly edge that lies in front of one of the depth layers overlapping a poly that is behind it. Still, it works pretty well for blurring things in the distance.

Blurring things in the front was a bit nastier and slower, involving alpha testing to make sure you could in effect 'reverse' the z-buffer.

Putting the two effects together was quite neat, but as this point it started to impact the framerate a bit, so I guess was saved for cutscenes.


February 04, 2002, 02:03 PM

There's another way to do fake motion blur, it's much slower, but tends to look better. Render with normal alpha, but instead of clearing the screen, run a box filter over it, averaging out the pixels. Results in a cleaner picture, and by experimenting with weights you can achieve various effects like focal areas, depth of field blur, non-uniform windshield fog, etc.


David Notario

February 04, 2002, 06:22 PM

macaw, if u paid a bit more of attention instead of jumping, you would see it's not exactly the same thing.


February 05, 2002, 06:03 AM

My intention wasn't to start a flame, but motion blur has not a neat object at the start of teh blurred trail.
The real looking of a motion blur is somehow : forward blurred trail - neat object - backward blurred trail.

For example :

oooooooOoooooooo (where 'o' is blurred and 'O' is the sharp image)

this image looks like Oooooooooo

I can say it for sure, but from the pictures it seems like there is the sharp frame at the "beginning" of the blurred trail, that's not motion blur.

Anyway, (as I said) it looks really cool, I just wanted to be precise (annoying maybe !?!?) :D


Ville Miettinen

February 05, 2002, 01:07 PM

Jari, I pray daily that a-buffers would be available in hardware.. though they wouldn't necessary help in this case... maybe you meant an accumulation buffer?

Hubert Lamontagne

February 08, 2002, 10:32 PM

How about this variant: depending on the movement of the camera, using directional or radial blur.

If the camera is moving to the right, the elements of the picture are moving leftwards, so the picture would be blurred horizontally. Likewise, if the camera is moving backwards or forwards, use radial blur. If the camera is rotating, blur accordingly. The Z buffer could be used to vary the intensity of the blurring. (ie: as an alpha channel)

A problem with this method is that you can't really do it on 3d cards, you have to move your picture from and to the card. Another problem is that moving sprites and such don't get blurred: you could render them to a secondary buffer, blur them, then alpha blend them into the main picture.

This thread contains 37 messages.
First Previous ( To view more messages, select a page: 0 1 ... out of 1) Next Last
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.