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.
Experiment: Motion Blur with Physics
- ishkabible
- Party member
- Posts: 241
- Joined: Sat Oct 23, 2010 7:34 pm
- Location: Kansas USA
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Experiment: Motion Blur with Physics
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.
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.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Experiment: Motion Blur with Physics
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
Modern Art. You can buy my creation for 1.9999,99 € !
Re: Experiment: Motion Blur with Physics
Very impressive. You seem to have a good hold of the physics module. Make a game
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
- retrotails
- Party member
- Posts: 212
- Joined: Wed Apr 18, 2012 12:37 am
Re: Experiment: Motion Blur with Physics
I made it use 1 canvas and also made it almost the same no matter what FPS. V enables/disables vsync.
edit:
edit:
- Attachments
-
- motion blur edit.love
- (1.76 KiB) Downloaded 180 times
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Experiment: Motion Blur with Physics
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.
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".
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".
- retrotails
- Party member
- Posts: 212
- Joined: Wed Apr 18, 2012 12:37 am
Re: Experiment: Motion Blur with Physics
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.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".
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.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Experiment: Motion Blur with Physics
Ah, I think I mostly understand now. Thanks.
Re: Experiment: Motion Blur with Physics
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...".
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
Who is online
Users browsing this forum: Amazon [Bot] and 3 guests