Phong
Uses the Phong shading algorithm to provide accurate shading and highlights. The Phong node has several map inputs you can use to mask the effect of the node.
Inputs and Controls
Connection Type |
Connection Name |
Function |
Input |
mapsh |
An optional mask for varying the shininess value. Where the mask is black, the shininess is set to min shininess. Where the mask is white, the shininess is set to max shininess. Values in between (where the matte is gray) are attenuated accordingly. |
mapS |
An optional mask for limiting the effect of the specular component. Any changes you make to specular are limited to the non-black areas of the mask. |
|
mapE |
An optional mask for limiting the effect of the emissive component. Any changes you make to emission are limited to the non-black areas of the mask. |
|
mapD |
An optional mask for limiting the effect of the diffuse component. Any changes you make to diffuse are limited to the non-black areas of the mask. |
|
unnamed |
Either: • The 2D image you’re using for the surface texture, or • Another shader node, such as Diffuse, Specular, or Emission. Adding several shader nodes one after the other allows you to produce more complex effects. |
Control (UI) |
Knob (Scripting) |
Default Value |
Function |
Phong Tab |
|||
channels |
channels |
rgba |
The effect is only applied to these channels. If you set this to something other than none, you can use the checkboxes on the right to select individual channels. |
color |
color |
1 |
Adjusts the material color. |
emission |
emission |
0 |
The color of the light the material emits. Note that when you have an image connected to the unnamed input of the node and adjust this value, you need to look at the rendered 2D image to see the effect of your changes. Changing the emission value does not have any effect in the 3D Viewer. |
diffuse |
diffuse |
0.18 |
The color of the material when illuminated. Note that when you have an image connected to the unnamed input of the node and adjust this value, you need to look at the rendered 2D image to see the effect of your changes. Changing the white value does not have any effect in the 3D Viewer. |
specular |
specular |
0.8 |
Adjusts how bright the highlights on the material seem. |
min shininess |
min_shininess |
10 |
The shininess value controls the width of the highlights. The higher the value, the wider the highlights. If you have connected a mask to the mapSh input of the node, pixel values in the mask are used to vary the shininess value. Where the matte is black, the shininess is set to min shininess. Where the matte is white, the shininess is set to max shininess. Values in between (where the matte is gray) are attenuated accordingly. If you’re not using the mapSh input, the average of min shininess and the maxshininess value is used as the shininess value for the material. |
max shininess |
max_shininess |
10 |
The shininess value controls the width of the highlights. The higher the value, the wider the highlights. If you have connected a mask to the mapSh input of the node, pixel values in the mask are used to vary the shininess value. Where the matte is black, the shininess is set to min shininess. Where the matte is white, the shininess is set to max shininess. Values in between (where the matte is gray) are attenuated accordingly. If you’re not using the mapSh input, the average of min shininess and the maxshininess value is used as the shininess value for the material. |
shininess channel |
shininess_channel |
luminance |
Select which channel from the mapSh input is used to map the black and white values to the minshininess and maxshininess controls. Choose: • red to use the red channel for the mapping, • green to use the green channel, • blue to use the blue channel, • alpha to use the alpha channel, • luminance to use the luminance, or • averagergb to use the average of the red, green, and blue channels. |
Step-by-Step Guides
Video Tutorials
3D Workspace Overview from Foundry on Vimeo.
Nuke is not limited to a 2D space, in fact, it has a complete 3D environment built right in. For example, here is a 3D ship and a 3D sphere. In order to see the 3D environment, go to the View menu where it says 2D and switch that to 3D, and there’s the environment. In order to change the view, which is the default camera, you can use the Alt or your Option key, along with your mouse buttons. For example, Alt and left mouse button scrolls, Alt and middle mouse button zooms, and Alt and right mouse button orbits.
Let’s see what we have in the scene. There is a 3D Camera, a Spotlight, a Point light, a primitive Sphere, an imported spaceship, and a large primitive Card in the background. Let’s take a look at the node network, and you can see what we need to make a 3D scene happen. The node with the most connections is the Scene node. The Scene node groups together lights and geometry in order to pass them on to a render node. In order to render the scene so it becomes 2D, you need to have some sort of render node. In this case, there is a ScanlineRender node. Connected to the ScanlineRender is a 3D Camera. Connected to the Scene node are two lights - there is the Spotlight and the Point light. If I open up the properties on the Spotlight, you can see common options like color and intensity and, in the case of the Spotlight, cone angle. There are also two pieces of primitive geometry here - there is the Sphere and the Card. This will be a good time to note that 3D nodes have a rounded, pill-like shape, as opposed to the rectangular 2D nodes.
You can create a light or a primitive piece of geometry through the 3D menu. You can make your Point or your Spot, plus a Direct and a few specialized lights, like the one that’s called Light, which you can use to import lights from other programs, like Maya. There is also the Geometry menu, which has the primitives such as Card, or other shapes, like Cube and Cylinder. You can transform lights and geometry. For example, if I open up the Sphere, you will see there is a translate, rotate, and scale property. Once this is open, you will also see there is a transform handle. If you click+drag the handle along the axis, you can move it in that direction, for example, Y. Of course, you can also enter values into the properties panel. Lights also have their own set of transforms. Now, one new feature is the fact that lights can cast shadows right here in the 3D environment. For example, if I go to the Spotlight and go to the Shadows tab, you will see there is a place to click on cast shadows. Let’s go back to the 2D view. You can see the shadow of the Sphere right here on the spaceship. Now, aside from shadows of course, you can animate all of these properties. You can animate the light, changing over time, as well as the geometry. There are also animation buttons beside all of these properties. You can key these as you would any other node inside Nuke.
You will notice that the two pieces of geometry have shaders connected to their img pipes. These are necessary for the surfaces to be lit correctly. The Sphere has a Phong, which is similar to the one you might have in a program like Maya. The Card has an Emission shader, which has the emissive component or the ambient color component. Now, in terms of the spaceship, it has to be imported through a ReadGeo node. ReadGeo node has a place to bring in the file, and this supports .fbx files, or .obj files, or alembic files, .abc. If there is animation in the file, Nuke will recognize it. For example, with the .fbx file, it might have multiple takes. Nuke will recognize that and you can choose the animation take. So, if I go back to the 3D view, scrub the timeline, and we will see the ship is pre-animated, and this animation was created in Maya. There is also a material connected to the img pipe of the ReadGeo. Now, because the UV texture space came through the .fbx file, in order to map the geometry, you just need to bring in the texture bitmaps through Read nodes, and connect to a shader. For example, here is the diffuse map connected through the mapD, or map diffuse. There is a specular map connected through the mapS, or map specular. Lets go back to the 2D view.
Now, if anything is animated, you can also activate motion blur. To do that, you go to the render node and, for example, with the ScanlineRender, go to the MultiSample tab and change samples to a higher number like 8. At that point, the motion blur will appear, as you can see right here. The higher the samples number, the higher the quality.
So, there is a brief introduction to Nuke’s 3D environment. Keep in mind that any node you need to create for this you can find through the 3D node menu. This includes all your shaders, geometry, lights, Scene nodes, and cameras. Aside from animating lights and geometry, you are also free to animate cameras. They have their own set of transforms. In any case, I would suggest exploring this component of Nuke.