Search Tips

Search is based on keyword.

`Ex: "Procedures"`

Do not search with natural language

`Ex: "How do I write a new procedure?"`

Give Feedback Support Portal

# Light Linking

Light linking is a typical example of how a standard setting is defined high up in the hierarchy and then overridden at a specified scene graph location where a different setting is needed. Shadow Linking works in the exact same way.

| 1. | In an empty scene, create a sphere using a PrimitiveCreate Node.

Set the name to /root/world/geo/sphere.

| 2. | Add a plane with a PrimitiveCreate node.

Set the name to /root/world/geo/plane.

| 3. | Add a Merge node and connect both PrimitiveCreate nodes as inputs.

| 4. | Add a light with a GafferThree node.

| 5. | Connect the output of the Merge node to the input of the GafferThree node.

| 6. | Add a LightLink node.

| 7. | Connect the output of the GafferThree node to the input of the LightLink node.

| 8. | Select the LightLink node and press Alt+E to edit it.

| 9. | Set the effect field to illumination, and the action field to off.

| 10. | Add the primitive sphere to the objects field.

| 11. | Add the light to the lights field.

Creating the light adds a lightList attribute group under /root/world with the enable attribute set to 1.

Note: With the default behavior of the light set to off - by changing the defaultLink dropdown to off - the enable attribute is set to 0.

The primitive sphere’s lightList enable attribute is set to 0, as it is overridden locally by the LightLink node. Attributes are inherited from parent scene graph locations. If needed, they can be locally overridden as shown above where a specific light (/root/world/lgt/gaffer/light1) is disabled for a certain node (/root/world/geo/sphere).

Note: A G label next to an attribute signifies that its value has been inherited from a parent scene graph location, whereas the label L means the attribute is stored locally at the selected location.