Page 1 of 2

Experiment: Motion Blur with Physics

Posted: Fri Jul 13, 2012 3:39 am
by BlackBulletIV
This is a product of one of my physics-based experiments which I've been doing in order to get used to the new system. It allows you to add boxes, the size and (optionally) colour of which will be randomly generated, and to add force to them all via the arrow keys. I threw in some motion blur (created with canvases) as another experiment.

If you want to customise something, there's a number of settings at the top of the main.lua file.

Enjoy! :)

Re: Experiment: Motion Blur with Physics

Posted: Fri Jul 13, 2012 5:50 am
by blenderer
Awesome! This was helpful, thanks!

Re: Experiment: Motion Blur with Physics

Posted: Fri Jul 13, 2012 8:42 am
by Zeliarden
Nice! Realy cool with the motion blur (I needed to change motionFrames = 100 to see any motion blur)

Re: Experiment: Motion Blur with Physics

Posted: Fri Jul 13, 2012 8:51 am
by BlackBulletIV
Thanks guys!

Also, 100 frames!? That's crazy. I was actually using 10 frames for exaggerated effect. Perhaps you should turn alphaMultipler up instead, as maintaining 100 canvases is bound to be expensive.

Re: Experiment: Motion Blur with Physics

Posted: Fri Jul 13, 2012 9:53 am
by Zeliarden
I can go up to 300 and still have 160 fps, with 100 I have 470 fps. turn up alphaMultipler? how would that work? it only changes the alpha color
alphaMultipler looks nice between 10 and 100

Re: Experiment: Motion Blur with Physics

Posted: Fri Jul 13, 2012 12:10 pm
by BlackBulletIV
Well that's good. The alpha multiplier would (obviously) enhance the visibility of the stored frames. Since you said that you couldn't see any motion blur at 10 frames, I assumed that it may be a visibility problem.

Re: Experiment: Motion Blur with Physics

Posted: Fri Jul 13, 2012 4:01 pm
by Kingdaro
this is an awesome demo

i think I'll be using this in my game :D (with proper credits of course)

Re: Experiment: Motion Blur with Physics

Posted: Sat Jul 14, 2012 2:07 am
by BlackBulletIV
Thanks. Credit isn't required, but I won't say no. :)

Re: Experiment: Motion Blur with Physics

Posted: Tue Jul 17, 2012 1:08 am
by ishkabible
ya, I had to turn it up to 40 before I could see it. turning the alpha multiplier up doesn't change it. the issue is that the canvases aren't being placed far enough apart. I actually had to turn the alpha multiplier down so it didn't just look like oddly shaped blocks with fuzzy corners.

40 frames, 10 for alpha multiplier looks best for me. I can't notice 10 frames on any alpha at all.

Re: Experiment: Motion Blur with Physics

Posted: Tue Jul 17, 2012 3:11 am
by BlackBulletIV
That's really strange. I notice a little motion blur on 5 frames. Everyone's systems must be displaying it differently to mine. Perhaps it's something to do with framerate?