[attachment=23568:1.jpg]
this picture is a gif, you can click it to view animation.
[attachment=23569:2.gif]
[attachment=23570:3.jpg]
[attachment=23571:4.jpg]
[attachment=23568:1.jpg]
this picture is a gif, you can click it to view animation.
[attachment=23569:2.gif]
[attachment=23570:3.jpg]
[attachment=23571:4.jpg]
Save the position and animation from of the player a few times over a fixed interval (such as 3 saves, each 0.3 seconds apart) and draw them each with decreasing alpha (increasing fade-out).
L. Spiro
In addition to what L. Spiro recommends, the "saved" images can be processed by various techniques to achieve (for instance) the "blue outline" in the first image. Google for "godray" and "corona effect" with various graphics terms. There's a little help here on gamedev.
The blue outline can be easily made in XNA by setting alpha to near 0 (which will almost only show the outlines) and give it a diffuse light (which means it glows itself) with the color of your desire.
I recommend to let alpha stay the same in the three ghost-positions and only make blue brighter (like from 0.1f , 0.1f , 0.1f to 0.5f , 0.5f , 0.5f)
Also I recommend to just make three draws of your characters with these settings and let ther positional-change be a little smaller, so it seeps the ghosts comming out
The blue outline is neither a lighting effect nor godrays or even corona. It's fresnel-to-alpha.
I've found some images to prove it, too: http://kylehalladay.com/all/blog/2014/02/18/Fresnel-Shaders-From-The-Ground-Up.html
Apart from that, I agree with the second post - mesh instance is simply duplicated over some fixed interval with fading alpha and fixed bone transforms.
You can also do this trail effect by using a render target with an alpha channel. It should give a smoother result than instancing the trailed meshes.
- Render a fullscreen blended rectangle to that render target with a blending function that reduces the alpha values in that render target by some amount, which provides the "decay" of the trails. This decays the content already on the render target.
- Render to the render target all of the objects in the current frame that need this effect on them.
- Overlay the render target on the screen.
Repeat these steps each frame while you are using this effect. You are essentially using that render target as an accumulation buffer.
Just note that while this works in all 2D cases, the camera must remain stationary for this to work in all 3D cases. If the camera moves in a 3D scene, this method will cause the after-shadows to appear billboarded.You can also do this trail effect by using a render target with an alpha channel. It should give a smoother result than instancing the trailed meshes.
Save the position and animation from of the player a few times over a fixed interval (such as 3 saves, each 0.3 seconds apart) and draw them each with decreasing alpha (increasing fade-out).
L. Spiro
thank you, i have implement it in ue3 with your method.
i try to use a rendering method, but the camera can't move, so...