Jump to content
  • Advertisement

Archived

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

Radial zoom blur around a point

This topic is 5243 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

I''m having some problems perfecting this effect... I can get a radial blur around the center of my viewport, but I need it to be around a certain point. I''ve got the back buffer in a texture and I''m ready to draw, but I can''t figure out the math. In case you''re wondering what it''s for, I''m trying to get a cool effect for a special attack in my game. Basiclly it''s a black hole gun and I want a radial blur around the black hole whereever it is on screen. I''m using gluProject so I know the screen XY coordinates of the blackhole.

Share this post


Link to post
Share on other sites
Advertisement
I''m intrested in seeing how this turns out, please post a screenshot when your done.

What the problem is when you scale the captured render, its scaled around the center.



+------------+
| +--------+ |
| | +----+ | |
| | | | | |
| | +----+ | |
| +--------+ |
+------------+



Instead of capturing the whole screen you need to capture an area centered around your object, and when you draw them they need to be centered around your object.

I''m not sure how to go about it, but i''ll give it some thought.

Share this post


Link to post
Share on other sites
Yeah, I was thinking that when I render my scene I would need to render with that point centered on screen. My program is so damn modular I can pull it easily too. I''m just trying to figure out what to do with it then. Right now I''m just coding in other parts of the game waiting for something to hit me.

Share this post


Link to post
Share on other sites
Ok, I think I got a decent looking blur... what I did was capture the screen like normal, then when I draw the blur quad it was twice as big as the screen with about 50 pixels extra on either side. Then with each pass of the for loop I translate over depending on the blur's X and Y position. If the blur goes offscreen, I slowly subtract from the for loop so the user doesn't see the edges of the blur's texture. It could be better but this was all I could get. If you want to see it in action:

www.llamaguy.com/untitled.jpg

It looks really cool when it's moving.

[edited by - LlamaGuy on January 11, 2004 8:17:13 PM]

Share this post


Link to post
Share on other sites

  • 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!