View Full Version : Motion blur effect for videogame footage (0 shutter speed)?


chilledinsanity
28th February 2007, 22:59
I've been looking through the forums and found some threads on adding a motion blur effect for videogame footage, but the threads were pretty old, plus there was some confusion as to what was working, especially since it said the newer versions of Manao's fiilters didn't work or introduced newer problems or something. And as someone else mentioned in the older threads, Reelsmart's Motion Blur looks very nice, except that it will blur 100% static footage and creates a "cloud" of blurriness around the object in motion.

Anyway, I'm curious if someone could offer any advice as to what to try to acheive motion blur. Due to the game engine I'm using, I can render my source footage at any framerate I want, if that helps. Additionally, the vast majority of my footage are completely still shots with only individual characters moving.

Pookie
28th February 2007, 23:05
Look at the Motion Blur example in Fizick's MVtools documentation

wonkey_monkey
28th February 2007, 23:25
If you can render at any framerate, render at a factor of 2^x times normal (for instance, x=3, so render at 8 times normal speed), and then, in AviSynth, x repetitions of:

overlay(clip.selecteven,clip.selectodd,opacity=0.5)

The higher the value of x, the more convincing the motion blur. In the past I've found that a 100% blur is too much, so you might want to take out one of the overlays and replace it with a simple selecteven().

David

chilledinsanity
1st March 2007, 03:07
thanks, this will give me some stuff to experiment with

sh0dan
1st March 2007, 10:38
I have used MvTools to create motion blur on CG graphics, with fairly good results. Here is the main part of the script. It will most likely need to be modified. Also you could do a more flexible script with the average filter, but it should give you a start.


source=last
highquality=true
vectors_b = source.MVAnalyse(isb = false, lambda = 1000, pel = (highquality) ? 2: 1)
vectors_f = source.MVAnalyse(isb = true, lambda = 1000, pel = (highquality) ? 2: 1)
inter8=mvflowinter(source, vectors_f, vectors_b, time=8.0, thSCD2=700, thSCD1=100)
inter12=mvflowinter(source, vectors_f, vectors_b, time=12.0, thSCD2=700, thSCD1=100)
inter25=mvflowinter(source, vectors_f, vectors_b, time=25.0, thSCD2=700, thSCD1=100)
inter75=mvflowinter(source, vectors_f, vectors_b, time=75.0, thSCD2=700, thSCD1=100)
inter88=mvflowinter(source, vectors_f, vectors_b, time=88.0, thSCD2=700, thSCD1=100)
inter92=mvflowinter(source, vectors_f, vectors_b, time=92.0, thSCD2=700, thSCD1=100)
interleave(source,source,source,inter8,inter12,inter25,inter75,inter88,inter92)
temporalsoften(4,255,255,15,2)
selectevery(9,1)

wonkey_monkey
1st March 2007, 10:44
sh0dan, couldn't you do that with a single call to mvflowblur?

David

chilledinsanity
3rd March 2007, 11:46
Yeah I did some experimenting, the half-opacity style looks pretty good, but it feels like I need more and more frames to really get what I want. While I can render at any framerate, I think I'm too much of a perfectionist to afford the hard drive space it would require.

I tried out MVblur, I find it pretty similar to the Reelsmart plugin, but overall a little bit cleaner, so I think that's what I'll go with for now. The main problem I'm having is that I have a lot of static camera shots with only one or two people moving in them, and while the motion blur itself looks fantastic, the surrounding "cloud" still detracts from the scene. Is there a way to keep a high level of blur, but limit how much blur occurs surrounding the object in motion? (sorry if I'm not explaining this well)

Oh and Shodan, with your script, would it be possible to alter values limit the "radius" of the blur (not the intensity) of it? I'm afraid I'm too dumb to understand all the steps it's going through.

Mug Funky
4th March 2007, 06:07
you could use one of the "protected" framerate interpolators and then average the new frames back down. that way it should try to prevent nonmoving areas from blurring, and any other artefacts that might show up.

also, to help it along, still render more frames than your destination rate - makes it easier for the motion search to do it's thing.

so something like this:

avisource("Videogame footage.avi") # rendered at 2x output rate

magicartefactpreventingfps(7*output framerate)

temporalsoften(3,255,255)

selectevery(7,3)

this should give you nice results. the more input frames you render the more accurate and artefact-free the blur will be, but even at 1x output framerate you should get acceptable results.

search for the "alchemist" thread and find whichever script in there is working nicest (i don't know which one's giving less artefacts or more speed).

chilledinsanity
12th March 2007, 13:53
Yeah, that last script produced the best results by far. It also made me abandon using lossless compression when rendering completely. I found to really get things smooth I had to go 10-12x the initial framerate, but it looks nice after that. I'm just going to use Xvid and try to find some decent color correction filters to make up for the difference. (At the sizes/rates I'm using, uncompressed footage would come to about 20 gigs per minute).

chilledinsanity
21st July 2007, 18:31
Hey, I'm trying to resurrect this thread because I was wondering if there was a way to take one of the methods a step farther. Shodan's method (which has simliar results to mvflowblur) is nice in that it works on any framerate, but isn't as accurate as Mug Funky's because it can produce a "halo blur" around some objects.

Would it be possible to have Shodan's method use motion vector data from a better source with more fps? Say I record my footage at 180fps, but want the end result to be 30fps. Could I alter the script so that it takes the motion vectors from the 180fps into consideration, but the final result is 30fps (and isn't just a simple downsampling)?