Hi there. I've run into an issue trying to export a camera from Maya to Nuke. The camera inside Maya has "Shake" enabled and is running a MEL script like this:
camera_lay_v003Shape.horizontalShake = noise(frame/20)/1000;
cam_lay_v003Shape.verticalShake = noise(frame/15)/1000;
The problem is when I export the camera it seems to ignore the shake and the two do not line up. However, my renders from Maya DO include the shake. I've tried all sorts of things to get it to bake out properly, but nothing is working.
Any insight on how to export the camera properly with all the shake properties too?
Solved! Go to Solution.
Solved by nick.guth. Go to Solution.
Hi @nick.guth and welcome to the community!
This may be more of an issue on Nukes end but I found this video that may help!
Its a bit dated but please let me know if it helps or if you need any more assistance!
If one or more of these posts helped answer your question, please click Accept as Solution on the posts that helped you so others in the community can find them easily.
Kudos are greatly appreciated. Everyone likes a thumbs up!
All the best,
Sean Heasley
Technical Support Specialist
Autodesk Here to Help | My Screencasts | Autodesk Virtual Agent | How To Reset User Settings | Installation and Licensing Forum | Maya Certified Hardware |
Hi @nick.guth
I'm just checking in again to see if you need more help with this. Did the suggestion I provided yesterday work for you?
If so, please click Accept as Solution on the posts that helped you so others in the community can find them easily.
All the best,
Sean Heasley
Technical Support Specialist
Autodesk Here to Help | My Screencasts | Autodesk Virtual Agent | How To Reset User Settings | Installation and Licensing Forum | Maya Certified Hardware |
The solution we came up with worked, but it has to do with both NUKE and MAYA. Here's what we did:
INSIDE MAYA
The default shake expressions are applied to a parameter called 'verticalShake' and 'horizontalShake'. Unfortunately, nuke can not read that.
camera1Shape.verticalShake = noise(frame/15);
camera1Shape.horizontalShake = noise(frame/20);
However, it CAN read it if it's applied to the filmback (and the maya documentation explains these properties are identical in nature). So we copied those expressions and applied them to the film offset parameter in maya.
camera1Shape.verticalFilmOffset = noise(frame/15);
camera1Shape.horizontalFilmOffset = noise(frame/20);
We then baked those two channels (and disabled the checkbox for Shake). Exported it out as FBX and brought it into nuke.
INSIDE NUKE
Here is where things get a little tricky. Nuke and Maya use two different measurements (inches vs mm) for film backs as well as where it places the center of the offsets. Nuke uses NDC coordinates (-1 < 0 < +1) where the center of frame is 0 in both x&y. Maya does not.
To alleviate the issue we have to do a little math inside of nuke for the camera to match perfectly.
Once all that is done the camera will match perfectly to the camera that was inside of Maya!
Hello,
This solution didn't solve the problem for me. I baked the camera, baked the channels, exported and nothing. And it's almost as if it's a fake channel bake, when I turn off the "shake enabled" attribute it still actually turns it off and the shake disappears. I'm using Maya 2020. Any more ideas?
Hi
Just to say I have values in win_translate for both U & V in nuke after exporting as alembic from Maya, using film offset expression to achive camera shake.
I haven't managed to achive the second bit though for exact match.
hope that helps.
cheers
Yes it is possible. The solution is within maya itself.
Step. 1 - select camera go to node editor. You can see vertical and horizontal shake there. Simply break the connections and take those node in free space so we can create new setup. Now uncheck/disable shake enable in camera attribute.
Step. 2 - crate a group on camera so we can transfer values on rotation x and y. (Make center pivot of the group)
Step 3 - create multiply devide node. Connect verticalshake output to multiply devide nodes input 1x, then connect horizontalshake output to inputY.
Step. 4 - connect multiply devide nodes output x to camera group (which we have created) rotateX and then connect another output y to rotateY. (It will create unit coversion node automatically).
Step. 5 last step. To multiply camera shake till you achieve the results. Click on multiply devide node. You will see attribute where you can put value to multiply. Type values in input 2 for multiplying vertical shake and input 2 y for multiplying horizontal shake. (In my case it was x = 42 and y = -39.) Note - refer first frame too match position. You can create image sequence before doing this process so later you can match the result by applying this in image plane...... Mail me if you need any help regarding this. At gdeind24@gmail.com
Can't find what you're looking for? Ask the community or share your knowledge.