Jump to content
Sign in to follow this  
Heraklit

Motion vector

Recommended Posts

Hi there, 

 

I'm having a hard time exporting some motion vectors out of Mantra. I used a method that was described in this forum. Two get blur nodes, one set to 0 and the other one to 1. Subtracted them and piped into a custom direction vector attribute which I used to render out an image plane in Mantra. Unfortunately I'm not getting any motion vector in the exr file. The image plane is black and when trying to use it with a vector blur in Nuke or a velocity blur in Houdini's comp area nothing happens. 

Share this post


Link to post
Share on other sites

Could you post the hip file? It sounds like the motion vector pass isn't being created. I would double check that the attribute you are exporting is set to be a vector, and that the image plane has the correct attribute name and data type. Also make sure you have the setup on the shaders that your geometry is using. Use the IPR to see if there's anything there.

I'm guessing you got the setup from the thread below, but there are 2 of them. I have used Matt's method and it works every time! I would give that a try or you can post a hip file so it's easier to pinpoint the issue. All I said above are just guesses, I can't be sure without looking at it :P

This is the post with the working setup:

 

Share this post


Link to post
Share on other sites

I think you have to enable motion blur on your mantra rop, but disable the image blur, for motion vectors to work. If you have done that already I don't know.

Share this post


Link to post
Share on other sites

I changed the way you were exporting the motion blur to the setup I mentioned. Also you have to enable Allow Motion Blur in Mantra, and to use the velocity of your object I enabled  Geometry Velocity Blur under the Sampling tab of the geometry object. (If you only want to use transformation blur then you can increase the xform samples to 2 in Mantra). Finally you also have to assign the material to the object.

motionvector_working.hipnc

Share this post


Link to post
Share on other sites

Make sure you copied the whole setup inside the Mantra Surface, including the null node that is renaming the variable to ndcvec. If you didn't copy the null node, you can also change the last line of the snippet to diff *= res;

That is provided you didn't add any nodes after the subtract. If you did, just replace diff with the data name that is being output from the node that is being connected into the snippet.

Share this post


Link to post
Share on other sites

lol, I give up. Mantra isn't crashing but the motion vector I'm getting is rather rubbish. COULD be a little easier to get the motion pass..

motion.jpg

Edited by Heraklit

Share this post


Link to post
Share on other sites

lol, I give up. Mantra isn't crashing but the motion vector I'm getting is rather ribbish. COULD be a little easier to get the motion pass..

motion.jpg

Share this post


Link to post
Share on other sites

Another question: how would you give out a velocity aov? Same technique? Following the houdini help section the velblur node needs the velocity from the velocity plane. Is this the motion vector? Because I can't get any result with the outputted motion vector. 

Edited by Heraklit

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
Sign in to follow this  

×