Sign in to follow this  
Ganoosh_

Warping spread effect

Recommended Posts

Ok I'm gonna post pictures because it will be a lot easier to explain. This will be done on a bitmap. Basically I have a bitmap for the background, and anytime an object moves, it will create an effect that spreads the pixels of the background away from it, leaving a sort of trail. How would I go about doing this? And it needs to be fast since it will be done on multiple objects per frame. Pictures are below. Thanks in advance Here is what it would look like normally http://i80.photobucket.com/albums/j178/Ganoosh1/test.png Here is what i would look like after the object passes by http://i80.photobucket.com/albums/j178/Ganoosh1/test2.png

Share this post


Link to post
Share on other sites
Maybe try the following for a distortion effect:

Render background onto render target (if background is a texture, this isn't necessary)
Create "particles" emitted from your objects, storing emitted location as well as force
Draw particles using background as texture, sampling pixels at (actual position - force)

I'm not sure what your images show, though. It seems to me like you're just drawing a white trail.

Share this post


Link to post
Share on other sites
It's tranparent, just shows up white cuz of the background. It's basically being split. The "pushing" effect didn't come out too good, just a quick photoshop. Here's a better picture of what i mean.

http://i80.photobucket.com/albums/j178/Ganoosh1/test3.png

Share this post


Link to post
Share on other sites
I think I see what you mean now. The technique I mentioned earlier would work, however there may be a cheaper way to do it:

Render the "smear origin" area to a render target - 64x64 should suffice.

Modify the render target's alpha channel with a falloff as distance increases - see vignette shaders.

Create particles as I mentioned earlier at the object's position, using the "smear origin" texture. The further the particles are from smear origin's position, modify the alpha channel accordingly.

Share this post


Link to post
Share on other sites
Another way to do it would to have a mesh of particles that you render your texture to. Each particle would have a texture cord attached to it. You a little bit of simple physics to push those particles away from the object. You could also have them bound by a week spring so they return to their original position.

Share this post


Link to post
Share on other sites
I dunno if this is what you mean, but what if you rendered to a render target, then blur the render target.

then keep rendering to the same render target and blurring the same render target to achieve visual feedback.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this