Jump to content
Anti-Distinctlyminty

Workflow for COP Velocity Blur node (velblur)?

Recommended Posts

Hi all,
I'm trying to figure out how to do post process motion blur in COPs by using the velblur node.

So far, via web & forum searching, all I've been able to find is that you are supposed to use the getBlurP to obtain a velocity plane in your output image (see attached image).

I've also attached images of both the results of rendered motion blur and the post process motion blur, so you can see that they are clearly very different (Note: the geometry is static, so this is only a motion blur caused by camera movement, if that makes any difference). 

So, how are you supposed to get the velblur node to work?

 

cells_vec_0005.jpg

cells_MB_0005.jpg

getBlurP.png

Share this post


Link to post
Share on other sites

I'm just guessing, but maybe the getBlur isn't working because the points aren't actually moving so there is no vel and the shader doesn't account for camera v. Have you tried animating the geo and having a static camera?

Share this post


Link to post
Share on other sites

I tried with a tube moving straight down, and the result was much the same :(

I think there must be something more to getting out an accurate vel pass, I just don't know what it is and the documentaion doesn't say anything.

(Note: I think the colour space for the vel pass has changed it's look.)

vec.jpg

vec_blur.jpg

Edited by Anti-Distinctlyminty

Share this post


Link to post
Share on other sites
7 hours ago, 3iart said:

Here's a thread where it looks like someone figured it out

motionVectors_AOV

In the thread it says " in your shader (pyro or whatever) get 2 getblur nodes. Hook up 2 constants in their inputs - one set to zero the other set to 1. "

I tried the workflow that is outlined here and it doesn't work. Subtracting two getblur nodes alawys results in a blank image, so the time input makes no difference. I'll log it as a bug because I think it must be broken...or, at best, the documentation on this is totally unclear.

Submitted Houdini Bug #76551

Edited by Anti-Distinctlyminty

Share this post


Link to post
Share on other sites

Hi!

 

The blurred positions are not calculated if motion blur is not enabled, so the Allow Motion Blur toggle needs to be on. But if you do not wish to actually render motion blur in mantra, you can toggle off Allow Image Motion Blur, in the bottom of the sampling tab. (A bit convoluted, yes)

At least seems to work.

ee_motionvec.hip

Share this post


Link to post
Share on other sites

Hi eetu!

I tried what you suggested, but it doesn't seem to work on my scene. I tried to modify your hip file (attached) to do a similar thing -have the camera move through the objects. If you go to the COP network and take a look at the output, it's just not blurring correctly. 

I'm eyeballing it, but it looks as though the per pixel velocity blur isn't working. The velocity looks to be the same everywhere. Can you confirm, or is my lack of sleep finally catching up with me?

ee_motionvec_L.hipnc

Share this post


Link to post
Share on other sites

Ahh ok I missed the whole velblur bit. The getBlurP thing gets you the 3d motion vector, in camera space. (P in shaders is always in camera space by default.) In your scene the vector is mostly in negative Z, which sounds plausible for things flying into the camera.

The velblur COP on the other hand expects 2d velocity vectors in screen x-y space. I tried just running the vel vector through a Transform VOP with "from space:camera to space:NDC", but it didn't look correct.

 

Check e.g. these 

https://www.sidefx.com/forum/topic/25329/ 

Share this post


Link to post
Share on other sites

Ok, that seems to work significantly better! Thank you! I must inform SESI that it's just the docs that need sorting out. I'm still unsure why the time inputs into the getBlur nodes need to be 0 and 1. The docs say  

Quote

Used to set the position time when the input is not connected, rather than using the Time global by default.

...so I'm not sure what inputting values actually does. As that implies that you have to connect something, otherwise it just uses the global time value.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×