Velocity Pass in Houdini?

   36120   16   3
User Avatar
Member
33 posts
Joined: Feb. 2009
Offline
Any one knoes how to creat a velocity pass in houdini?
Juts to drive motion blur in composition.
User Avatar
Member
1631 posts
Joined: July 2005
Offline
Here's a thread [sidefx.com] that might help.

Cheers!
steven
User Avatar
Member
33 posts
Joined: Feb. 2009
Offline
Im doing something wrong, I posted a picture

Attachments:
speedPass.gif (12.5 KB)

User Avatar
Member
33 posts
Joined: Feb. 2009
Offline
I want to get a result like the mov file attached I believe that one was done with mental ray.

Attachments:
truck_velocity.mov (190.1 KB)

User Avatar
Member
166 posts
Joined: Oct. 2008
Offline
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]
User Avatar
Member
33 posts
Joined: Feb. 2009
Offline
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
User Avatar
Member
12457 posts
Joined: July 2005
Online
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

Attachments:
velocity_blur.hipnc (164.4 KB)

Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
166 posts
Joined: Oct. 2008
Offline
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.
User Avatar
Member
166 posts
Joined: Oct. 2008
Offline
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]

Attachments:
rsmb_mv.hip (195.1 KB)
RSMB_MV.otl (13.9 KB)

User Avatar
Member
1631 posts
Joined: July 2005
Offline
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
User Avatar
Member
33 posts
Joined: Feb. 2009
Offline
Wow!!
is working really good.
Thank you very much
User Avatar
Member
166 posts
Joined: Oct. 2008
Offline
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?
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
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
Gone fishing
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
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

Attachments:
vectorblur.rar (201.1 KB)

Gone fishing
User Avatar
Member
5 posts
Joined:
Offline
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!

Attachments:
numberstest_v03.hip (312.5 KB)

User Avatar
Member
166 posts
Joined: Oct. 2008
Offline
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.
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
All of the various specific space VOPs have been replaced by the Transform VOP. Go from current to NDC space.
There's at least one school like the old school!
  • Quick Links