View Full Version : mip_motionvectors problems

11 November 2009, 03:24 AM
Im trying to render motion vectors for use in NUKE. I am trying to just use mip_motionvectors in maya 2009. I followed the tips in Zap's production shaders PDF as well as this tutorial based on same info.

using Zap's sample file (motionvectors_2) which was done before 2009 version, i tried to adjust it based on setting in above tutorial. The NUKE people I am consulting with tell me my 32 bit float EXRs are not right/dont contain the data properly..etc. Here are my settings in the JPEG file. ive been trying to get this for almost a week with no sucess. I know I can use a render pass with normalized or a shader override on a layer, but i want to make the mip_motionvector export correctly. Can someone help with my settings please?

11 November 2009, 04:29 AM
In your camera attributes, Legacy Output Shaders section, you've selected byte. That means 8bit color. :)

11 November 2009, 05:03 AM
hey I'll give that a go...thanks. I thought the settings in the custom buffer i made would overide that but its the vectors arent outputing float then i guess doesnt matter if float in buffer or not. will give that a shot!

do you happen to know if 'motion back offset' should be 0 or 0.5, by chance? ive seen people saying use both

11 November 2009, 05:18 AM
hmm...that didnt work either. in NUKE i just get black for the vectors and no blur when 'mental ray image buffer' set as UV channels. i get blur if set to 'motion' but its just blurring whole frame, back and forth, even when static. : (

11 November 2009, 06:02 AM
Try my motion vector scene as a test. It produces pixel values almost to 200 in the red channel. Works in Nuke too.

I haven't tried this with custom buffers, so that must be your problem. See if adding your buffer to my scene breaks it.

btw- I never set motion back offset, I leave it at the default and my shutter start/end is set to 0.5 & 0.5.

11 November 2009, 06:25 AM
cool, thanks Shawn..I'll try it.: )
But i want to use yours first both beauty and vector to verify i got the NUKE part down before adding my buffer, but how do you render beauty if your MV overtook the primary render buffer?


11 November 2009, 06:56 AM

well, i guess i'm cursed or stupid or both..haha. I rendered yours out without touching anything to get the exr, then i disconnected the mv node from the camera and just rendered a beauty pass with blinn on the box. brought into nuke, but wasnt sure if my setting are right (see link above). blur doesnt look right and crashed a lot. are your nuke settings same as mine?

also to note, i read on a few forums that if using floating point for the MVs, the max displace value is ignored but i cant confirm that's 100 per true...

so if can get NUKE setting right then can try to break scene with my buffer...

thanks for your help!!!

11 November 2009, 12:03 PM
I'm not sure if this trick can solve your problem anyway, change the Shutter Angle in your CameraShape from 144 witch is the default to something like 180 or maybe 360
hope this help!

11 November 2009, 04:46 AM
I've uploaded my nuke scene and my example images. I've included the beauty render and the motion vector render as a 32 bit exr (from the same scene as I posted above). I also included a full 3d motion blur render for comparison. They look almost identical. (


11 November 2009, 10:18 PM
hey thanks so much! i will examine it and I'm sure that will help. thats really a big help.

I did wonder how you rendered your beauty pass in maya since i dont see a render layer and the mip node is taking over the primary render buffer : /

11 November 2009, 11:48 PM
I did wonder how you rendered your beauty pass in maya since i dont see a render layer and the mip node is taking over the primary render buffer : /

It's a separate scene- I get so fed up with doing passes/render layers that I often do that.

11 November 2009, 11:52 PM
your scene is working great, Shaun..just trying to figure how to export the beauty and motion vector pass in same scene.....

and related to mr userframebuffers, according to this, they don't work in 2009. might be why i haven't been able to get a result for a week now. Thanks, MI forum for the no reply regarding that issue...

so the question remains to anyone out there, how to get the mip_mvectors into a render pass, I guess since buffers aren't working. If I find anything I'll let you know. its kind of sad we have to save 2 scenes, you know..but when you gotta get stuff out ya know : )

11 November 2009, 12:03 AM
Have you tried using the built in maya 2d vector pass (it's the one in the pass tab of render globals- it's created as mv2DToxik)? You still may be able to get everything into one scene that way, but like I said, eventually you add enough passes/render layers in 2009 and something always breaks.

11 November 2009, 01:51 AM
yea, i feel your pain with render passes/layers :/

Well, glad to report that for the most part its working fine: ) with the 2 file approach.
(link to my nuke, maya and 2 test image below)

one issue is i get some nasty white outlines around the objects in nuke, even though its checked as 'premultiplied'. Both beauty and vector were rendered with med blue background in camera. It seemed you were using premult in maya like i was so i wonder why i got the white halos?

Does the max displace number in the mip node in maya SET the amount of blur or kind of like a cap? just wonder where did you come up with the number 200?

thanks again for your help..finally something is working with this : )

11 November 2009, 02:38 AM
You have to render on black. Otherwise premults are more complicated. That halo you're getting is the value difference between blue and black.

Second, ignore the displace number on the mip mv node- it's a scale factor for when you are rendering 8 bit vectors. It's disabled when in float mode.

11 November 2009, 05:00 AM
awesome : ) it
just for measure, i'll give the 2d motionvector pass a run. I'll assume the setup is similar in NUKE.

if you get a sec, I have a job-related question (
thanks for your help!

11 November 2009, 07:56 PM
I hear you on the render layer frustration, Shawn.

Here's a simple process I use to keep both bty and mv passes in the same scene -

Duplicate your camera, call it cam_mv.
Attach the mip_motionvector shader to cam_mv
Create a render layer, call it stuff_mv
Set layer overrides on both cameras to toggle the "renderable" attributes, found in the attribute editor on the camera shape node under Output Settings. The main camera is renderable in your bty render layer and not in stuff_mv, and the other way around for cam_mv.
This way the output shader is only active in the motion vector render layer.

11 November 2009, 12:38 AM
hey thanks! yea i thought about that way too...i guess its better than 2 files. No way around i guess for now....

good tip! : )

CGTalk Moderation
11 November 2009, 12:38 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.