Page 2 of 2

Re: Experiment: Motion Blur with Physics

Posted: Wed Jul 18, 2012 5:17 pm
by ishkabible
I'm getting 450 frames per second on this with standard settings. if change it to 50 frames and 10 alpha multiplier, I get 350 frames per second.

O, and I have a slight suggestion for look improvement when you getting it working with fewer frames; have the blurred objects have an alpha gradient in the direction the object is moving so that when blur ends, it blends seamlessly into the next blur. that way it doesn't look anywhere near as choppy.

Re: Experiment: Motion Blur with Physics

Posted: Thu Jul 19, 2012 12:00 am
by BlackBulletIV
I've no idea what's going on then.

The problem is, each object is moving a different way between frames. The only ways I can think of accomplishing that couldn't justify the performance drop. Besides that, I wouldn't even know how to generate an alpha gradient.

Re: Experiment: Motion Blur with Physics

Posted: Sun Aug 05, 2012 7:12 am
by BlackBulletIV
I've worked out what the problem is. If you have V-Sync turned off, the frames per second will generally be much higher than 60. Since the effect relies on the difference between frames, how much blur you see is dependent on the frame rate. If the number of motion blur frames stays the same, you'll see less motion blur as the frame rate goes up. The only clean way that I know of to fix this is V-Sync.

Re: Experiment: Motion Blur with Physics

Posted: Sun Aug 05, 2012 10:08 am
by Larsii30
Image

Modern Art. You can buy my creation for 1.9999,99 € !

Re: Experiment: Motion Blur with Physics

Posted: Mon Aug 06, 2012 3:54 am
by Lafolie
Very impressive. You seem to have a good hold of the physics module. Make a game :P

Re: Experiment: Motion Blur with Physics

Posted: Mon Aug 06, 2012 4:04 am
by retrotails
I made it use 1 canvas and also made it almost the same no matter what FPS. V enables/disables vsync.
edit:
Image

Re: Experiment: Motion Blur with Physics

Posted: Mon Aug 06, 2012 6:22 am
by BlackBulletIV
Larsii30: Honestly, if you were a somewhat famous artist, you could just apply a blur and smudge filter (perhaps some colour desaturation as well) to that and sell it for a great deal of money. :P

Lafolie: This was my little experiment to get used to the new system. I may well make something... we'll see. :)

retrotails: That's brilliant! Took me a while to get how you did it. I still don't understand the exact meaning of the numbers in "dt*15*255".

Re: Experiment: Motion Blur with Physics

Posted: Mon Aug 06, 2012 9:58 am
by retrotails
BlackBulletIV wrote: retrotails: That's brilliant! Took me a while to get how you did it. I still don't understand the exact meaning of the numbers in "dt*15*255".
Thanks. math.clamp(dt*15*255, 4, 255) is the transparency, as such when you have a high dt, you have a low FPS, so it turns up the alpha so you don't have ridiculous blur, and vice versa. 4 and 255 are nice minimum & maximum values (I think above 255 and it wraps around, not good!). It's still dt*15*255 instead of dt*3825 because 15 is 1/4 of 60 (normal monitor refresh rate) and it's a good, easy number to change.
Think of it like this: If you have vsync at 60 FPS, dt will be 1/60. If it was dt*60*255, at 60 FPS, the function would output 255. 100% alpha means every frame gets 100% overwritten, in other words no blur. So I made is 15, and now every frame gets overwritten with 1/4 alpha.

Re: Experiment: Motion Blur with Physics

Posted: Mon Aug 06, 2012 11:54 am
by BlackBulletIV
Ah, I think I mostly understand now. Thanks. :)

Re: Experiment: Motion Blur with Physics

Posted: Mon Aug 06, 2012 7:02 pm
by Lafolie
Well you've basically got a platforming engine right here. Make a level and run around it, eventually you will think "what happens here if xyz...".