Image based motion blur

Blender's renderer and external renderer export

Moderators: jesterKing, stiv

bullx
Posts: 0
Joined: Mon Jan 05, 2004 9:25 pm

Post by bullx »

i've posted this url to bf-funboard, here an answer from GSR
i post it here in case it could be usefull

>>please take some time to have a look at this:
>>> > http://www.blender.org/modules.php?
>>> > op=modload&name=phpBB2&file=viewtopic&t=5590
>>> >
>>> > it' s a feature proposal from EnV


That proposal only covers one thing: linear motions. No rotation,
colour changes, no faces that appear or disappear or anything beyond
simple linear movements of the geometry. A lot faster, but breaks down
soon.

There are ways to get faster than current Blender while still make it
work in more cases with a more correct result, as someone comments
later in that page (motion interpolation or multiple time samples with
vector based blur) or some talks in IRC (similar plus difference
matting) with manual experiments posted. I guess it is all about
avaliable time.
is this fully true?
or is there is a way to solve this?

@harkyman, it's not me speaking, its the coder-devil inside YOU :D
:D :D :D :twisted: :twisted: :twisted:

harkyman
Posts: 98
Joined: Fri Oct 18, 2002 2:47 pm
Location: Pennsylvania, USA
Contact:

Post by harkyman »

I'd be willing to bet that creating a motion vector "image" as I've described would produce results that are good enough for a majority of animation conditions, and would also be very fast. The method I mentioned would indeed take into account rotations as well as translation: any transform in 3D space. It is correct to note that it would not take into account color change of a face along that trajectory, or faces appearing/disappearing, but how relevant is that? You still have the resolution of 30 fps to deal with that. I'm thinking that the eye perceives a lack of motion blur much more readily than a lack of color-change blur. In fact, I'll our eyes wouldn't even miss it.

If you have the "shutter" open for a quarter of the frame's timeslice (.008 seconds at 30 fps) you'll get a decent motion blur going on. Go watch the basketball and Chicken Run videos in the linked paper from env's original post. They look freaking great, and that's without even analyzing the motion in 3d - they're just using a strictly 2D analyses of the already-generated images. My gut tells me that, coupled with the lowest level of frame-based mblur (5), this would be sufficient for most production needs in Blender.

-efbie-
Posts: 0
Joined: Wed Oct 27, 2004 9:47 pm

Post by -efbie- »

I think the main drawback of vector motion blur is blurring the moving lights and shadows. It can be done, but it seems tricky...
But vector motion blur would definitely be faster and good enough for a lot of animations :)

harkyman
Posts: 98
Joined: Fri Oct 18, 2002 2:47 pm
Location: Pennsylvania, USA
Contact:

Post by harkyman »

When the renderer kicks in, does anyone know if the generation of renderfaces is occlusion culled at that point, or later on? If it's done up front, then you could calculate motion vectors for each renderface in the culled list and do a lookup at rendertime, writing to your rgba vector motion buffer.

The logic seems so simple - if only I had any familiarity with the render code.

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri »

Hmm. 2 things.

I think each point on a face has it's own motion vector. So using the face motion vector is not good enough. The left side of a face on a rotating cube moves an other direction then the right side.

Objects obscured by other objects should not draw motion blur over the obscuring object, so z-buf does matter.

harkyman
Posts: 98
Joined: Fri Oct 18, 2002 2:47 pm
Location: Pennsylvania, USA
Contact:

Post by harkyman »

Okay, so you precalc and cache the motion vectors for each of the verts of a face, then interpolate to find the proper vector depending on where the sampled point is on the face.

As for depth... you would use the z buffer to determine the order in which you'd attack the rendered pixels for blurring, back to front. The less blur that is applied to a pixel, the more opacity it would have in the blending process. That way, a quick object in the background that moves behind a stationary object would leave a blurred streak that would be completely obscured by the foreground element.

It's quite doable, and as I said, if you haven't checked out the videos from the links env provided about doing strictly 2D image-based blur, you need to do so before saying that the results would be poor.

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri »

harkyman wrote:Okay, so you precalc and cache the motion vectors for each of the verts of a face, then interpolate to find the proper vector depending on where the sampled point is on the face.
Better.
harkyman wrote:As for depth... you would use the z buffer to determine the order in which you'd attack the rendered pixels for blurring, back to front. The less blur that is applied to a pixel, the more opacity it would have in the blending process. That way, a quick object in the background that moves behind a stationary object would leave a blurred streak that would be completely obscured by the foreground element.
I thought so.
harkyman wrote:you need to do so before saying that the results would be poor.
I'll judge the results out of blender when you're ready implementing it. I'm not so interested in that others do a perfect job, I know all about that.

env
Posts: 12
Joined: Thu Oct 17, 2002 9:58 pm
Location: Italy
Contact:

Post by env »

Aaaaaargh! All this is making me too salivating... harkyman, no doubt you know what you are talking about, for what I can understand you have a lot of good ideas about this. :) If you don't have time to pursue it, maybe you can do a single line of coding once a day... just one line at a time... we are not in hurry, after all... you know.
Or else, do you know a way to contact Ton about this?
Aaaaargh! Arf arf arf... :D

EnV

bullx
Posts: 0
Joined: Mon Jan 05, 2004 9:25 pm

Post by bullx »

so is there any hope of having this developped before or later?
---sweet pet expression here---

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri »

I'll add this threat to the found feature list.

Env, making a good proposal in the feature wiki might help to.

bullx
Posts: 0
Joined: Mon Jan 05, 2004 9:25 pm

Post by bullx »

thnx for the suggestion joeri

harkyman
Posts: 98
Joined: Fri Oct 18, 2002 2:47 pm
Location: Pennsylvania, USA
Contact:

Post by harkyman »

I've written a technical document detailing the steps it would take to implement this in Blender. I don't have time to learn the render code, but maybe someone looking to procrastinate on a current project (like, say, Ton with the Armature code) could pop this in in a day or two. I'll post this to the developer's mailing list and wiki as well.

http://www.harkyman.com/vectorialblur.pdf

bullx
Posts: 0
Joined: Mon Jan 05, 2004 9:25 pm

Post by bullx »

i'm sure that a technical document can help a lot.

thank you for yor work harkymah, i really apreciate.

steve@enginpost.com
Posts: 0
Joined: Fri Feb 11, 2005 5:36 pm

Re: Image based motion blur

Post by steve@enginpost.com »

Two words: "post-production" (or maybe that is one hyphenated word).

It seems to me that we are working hard and integrating something that a basic workflow might solve. What about pulling it off like this:

1. Render each scene element seperately (ie. car zooming past on a road = render 1, trees blowing due to fast car passing by = render 2, background = render 3).
2. IMport into NLE software for video editing and create composited layers.
3. Gaussian blur on the background to handle distance effect.
4. Apply keyframe linear blur on trees when they move only.
5. Apply direction motion blur on car.
6. Re-render scene.

I use a relatively cheap product called Vegas Video (now owned by Sony Corp). I know that people are concerned that I am mentioning a non-open source or freely distributed product, but I know that most CGI shops do quite a bit of post-production on their work. This is why Vegas Video actually includes an entire "interpolate frames" feature to create natural movement blur for animation pieces.

If Blender can figure it out, then AWESOME. But until then, I will make it happen like everyone else does: post-production.

Thanks for listening,

enginpost.com

harkyman
Posts: 98
Joined: Fri Oct 18, 2002 2:47 pm
Location: Pennsylvania, USA
Contact:

Post by harkyman »


Post Reply