Warping spread effect

Started by
5 comments, last by rouncED 14 years, 2 months ago
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
Advertisement
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.
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
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.
I see what you're saying. I'll try that. Thanks man
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.
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.

This topic is closed to new replies.

Advertisement