Dec 4, 2014

Radio buttons in nuke

Hi, I always wanted to have the option of creating radiobuttons in the nuke gui, for gizmos. Its easier to use than dropdown menus, because they  need only on click to select the value. Today I checked the documentation, and I found an option. The radiobuttons are a different widget version of the enumeration knob. You can't add this knob like others via the "manage user knobs" panel, but you can with the help of a little python. For example like this:

n = nuke.toNode('Group1')
r = nuke.Radio_Knob('options', 'Option channels', ('red', 'green', 'blue', 'alpha'))
n.addKnob(r)

First argument is the name of the knob, second is the label, and the third is a tuple, with the radiobuttons' name in it.
Hope this was useful, cheers.

Apr 16, 2014

Mattepaint camera setup for multiple shots

Hi, so it lasted for a little while I managed to really post a new one! :) Sorry for that!
So in our current project we have a few sequences where we are using background mattepaints. Nothing new at this point. But I really like the way I create the camera and the framing for the mattepaint, from the existing shot cameras. The concept is that we should give the painter the least possible work :) (Not because he is slow) The less number of paintings and less area to paint, is the better. So I exported the cameras from maya to nuke, all animated of course. I make an environment sphere, using an uv grid as a texture, just to see where are the cameras heading. I really like the camera projection in nuke, because I can project from every shotcamera a constant color onto this sphere, using mergemat node, and then scrubbing in the timeline I can see all cameras animating the projection in realtime. Then I use a checkerboard texture projection (see the second and third image below) for a newly created mattecamera. The purpose it should cover all the area covered by the other cameras (those are projecting different constant color). I usually duplicate one of the shotcameras (usually the one with the biggest field of view) that will be the new mattecamera. Then I lower the focal length, to make the fov bigger, and rotate as needed. If there are cameras facing completely different directions, then more than one mattepaint is needed, and we should group the cameras based on facing direction. These cameras I pass back to maya, and render a basic lit environment, that the painter uses as base for his mattepaint. When the paint is ready, I save layers as images from that, and project back onto proxy geometries of the original scene geometry. Or just onto cards, if further away. Using of course the same mattepaint camera as projector camera.


Node setup, the main thing is the projection using mergemat nodes to the sphere.





Projection in 3d view