Jump to content
yjcnbnbnb200

how to render correct 2d motion vector for Fur object

Recommended Posts

I learn that 2d motion vector Nuke use is different from RSMB, it is something like projection, for example, I have a point move from posA to posB during 1 frame, so project the point use ray from real world to camera screen like the picture below, so it is different, I want to know how to write this shader?

post-9044-0-96233100-1386376918_thumb.jp

And the image below is what I search in forum, this is wrong when I render 2d motion vector for my fur object. Now I want to render read 2D motion vector for my fur layer, anyone know? Thanks a lot. :D

post-9044-0-24076200-1386376921_thumb.jp

Share this post


Link to post
Share on other sites

This is a way of exporting motion Vectors to Nuke (vector blur node), at least it works for me. I've also attached a nuke script to get the whole picture of how it works. Just render the example sequence at the default folder and open Nuke.

motionVectors.rar

Share this post


Link to post
Share on other sites

Thank you for your kind share, actually toNDC is the same as your transfrom setting to NDC space, but on hair render also need more test on mantra setting: GEO sample and Xform sample, if these setting is too low, the motion vector can not catch small value I think.

Share this post


Link to post
Share on other sites

Hmm, actually the same settings I use for curve (fur) rendering with motion vectors and had no problem. Maybe for very fine hair you need more pixel samples and geo/xform samples or try exporting the motion vectors image plane with no filtering.

Share this post


Link to post
Share on other sites

Try this one, Actually for the fur to work, You need to increase the geo samples (as you already noticed) to something greater than the default value of 1.

motionVectors_Fur.rar

Edited by Sifis
  • Like 1

Share this post


Link to post
Share on other sites

Try this one, Actually for the fur to work, You need to increase the geo samples (as you already noticed) to something greater than the default value of 1.

Yes, it works, thank you, but what is the different between Bind and Parameter when I export a channel to extra plane in shader?

Share this post


Link to post
Share on other sites

Bind vops introduced in H12 or H12.5 and they supposedly have a faster evaluation than the old Parameter node. Actually I've never compare them in such a way to notice any speed difference, but I like bind nodes because they are much faster to set up as there are 2 options to choose when you hit the tab key: Bind and Bind export (it's actually the same node with different settings for importing or exporting an attribute).

Share this post


Link to post
Share on other sites

Bind vops introduced in H12 or H12.5 and they supposedly have a faster evaluation than the old Parameter node. Actually I've never compare them in such a way to notice any speed difference, but I like bind nodes because they are much faster to set up as there are 2 options to choose when you hit the tab key: Bind and Bind export (it's actually the same node with different settings for importing or exporting an attribute).

Ok, ic, thanks again!

Share this post


Link to post
Share on other sites

having a look at the reelsmart motion blur requirements today. seems the output from the above shader are not what RSMB wants.

http://help.revision...1/#/tutorial-88

houdini outputs with no motion at 0.

rsmb requires no motion to be a value of 0.5

next,

this shader can result in any value, but rsmb values must rest between -1 0 1

so, all values in a rsmb motion vector pass must be normalized from -1 0 1

finally,

resultant must mapped -max to max from 0 to 1

anyone know how to adjust the network to accommodate rsmb motionVectors pass output?

lastly,

in the attached jpg, there is a problem in the value output for vertical versus horizontal. given same motion, those values should be equal regardless of direction.

rsmb_h12.zip

post-7263-0-50099400-1386729508_thumb.jp

Edited by moondeer

Share this post


Link to post
Share on other sites

Hey Eric, I don't have RSMB right now to test it, but given some previous experience with it and the math from the link above, this Hip should work. Let me know how it goes with RSMB.

rsmb_moblur_fix.hip

Share this post


Link to post
Share on other sites

I also wanna correct the previous posts I made. Thanks to Eric who pointed this out, the Transform vops (current space to NDC) are not needed (that's why it was exporting different values in X and Y). Houdini just converts everything in shaders to camera space by default. So, as NDC is normalised to the output frame ratio, it's not appropriate for exporting accurate motion vectors. Here I ' ve attached a hip with the fixed shader and a Nuke script with a direct comparison between the old shader and the new one without the space transform vops.

moVecTests.rar

Edited by Sifis

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

×