Jump to content
  • Advertisement
Sign in to follow this  
abdellah

motion blur with trancparency

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

hello

i want to implement the trancparency in motion blur effect, i want to use for this purpose only the render states : BlendFactor ,DestinationBlend = Blend.InvBlendFactor and SourceBlend = Blend.BlendFactor, how can i do that?

 

Share this post


Link to post
Share on other sites
Advertisement

Can you be more specific about the effect you want to achieve?

 

You can motion blur anything you want as a post process without too terrible overhead, but it will also appear to blur the stuff behind the moving transparent object, and that might not be what you want.

 

Otherwise, you'll need to use two different buffers to store your velocity information to apply motion blur to the scene and to all of your transparent items accumulated in another buffer, and then put them together.

That seems like it might be a bit heavy.

 

Are you sure a frame bleed won't suit your purposes?  That's kind of like a cheap motion blur, and it will work on everything in your scene.

 

If not, then you can also do it with the texture and geometry itself, although it will increase the complexity of whatever you're blurring because you'll have to draw it twice (once opaque, once stretched in the direction of movement and partially transparent), and I'm not sure that looks great either.

 

There may be other methods too, but I'd have to know what you need it for.

 

 

EDIT:  Your attachment didn't load for me before, but I'm not really sure what I'm looking at here.  So you're using an alpha'd model on top of your other model to approximate motion blur with extra geometry?

Edited by StarMire

Share this post


Link to post
Share on other sites

i need a simple technique using trancparency decreasing 

 

if you taken a look at my motion blur in the image, i have used that that technique but i did'nt love it

 

if you have a simple shader (verry verry simple) that describes the basics of a motion blur without errors when i convert it, please give it to me.

Share this post


Link to post
Share on other sites

my image describe my scene with motion blut applied only to the sphere, 

 

ya i have use the alpha blending technique , but i want a simple shader & a COMPLETE shader please,

Edited by abdellah

Share this post


Link to post
Share on other sites

i need a simple technique using trancparency decreasing 

 

if you taken a look at my motion blur in the image, i have used that that technique but i did'nt love it

 

if you have a simple shader (verry verry simple) that describes the basics of a motion blur without errors when i convert it, please give it to me.

 

 

Thanks,  I understand now.

 

Well, the method works more or less, but it never looks great in my opinion.  Somebody else may have a counter-example of it done well, but I'm not familiar with anything real time.

 

I think you should probably go for a post-process motion blur.

 

That means rendering a buffer for velocity to use to apply a kind of blurring effect to the image.

 

What kind of physics system are you using?

 

You should be able to get the velocity for each of your vertices, and interpolate those to get each pixel, and create a velocity buffer from that.  Think X Y Z = R G B, kind of like a normal map.  127 is stationary (relative to that axis).

Then just blur according to your buffer.

It's still not perfect, but the effects are pretty good.

 

GPU Gems has another method here, which seems to be better/more clever:  http://http.developer.nvidia.com/GPUGems3/gpugems3_ch27.html

It's a little heavy for me, though.

 

http://john-chapman-graphics.blogspot.co.uk/2013/01/per-object-motion-blur.html  This might help.

 

If anybody can help explain exactly how those velocity buffers are created, that would help a lot.

As it stands, I need to do more research on that topic.

Edited by StarMire

Share this post


Link to post
Share on other sites

 

i need a simple technique using trancparency decreasing 

 

if you taken a look at my motion blur in the image, i have used that that technique but i did'nt love it

 

if you have a simple shader (verry verry simple) that describes the basics of a motion blur without errors when i convert it, please give it to me.

 

 

Thanks,  I understand now.

 

Well, the method works more or less, but it never looks great in my opinion.  Somebody else may have a counter-example of it done well, but I'm not familiar with anything real time.

 

I think you should probably go for a post-process motion blur.

 

That means rendering a buffer for velocity to use to apply a kind of blurring effect to the image.

 

What kind of physics system are you using?

 

You should be able to get the velocity for each of your vertices, and interpolate those to get each pixel, and create a velocity buffer from that.  Think X Y Z = R G B, kind of like a normal map.  127 is stationary (relative to that axis).

Then just blur according to your buffer.

It's still not perfect, but the effects are pretty good.

 

GPU Gems has another method here, which seems to be better/more clever:  http://http.developer.nvidia.com/GPUGems3/gpugems3_ch27.html

It's a little heavy for me, though.

 

http://john-chapman-graphics.blogspot.co.uk/2013/01/per-object-motion-blur.html  This might help.

 

If anybody can help explain exactly how those velocity buffers are created, that would help a lot.

As it stands, I need to do more research on that topic.

 

 

That GPU gems link is a good one. This article on the blur in split-second gives some idea of how fiddly it can be to get a technique like that looking right and running efficiently: http://www2.disney.co.uk/cms_res/blackrockstudio/pdf/SSMBNotes.pdf

 

I think that what the original poster really wants is a mechanism for just drawing the sphere a few times to blur it. I'm a bit confused by what's going on in that image tbh. How many copies of the sphere are being rendered, and at what opacity. Maybe you could post a picture of the sphere unblurred so I can understand what's going on in the blurred pic better.

 

Couple of things you might want to try:

 

1. Draw the transparent copies of the sphere in order of most transparent first, with your opaque one appearing last (if there is an opaque one).

2. Turn off z-write for all but the last copy of the sphere.

 

Ideally you'd want to render the sphere out into a separate render target with the destination alpha using a 'max' blend mode. That way you can avoid the problem of the sphere becoming too opaque where there's lots of overlapping. Sounds like messing around with render targets is something you're trying to avoid though.

Share this post


Link to post
Share on other sites

I think that what the original poster really wants is a mechanism for just drawing the sphere a few times to blur it.

 

 

Yes, the trouble is that doesn't look very good.

 

If he's looking for a really simple (but slow) method, just blend together five or six frames (evenly) before displaying it (not frame bleed).  That looks good.

Frame bleed is the next best thing, although it doesn't look awesome.  

 

What he's doing is more or less comparable in appearance to frame bleed, just more complicated and expensive. 

 

If you want it to be fast and look good, post-process is your only real option (until somebody comes up with something better).

 

 

 

1. Draw the transparent copies of the sphere in order of most transparent first, with your opaque one appearing last (if there is an opaque one).

 

I think you have that backwards.  The fully opaque one should be drawn first, with the transparent ones on top of it.  This is because you need the transparent overlay on the opaque sphere to create the appearance of it blurring.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!