Game Development Community

Motion Blur and Depth of Field

by Andrea Fraboni · in Torque Game Engine Advanced · 11/27/2006 (11:50 am) · 4 replies

I see that exist a version of Motion Blur for TGE :

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5686

I work for convert this resource for TSE but are anyone that have just do this conversion ????

Another question concern Depth of Field : I want this effect in my TSE demo but I don't have ideas on how to do it !!!

I seee that in a TSE Legions Demo is implemented !!!

www.garagegames.com/mg/snapshot/view.php?qid=1163

How ??? Can anyone help me ??

Thanks to All for attentions

Bye

^_^

#1
11/27/2006 (12:12 pm)
All of those nice things will be included in the next drop of TSE, I presume. Patience :)
#2
11/27/2006 (2:01 pm)
OK ! Thanks for information ..... I hope this !!!

;-)
#3
11/27/2006 (2:13 pm)
Or you could always integrate them yourself ;) Nah, blur effects actually are pretty easy. Depth of Field is a bit more challenging because it requires a lot of render targets and can get pretty expensive.
#4
11/28/2006 (5:08 am)
And that TGE motion blur isn't the same motion blur used in "next-gen" games: it just blends the previous frame on top of the current frame, creating an accumulative motion trail, an effect so old that was featured in many Playstation 1 games.

Nowadays games are starting to use a better quality motion blur which mimics inter-frame motion blur (also called temporal antialiasing), and looks much closer to the real life blur you see from video footage, photographs of moving objects, or simply waving your hand quickly before your eyes. This kind of blur takes in account the velocity of each pixel on the screen and does a local directional blur based on that.

The DirectX SDK comes with a sample you can look at. I plan to implement something similar in TGEA in the future. You need to:

1) Make TGEA store the previous frame's transform for every object (including the camera)
2) Render all the scene geometry using a shader which outputs the fragments' velocities to a velocity buffer. The velocity is calculated by transforming the vertices by the current and previous transform.
3) Use a shader to blur the color buffer using the velocity buffer values.