Browse Search Popular Register Upload Rules User list Login:
Search:
Motion Blur Effect

Image:
screenshot of the scene

Author: BeltedRose85463

Group: Default

Filesize: 62.58 kB

Date added: 2016-05-25

Rating: 5

Downloads: 461

Views: 304

Comments: 5

Ratings: 1

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

As you can probably tell from the title, this is a demonstration of a motion blur effect.
It calculates the edge blur of each object based on its velocities, the framerate, and all movements of the camera.
The only downside is that when zooming with the scroll wheel, there is a flickering artifact.
Feel free to use the code in any of your scenes as long as you give me credit.
Last edited at 2016/05/25 20:23:25 by BeltedRose85463
Please log in to rate this scene
edit
Similar scenes
Title: Car With Motion Blur
Rating: 6.1667
Filesize: 186.11 kB
Downloads: 351
Comments: 2
Ratings: 6
Date added: 2008/08/20 02:59:15
Made with: Phun
Rating: rated 6.2
download
Title: Phun on mars(rocker bogie) with motion blur
Rating: 5.7778
Filesize: 112.94 kB
Downloads: 1051
Comments: 4
Ratings: 3
Date added: 2009/05/07 21:28:55
Made with: Phun
Rating: rated 5.8
download
Title: phun on mars 1.3- without motion blur
Rating: 6.7692
Filesize: 62.7 kB
Downloads: 1506
Comments: 6
Ratings: 7
Date added: 2009/05/09 08:18:43
Made with: Phun
Rating: rated 6.8
download
Title: Turbine Car
Rating: 5.625
Filesize: 13.41 kB
Downloads: 356
Comments: 0
Ratings: 2
Date added: 2010/01/10 09:21:56
Made with: Phun
Rating: rated 5.6
download
Title: Sword with motion blur
Rating: 5
Filesize: 13.41 kB
Downloads: 510
Comments: 0
Ratings: 1
Date added: 2011/12/21 00:13:26
Made with: Algodoo v2.0.0 Edu
Rating: rated 5
download
Title: Motion Blur
Rating: 5
Filesize: 13.05 kB
Downloads: 928
Comments: 1
Ratings: 1
Date added: 2020/05/01 05:30:53
Made with: Algodoo v2.1.0
Rating: rated 5
download
The motion blur doesn't appear to work correctly when the camera follows an object (unless I am misinterpreting it). For example, select a single box and enable "follow". Then, with the grab tool, fling the box across the bounded rectangular area. You will see that the blur does not act right unless the box hits a wall and starts to spin. If you do the same thing without the camera following the object, then it seems to blur the faster it moves.

Also, I did some playing around, attempting to duplicate the motion blur effect but with much simpler code. I came up with this:

edgeBlur = {
((vel(0) + vel(1)) ^ 2) ^ 0.5 / 30
}

I take the absolute value of the sum of the x and y velocities, and reduce it down to a useable edgeBlur value.

This is MUCH simpler than your incredibly complex function which does essentially the same thing. The only difference is the fact that my method does not blur with camera motion, but for most scenes, I suspect that's Okay. What do you think about my simple script as compared to your very complicated script? Simple is better, right? :lol:
Xray,

The way I see it, BeltedRose uses all sources that might cause blur, while you choose just one. Your incredibly complex function can be simplified to

edgeBlur = {math.vec.len(vel)/30.0}
I forgot to mention that blur artifacts do appear when simply enabling "follow" on an object. This is due to the delayed response of the camera for some reason. However, if you type in the objects postStep function "(e)=>{scene.camera.pan = e.this.pos}", you will not see that artifact, since the camera's position is updated much more frequently. Furthermore, to eliminate all blur from an object (and make yourself nauseous all the while), you can also add to the function "; scene.camera.rotation = -e.this.angle". I've tried it before and it worked.
s_noonan - Yes, that's a lot simpler than my code. It will save many hours of typing next time I need that function in a scene.

Thanks
.
.
.
.

(I'm being sarcastic. LOL)
Last edited at 2016/05/26 18:21:04 by Xray
BeltedRose85463 - I've discovered over the past few years that sometimes an Algodoo glitch or artifact can be cleared up in a number of ways. One is to run the code in UpDate instead of in PostStep, and another way is to adjust the sim frequency (usually to a higher value). It just takes some playing around sometimes.

This motion blur concept of yours is a good one, and as far as I know, no one else has done this before.

Good job! :tup: