Search - User list
Full Version: Velocity Pass in Houdini?
Root » Technical Discussion » Velocity Pass in Houdini?
abahena
Any one knoes how to creat a velocity pass in houdini?
Juts to drive motion blur in composition.
stevenong
Here's a thread [sidefx.com] that might help.

Cheers!
steven
abahena
Im doing something wrong, I posted a picture
abahena
I want to get a result like the mov file attached I believe that one was done with mental ray.
xtimmyx
That looks like RSMB (Real Smart Motion Blur) which I would also like to see an implantation of in Houdini. The math behind it isn't directly rocket science as far as I can see. Though programming is not my strong side and I may be wrong. But anyway there is info on their web page on how the math behind it works. And it shouldn't be impossible to recreate this in VEX.

http://www.revisionfx.com/support/faqs/motion_vector_FAQs/motion_vector_math/ [revisionfx.com]
abahena
Any ideas?, I have use Houdini for about two weeks, Im not familiar with vex develoment.
Im sure its a quick fix, Im amaze with houdini workflow
jason_iversen
Here is an example of generating motion vectors, the way SESI intended it:

Look in the attached file and notice:

1./ The object is animated the normal way. (ie. No additional attributes are needed)
2./ A ROP is created, and “Allow Motion Blur” is enabled. Do a quick test render, and see if motion-blur is working correctly.
3./ A shader is constructed which takes the screen-space position of a sample at the start and end of the motion-blur, and exports it into a export variable (I called it ‘vel’).
4./ Back in the ROP, make sure you output this ‘vel’ variable in the Extra Image Planes.
5./ To the ROP, add a Rendering Parameter called “Allow Image Blur”, and deactivate it. This will ask Mantra to perform all the motion blur calcs internally, but not actually blur the image.
6./ Use the image in your compositing software, using the ‘vel’ layer to vector-blur the RGBA layer (“C” in Houdini). Note, that the way I exported the ‘vel’, you'd need to unpremultiply the vel by Alpha. You can probably avoid this by changing your ROP's Sample- and Pixel-Filters to something like “minmax min” and “closest sample” respectively.

Unfortunately it seems as if Houdini's own Velocity Blur COP doesn't really do a usable job. :cry: I've reported the problem and perhaps they'll be able to fix it sometime soon. If you want to see the intended COPs workflow, look in the COP network in the file too.

Naturally, going out to another compositing package requires a full license and you'd probably write to an OpenEXR format image.

I hope this helps a bit,
Jason
xtimmyx
I've modified jason_iversen's setup so that the velocity pass uses the RSMB standard (like the one in your uploaded video). When I've transfered it to a commercial license file and made some tweaks to it I'll upload it here and maybe to the Exchange as well.
xtimmyx
Now I've uploaded the shader to the Exchange. As mentioned there I'm not 100% certain it's completely bullet proof but so far it's worked fine in my tests.

http://www.sidefx.com/exchange/info.php?fileid=608&versionid=608 [sidefx.com]
stevenong
Hi xtimmyx,

The shader is working though you should use $T or $FF in your example because on frame 3, the arrows' translation is the same on frame 4 thus no transformation blur.

Great work and thanks for putting it on the exchange too!

Cheers!
steven
abahena
Wow!!
is working really good.
Thank you very much
xtimmyx
stevenong
Hi xtimmyx,

The shader is working though you should use $T or $FF in your example because on frame 3, the arrows' translation is the same on frame 4 thus no transformation blur.

Great work and thanks for putting it on the exchange too!

Cheers!
steven

You're welcome. I don't quite get what you mean. Where in my scene should I use $T or $FF instead?
circusmonkey
Hi Jason,
I totally forgot about that thread I had the same experience with COPs.

You're welcome. I don't quite get what you mean. Where in my scene should I use $T or $FF instead?

You key framed the animation to frame 3.

rob
circusmonkey
Ive thrown together an example file plus a nuke file. In Nuke there are 2 images to compare 1 with default rendered motion blur and 1 using the vector pass. I would be grateful for opinions if the set up is correct for Nuke. The houdini file is noted

rob
kaschalk
I'm trying to use this method to give the object translation value in pixels. Assuming the vector blur data is in ndc space, I would think multiplying against the resolution would give you the desired result, but I don't find a correlation.

For example, I have an object moving 136 pixels in Y. The image is 1K square. The value returning is 0.511 (x1000 = 511)

Any ideas of what's missing, or is my logic completely off?

Thanks!
xtimmyx
kaschalk
I'm trying to use this method to give the object translation value in pixels. Assuming the vector blur data is in ndc space, I would think multiplying against the resolution would give you the desired result, but I don't find a correlation.

For example, I have an object moving 136 pixels in Y. The image is 1K square. The value returning is 0.511 (x1000 = 511)

Any ideas of what's missing, or is my logic completely off?

Thanks!

I haven't used the shader in quite a while and just noticed that it doesn't seem to work in H11. There seems to be no “tondc-node” anymore.

I suppose it's possible to write the shader in VEX from scratch but that's unfortunately nothing I've got time to do right now since I've never written any VEX-shader without VOP and have my hands full with production stuff.
old_school
All of the various specific space VOPs have been replaced by the Transform VOP. Go from current to NDC space.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB