Skip to main content
Inspiring
March 15, 2025
Question

Motion Blur implementation

  • March 15, 2025
  • 2 replies
  • 1420 views

Hi everyone. Trying to figure out how to implement motion blur for my plugin. In a nutshell, exactly what code I would need would be CC Force Motion Blur. I don't really at all understand how concept of motion blur should work, so any help would be much appreciated. Even better, code example would be great. My plugin mostly uses transform_world. Thanks!

2 replies

Participating Frequently
March 15, 2025

To implement motion blur in your After Effects plugin like CC Force Motion Blur, you need to analyze frame-to-frame pixel movement and apply directional blur based on motion vectors. This involves calculating object displacement over time, then using that data to blur elements according to their movement. Key parameters include Shutter Angle (controls blur intensity) and Motion Blur Samples (determines quality). Your plugin should allow users to adjust these settings for flexibility. The effect enhances animations by making motion appear smoother and more natural, especially for layers that don’t support native motion blur.

Inspiring
March 15, 2025

Aha, this is then something different and more complicated. I guess I will stay away from this :D, but thanks for your reply. 

Community Expert
March 15, 2025

usually, motion blur is an average of the full render of multiple time samples. meaning, between the time of frame 1 and the time of frame 2, you make multiple renders at times 1.0, 1.1, 1.2, 1.3 ect... and then add up each corrsponding pixel from each time sample render and divide by the number of time samples.

that's what AE does whe you activate motion blur on a layer. that's why you select the number of samples. the more samples, the smoother the result (but lower the render). by adjusting the "shutter angle" you tell AE what's the time span of these samples. 180 = from 1.0 to 1.5, and 360 = from 1.0 to 2.0.

 

some software (such as lightwave 3d) did a "deithered" moion blur, where each pixel comes from a slightly different point in time. the result is a "noisy" blur, but it's much faster than rendering the whole frame multiple times.

 

more advanced blurs such as re::vision's notion blur effect AE does on footage, is actually much like an mp4 works. the image is bobarded by a TON of trackes, and "smearing" each segment to where it's going to move int he next frame.

 

that's it in a nutshell. most implementations use the first method of rendering full frames at multiple time samples. users are accustomed to having significantly longer render times when motion blur is activaed.

Inspiring
March 15, 2025

what would we do without @shachar carmi on this forum 🙂

 

So, just few questions to make sure. There is no motion blur implementation within adobe ae sdk, I have to implement it my self, right?

What I'm a bit confused, looking at some forum posts here, is if using transform_world, it should use 2 matricies (in an array) so it should be:

			ERR(in_data->utils->transform_world(in_data->effect_ref,
				in_data->quality,
				PF_MF_Alpha_STRAIGHT,
				in_data->field,
				input,
				&composite_mode,
				NULL,
				matrix,
				2L,
				FALSE,
				&output->extent_hint,
				output));

 

What this gives me is clones (8 or 16, not sure now) between matrix[0] and matrix[1], but how do I determine positions in time?

 

Sorry if it's a bit noobie question, but it's a bit confusing for me. Bascially, my plugin (via smartfx), takes input layer, via dropdown UI, in prerrender, and then in smart render uses transform_world to clone that layer. Of course, this is simplified, but that's what plugin does in a nutshell. It's kind of finished, but lacking motion blur. 

So, where/how do I implement motion blur? Thank you so much for taking your time and explaining these very tough subjects!

Community Expert
March 15, 2025

transform_world does indeed offer motion blur via the api. not some much a "general" motion blur for the entire api, but rather just for that one callback.

anyways, given or more matrices, transform_world will to a linear interpolation between the matrices and render multiple intances along that polygonal path. if a straight a to b motion blur path is good enough for you, then a "beginning" and an "end" matrices should be enough. if you need a more "curved" motion blur, then create several intermediate matrices breaking the path down to smaller linear segments giving a more "bezier" look.

 

as for the syntax of placing multiple matrices instead of 1... if i recall correctly, instead of "&matrix" put "(&matrix1, &matrix2)".

i never used more than two, so i guess we're all relying on you telling us if using more is just as simple as adding more mtrices to the parenthesis...