Jump to content
Netvudu

motion vectors buffer?

Recommended Posts

ditto...

I was looking around the help docs as well as this forum and can´t find the info. Maybe I´m not using the proper keywords... :huh:

Share this post


Link to post
Share on other sites

Quick tips

You can do the following:

- In your VEX shader: use getBlurP(1)-getBlurP(0) and export it.

- Enable "Allow Motion Blur" as you would normally

- Disable "Allow Image Motion Blur" on the ROP

- Export your vex variable in your ROP

Share this post


Link to post
Share on other sites

oh! quite interesting Jason. Thanks. It´s not too difficult to try but...isn´t a bit convoluted for a fairly common thing such as a motion vectors buffer?

Share this post


Link to post
Share on other sites

- In your VEX shader: use getBlurP(1)-getBlurP(0) and export it.

How do we do that in a vex network? We plug something into time?

Share this post


Link to post
Share on other sites

Two GetBlurP VOPs each with constant inputs (or parameters if you want to raise them up) set to 0 and 1 then subtract the second from the first.

I see your point in that there isn't a parameter raised for that on the VOP...

Share this post


Link to post
Share on other sites

Trying to use this setup with the Vector Blur node in Nuke and having some problems,

the pass looks ok but, for example, for horizontal movement, all values except red are negative and it does not work correctly in Nuke,

anyone here have any ideas why this may be happening?

Using H12 and Nuke 6.3

Share this post


Link to post
Share on other sites

negative values are ok for vector blur in nuke

one thing you may do back in houdini shader is to convert motion vector to screen space with toNDC node since it seems nuke expects that

so it will look like

1 -> GetBlurP ┐

                       Subtract -> toNDC -> Parameter

0 -> GetBlurP ┘

and in nuke try to set method to forward

Edited by anim

Share this post


Link to post
Share on other sites

I just keep getting odd results in Nuke, when I isolate the Vector Motion pass I can see its incorrect,

the middle of the object appears to have a very bright line and in Nuke these values are huge

post-7903-134359157053_thumb.png

The shader setup is here and seems correct:

post-7903-134359156583_thumb.png

The parameter set seems correct too:

post-7903-134359156695_thumb.png

I am enabling motion blur for the render but disabling image motion blur here:

post-7903-134359156818_thumb.png

And my image plane for the motion vector is here:

post-7903-13435915693_thumb.png

Any further pointers greatly appreciated

negative values are ok for vector blur in nuke

one thing you may do back in houdini shader is to convert motion vector to screen space with toNDC node since it seems nuke expects that

so it will look like

1 -> GetBlurP ┐

Subtract -> toNDC -> Parameter

0 -> GetBlurP ┘

and in nuke try to set method to forward

Edited by Andy_Ireland

Share this post


Link to post
Share on other sites

you're right it doesn't seem correct, and it's kind of logical since we are outputting just difference in positions the toNDS should have been before subtract

so you can try something like this

1 -> GetBlurP -> toNDC ┐

                                     Subtract -> Multiply(with vector 1920,1080,0) -> Parameter

0 -> GetBlurP -> toNDC ┘

so your motion vectors will be in normalized screen space, then multiplied with your render resolution to get values as nuke wants hopefully

  • Like 1

Share this post


Link to post
Share on other sites

What does minmax min do?

It gives you an unpremultiplied channel, this ensures that the motion vector values at the edges of objects are correct.

I'm not an expert in this area, someone else might be able to explain it better.

  • Like 1

Share this post


Link to post
Share on other sites

I meant just multiply node with first input that subtract

second input Constant VOP set to Vector type, with values of 1920, 1080 and 0

minmax min is a filter which will take just minimum sample value of all pixel samples for each pixel, therefore it will not perform ani-antialiasing (or it may be closest sample as its menu label suggests)

you can experiment with minmax min, minmax max, minmax ocover, minmax idcover, minmax edge, point

all provide no antialiasing for passes that requires it, they just differ in way how they chose which sample to use

Edited by anim
  • Like 1

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

×