Jump to content

motion vectors buffer?


Recommended Posts

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

Link to comment
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...

Link to comment
Share on other sites

  • 2 years later...

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

Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...