Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Butachan

motion vector pass

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! 

2 people like this

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

 

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