Jump to content

Recommended Posts

Does mantra do not have a motion vector pass?

If so how to render it?

Every explanation I found on internet is quite old from 2009 I can only hope there are new methods to do this, right?

Any help will be appreciated.

Share this post


Link to post
Share on other sites

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 3

Share this post


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

Share this post


Link to post
Share on other sites

you're also able to change the space the motion blur happens in using the transform vop. so if you want 3d moblur you should use world space and if you want 2d moblut transform to NDC space

Share this post


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

Share this post


Link to post
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

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

×