Anti-Distinctlyminty Posted July 12, 2016 Share Posted July 12, 2016 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? Quote Link to comment Share on other sites More sharing options...
3iart Posted July 12, 2016 Share Posted July 12, 2016 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? Quote Link to comment Share on other sites More sharing options...
Anti-Distinctlyminty Posted July 12, 2016 Author Share Posted July 12, 2016 (edited) 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.) Edited July 12, 2016 by Anti-Distinctlyminty Quote Link to comment Share on other sites More sharing options...
3iart Posted July 13, 2016 Share Posted July 13, 2016 Here's a thread where it looks like someone figured it out motionVectors_AOV Quote Link to comment Share on other sites More sharing options...
Anti-Distinctlyminty Posted July 13, 2016 Author Share Posted July 13, 2016 (edited) 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 July 13, 2016 by Anti-Distinctlyminty Quote Link to comment Share on other sites More sharing options...
eetu Posted July 13, 2016 Share Posted July 13, 2016 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 Quote Link to comment Share on other sites More sharing options...
Anti-Distinctlyminty Posted July 13, 2016 Author Share Posted July 13, 2016 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 Quote Link to comment Share on other sites More sharing options...
eetu Posted July 13, 2016 Share Posted July 13, 2016 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/ Quote Link to comment Share on other sites More sharing options...
eetu Posted July 13, 2016 Share Posted July 13, 2016 Ah, looking at mestela's post at I tried first transforming the blurP positions and subtracting after that, and now it seems to work. ee_motionvec_L2.hipnc Quote Link to comment Share on other sites More sharing options...
Anti-Distinctlyminty Posted July 14, 2016 Author Share Posted July 14, 2016 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.