Jump to content
  • Advertisement
Sign in to follow this  
wanner

[java] 2D motion blur?

This topic is 3803 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, i am making a little simple game and i want motion blur to get smoother animation. Im using regular java 2d graphics (Graphics2D), and active rendering following http://www.gamedev.net/reference/articles/article2418.asp. I wonder if anyone got some good tips on how to achive some nice motion blur effects when drawing my images, Other good tips for achieving smoother animations are also welcome :) Thank you

Share this post


Link to post
Share on other sites
Advertisement
The only way that comes to my mind is by blitting the image more than once, each time translated in the direction of the movement with different alpha value:

first time: actual position (100% opaque)

second time actual position + direction * (delta * velocity)
(100 - (100/steps) opaque)

third time: second time position + direction * (delta * velocity)
(100 - (100/steps)*2 opaque)

and so on.

Delta could be tought as the movement in pixels for each time unit.
steps is the expected number of steps performed in this frame.
Note that this method may simulate motion blur only for straight movement: if the object rotates around itself, that wouldn't work...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!