DirectLight
DirectLights emit parallel light in one direction and appear to illuminate all objects with equal intensity, as if it was coming from a far away source. For example, you can use direct light to simulate sunlight and moonlight. Being at an infinite distance from the objects, direct light has orientation, but no position. To generate accurate shadows from a direct light, view the scene through the light (using the Viewer's camera dropdown menu, just like a camera) and adjust the DirectLight's Scale controls so that the part of the scene that should cast shadows fits within the view. This ensures that none of the shadow-casting geometry is missed by the depth map.
See also EnvironmentLight, PointLight, and SpotLight.
Tip: DirectLight's classic 3D system equivalent is the Direct node.
Inputs and Controls
Connection Type |
Connection Name |
Function |
Input |
look |
An optional input to force the light to "look" at an Axis node. |
axis |
An optional input to link the position, rotation, scale, and skew of the transformed 3D object(s) to an Axis node, so that the transformation controls on the Axis node override the corresponding controls on this node. Tip: If you’ve worked with other 3D applications, you may know the Axis node as a “null” or “locator” object. |
Control (UI) |
Knob (Scripting) |
Default Value |
Function |
DirectLight Tab |
|||
Angle |
angle |
0 |
Controls the apparent radius of the direct light as seen from the camera. For example, the sun has a radius of about 0.5 degrees as seen from the Earth. In practice, higher Angle values broaden the light and soften shadow edges, whereas lower values produce sharper edges. |
Color |
color |
1 |
Sets the color of the light. |
Intensity |
intensity |
50000 |
Sets the brightness of the light. |
Enable Color Temperature |
enable_color_temperature |
off |
Unsupported in the current USD library version used in Nuke. |
Color Temperature |
color_temperature |
1 |
Unsupported in the current USD library version used in Nuke. |
Exposure |
exposure |
0 |
Sets the brightness of the light as an indirect or ambient source of light, such as light reflected from the environment where the light is located. |
Normalize |
normalize |
off |
Unsupported in the current USD library version used in Nuke. |
Diffuse |
diffuse |
1 |
Sets the amount of diffuse reflection created by the light, such as light bouncing off soft furnishings and clothing. |
Specular |
specular |
1 |
Sets the amount of specular reflection created by the light, such as light bouncing off metal and other highly reflective surfaces. |
Display |
display |
wireframe |
Adjust the display characteristics of the 3D object. These settings don’t affect the render output of the scene; these are for display purposes only in the 3D Viewer. • off - hides the 3D geometry object. • wireframe - displays only the outlines of the object’s geometry. • solid - displays all geometry with a solid color. • solid + wireframe - displays the geometry as solid color with the object’s geometry outlines. • textured - displays only the surface texture. • textured + wireframe - displays the wireframe plus the surface texture. Note: The Viewer node 3D > display setting overrides this control. |
Selectable |
selectable |
on |
When enabled, you can make selections as normal in the Viewer. When disabled, points cannot be selected or changed. |
|
file_menu |
N/A |
Select to import or export a channel file: • Import chan file - import a channel file and transform the object according to the transformation data in the channel file. Channel files contain a set of Cartesian coordinates for every frame of animation in a given shot. You can create and export them using Nuke or 3D tracking software, such as 3D-Equalizer, Maya, or Boujou. • Export chan file - export the translation parameters that you’ve applied to the object as a channel file. This is a useful method of sharing setups between artists. |
|
snap_menu |
N/A |
Choose what a selection in the Viewer or pivot point is snapped to in the Viewer: • Geo to Selection (position) - the object is snapped to a new position depending on the points selected. • Geo to Selection (position, orientation) - the object is snapped to a new position and orientation depending on the points selected. • Geo to Selection (position, orientation, size) - the object is snapped to a new position, orientation, and size depending on the points selected. • Pivot Point to Selection (position) - the pivot point is snapped to a new position depending on the points selected. • Pivot Point to Selection (position, orientation) - the pivot point is snapped to a new position and orientation depending on the points selected. • Pivot Point to Selection (orientation) - the pivot point is snapped to a new position, orientation, and size depending on the points selected. |
Transform Order |
xform_order |
SRT |
Sets the operation order for scale (S), rotation (R), and translation (T). The possible operation combinations are SRT, STR, RST, RTS, TSR, TRS. |
Rotation Order |
rot_order |
ZXY |
Sets the order of rotation. The possible axial combinations are ZXY, XYZ, XZY, YXZ, YZX, ZXY, ZYX. |
Translate |
translate |
0, 0, 0 |
Lets you translate the object along the x, y, and z axes. You can also adjust translate values by clicking and dragging the object in the 3D Viewer. |
Rotate |
rotate |
0, 0, 0 |
Lets you rotate the object around the x, y, and z axes. You can adjust rotate values by holding down Ctrl/Cmd and dragging in the 3D Viewer. |
Scale |
scaling |
1, 1, 1 |
Lets you scale the object on the x, y, and z axes. |
Uniform Scale |
uniform_scale |
1 |
Lets you scale the object simultaneously on the x, y, and z axes. |
Skew |
skew |
0, 0, 0 |
Lets you skew the object on the x, y, and z axes. |
Pivot Translate |
pivot_translate |
0, 0, 0 |
When you make changes to a 3D object’s position, scaling, skewing, and rotation, these occur from the location of the object’s origin point or pivot. The pivot translate and rotate x, y, and z controls allow you to move and rotate the pivot point as required - you can even move it outside of the object. Subsequent transformations applied then occur relative to the new pivot point location and rotation. You can hold down Ctrl/Cmd and drag the pivot point to a new location in the 3D Viewer. |
Pivot Rotate |
pivot_rotate |
0, 0, 0 |
|
Local Matrix |
|||
Specify Matrix |
useMatrix |
N/A |
Enable this control to specify matrix values for the object you’re transforming as an alternative to setting transform, scale, skew and pivot values above. |
Matrix |
matrix |
N/A |
The matrix displays values from the object’s transform, rotate, scale, skew, and pivot controls. Check Specify Matrix and copy or drag-and-drop matrix values from another object to apply those values, for example, if you wanted to align objects in a scene. |
World Matrix |
|||
World matrix |
world_matrix |
N/A |
Displays the world or absolute xyz transform of the node in world coordinates. Note: Unlike the Local matrix, you can’t adjust the World matrix manually. |
Shadows Tab |
|||
cast shadows |
cast_shadows |
off |
When enabled, the light casts shadows as defined by the Shadow controls. |
shadow mode |
shadow_mode |
solid |
Presents three shadow casting modes that affect shadows cast by objects, based on the objects’ opacity: • solid - objects that cast shadows are considered to be completely solid. This option can be used with both ScanlineRender and PrmanRender. • clipped alpha - objects that cast shadows are considered to be transparent if the object’s alpha is below the light’s clipping threshold control in the Shadows tab. This option is only relevant if you are using ScanlineRender to render your shadows. • full alpha - shadows are calculated based on how light is reduced when it passes through non-opaque occluders. This option is only relevant if you are using ScanlineRender to render your shadows. |
filter |
filter |
cubic |
Determines the type of filter that the shadow mode uses when it’s set to clipped alpha or full alpha. |
scene epsilon |
scene_epsilon |
0.001 |
An offset that moves the sampling point away from the geometry surface, towards the light that is casting the shadow. Increasing this value can reduce self-shadowing artifacts. This control is only relevant if your shadows are generated using depth mapping and shadow mode is set to full alpha. |
samples |
samples |
1 |
Sets the number of samples for the light when generating soft shadows. If soft shadows in your scene appear dotty or noisy, try increasing this value. The higher the value, the smoother the soft the shadows become. This control is only relevant when shadow mode is set to solid or clipped alpha. |
sample width |
sample_width |
1 |
Sets the size of the light for soft shadows. This value determines the width of the soft area around the egde of a shadow. The higher the value, the larger the soft area. This control is only relevant if your shadows are generated using raytracing. |
bias |
depthmap_bias |
0.01 |
Sets the bias for the raytracing or shadow map. Increase this value if self shadowing artifacts appear in the image. This moves the surface sample point away from surface. Note, however, that if you increase the value too much, some shadows may start moving away from the base of the objects that cast them. This control is only relevant when shadow mode is set to solid or clipped alpha. |
slope bias |
depthmap_slope_ |
0.01 |
Bias for the shadow map. This is like bias, but the offset is proportional to the slope of the depth map. This allows you to give a different offset to each value in the depth map, depending on the surface’s slope relative to the light. If increasing bias reduced the existing self-shadowing artifacts but introduced more artifacts in other areas of the image, you may want to bring bias down a little and increase slope bias instead. This control is only relevant if your shadows are generated using depth mapping and shadow mode is set to solid or clipped alpha. |
clipping threshold |
clipping_threshold |
0.5 |
Objects that are set to cast shadows are considered transparent if their alpha is below the value set here. This control is only relevant if your shadows are generated using depth mapping and shadow mode is set to clipped alpha. |
jitter scale |
shadow_jitter_scale |
3 |
Sets the amount of jitter used when doing percentage-closer filtering (PCF) for soft shadows. A larger jitter scale value results in softer, more perceptually accurate shadows. PCF works by sampling the depth map at many different positions around the same spot. The final shadow value for that spot is an average of how many of the samples were occluded or visible from point of view of the light. This control is only relevant if your shadows are generated using depth mapping and shadow mode is set to solid or clipped alpha. |
depthmap resolution |
depthmap_width |
1024 |
Sets the resolution of the depth map. Larger values will result in a less crunchy edge, but will require more time to process. Note that you can also fix crunchy edges by increasing the number of samples instead of increasing the depth map resolution. This control is only relevant if your shadows are generated using depth mapping and shadow mode is set to solid or clipped alpha. |
output mask |
shadow_mask |
off |
Enables the associated channel to the right. Disabling this checkbox is the same as setting the channel to none. |
none |
Sets the channel you want to output the shadow map into. This can be enabled even if the cast shadows box is disabled. |