Sign in to follow this  

how to implement ghost shadow effect like these pictures?

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

[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]

Edited by db123

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Edited by snake5

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

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.


L. Spiro

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

This topic is 1181 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.

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