Jump to content

Recommended Posts

Hi! To make a motion vector pass in mantra, you'll need to make the image plane yourself by extracting the data from the geometry inside your shader. It's pretty straightforward.

Drop down a materialbuilder node, or dive into whatever shader is attached to the geo. You need 2 "getblur P' nodes, one set to 0 (pblur0) and the other set to 1 (pblur1). Subtract pblur0 from pblur1. Next, pipe that into a vectortofloat, and connect that to a floattovector. The reason is because for it do work properly in nuke, the X and Y data need to be flipped (Z stays the same!), so make sure to hook it up that way. Lastly, bind that out as a vector "mv". 

In Mantra, add a custom image plane. VEX Type should be "vector", channel name "mv" (or whatever you named your attribute), Sample Filter set to "Closest Surface" with the pixel filter set to "Object with most coverage (min z value). 

Finally, make sure you DO have "allow motion blur" checked on! This will force mantra to calculate the motion blur, but at the bottom where it says "Allow image Motion Blur" turn it off, so that the actual output image remains unblurred.

I can't upload a hipfile at the moment, but hopefully this explanation makes sense! 

Also, if you're looking for a more up-to-date quickstart guide on rendering in mantra, check out Adam Swaab's Lighting and Rendering in Mantra videos! 

  • Like 8
Link to comment
Share on other sites

11 minutes ago, jamesr said:

Hi! To make a motion vector pass in mantra, you'll need to make the image plane yourself by extracting the data from the geometry inside your shader. It's pretty straightforward.

Drop down a materialbuilder node, or dive into whatever shader is attached to the geo. You need 2 "getblur P' nodes, one set to 0 (pblur0) and the other set to 1 (pblur1). Subtract pblur0 from pblur1. Next, pipe that into a vectortofloat, and connect that to a floattovector. The reason is because for it do work properly in nuke, the X and Y data need to be flipped (Z stays the same!), so make sure to hook it up that way. Lastly, bind that out as a vector "mv". 

In Mantra, add a custom image plane. VEX Type should be "vector", channel name "mv" (or whatever you named your attribute), Sample Filter set to "Closest Surface" with the pixel filter set to "Object with most coverage (min z value). 

Finally, make sure you DO have "allow motion blur" checked on! This will force mantra to calculate the motion blur, but at the bottom where it says "Allow image Motion Blur" turn it off, so that the actual output image remains unblurred.

I can't upload a hipfile at the moment, but hopefully this explanation makes sense! 

Also, if you're looking for a more up-to-date quickstart guide on rendering in mantra, check out Adam Swaab's Lighting and Rendering in Mantra videos! 

Thank you, this does help. I will try to put it to practice as soon as I can.

But I must say I am surprised there is not an out of the box solution for this....after all motion vector are a staple in pretty much all other renderers I have used.

Thanks.

Link to comment
Share on other sites

I still can't believe there is not an out of the box motion vector pass... pretty much every other renderer I have used have it.  I will make a Feature request, this should definitely be in the to do list in SideFX, or I hope it is....

Link to comment
Share on other sites

Ok, made the request feature

RFE  (ID=84421)

Here is How I ask for it:

Quote

As the title says. Motion vectors are so widely use that I found it hard to believe there is no out of the box pass for it, as Pz for example.
info on this:
http://forums.odforce.net/topic/30843-motion-vector-pass/

Also the new workflow from arnold seems very interesting if adaptable to mantra. Where all AOVs can be defined by a shader network rather individually in each material applied to an object. This actually would be very powerful in the new material interface of H16.
info on this:
https://vimeo.com/228367966
Around 32.25

 

  • Like 1
Link to comment
Share on other sites

  • 3 years later...

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...