Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I wanted to know how one would implement this motion blur or fade effect behind the soccer ball .

Here is what I was thinking . You have the balls current position and you also keep its previous position(couple of sec back). and you draw a "streak" sprite between the 2 points.

I have seen this effect lots of time implemented for projectiles in various 2d games and wanted to know if there is a standard technique.

enter image description here

share|improve this question
add comment

2 Answers

up vote 9 down vote accepted

That looks more like a trail than motion blur. Here's how you can achieve that:

  1. Have a small transparent image with a white, isosceles triangle on it.
  2. Draw this image stretched ( proportionally with the ball's speed ), rotated along the ball's direction.
  3. Draw the ball on top of it ( so that it hides the triangle's base )

Here's an image to help you understand:

trail effect

Of course, you trail doesn't have to be a triangle. It can be an isosceles trapezoid. It can also have a lower alpha so it blends with the background. It can even have a gradient alpha to fade away from the base.

This method is easy to implement, is parametrized by direction and velocity, and it's highly customizable. You can get almost any effect you want with it.

share|improve this answer
1  
To be fair, if he had said he wanted to know how to implement streaking in a sports game (instead of motion blur), it might have gotten some NSFW answers. :) –  Sean Middleditch Nov 19 '12 at 17:52
    
thanks for the pictures. –  PlayerOne Nov 23 '12 at 6:10
add comment

One way is to have a intermediate bitmap for the motion blur. At start of frame it's replaced and old motionblur bitmap is rendered in it with a little less opacity.

All objects that need to have motion blur have some wrapper that catches the rendering of object and transfers it to this bitmap at full opacity.

At end of frame the motion blur bitmap is rendered to screen.

This is not exactly the method your example seems to use though, and it doesn't seem to use real blur but some cheaper technique.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.