## How to Rotate Light in Substance Designer
### Overview
Rotating light in Substance Designer is a crucial technique for creating realistic materials and effects. It allows you to control the direction and intensity of light, which can dramatically impact the appearance of your materials. This tutorial will provide a comprehensive guide on how to rotate light in Substance Designer, covering various methods and techniques.
### Using the Light Node
The Light node is the primary tool for controlling light in Substance Designer. It provides a range of parameters for adjusting the position, direction, color, and intensity of light.
**1. Adding a Light Node**
* Select the “Create” tab from the Substance Designer interface.
* Choose “Light” from the “Nodes” category.
* Drag and drop the Light node into your graph.
**2. Rotating the Light**
* Once the Light node is added, you can rotate it by dragging the small circle on the sphere representing the light source.
* Alternatively, you can use the “Rotation” parameters in the Light node’s property panel:
* `Rotation X`: Rotates the light around the X-axis.
* `Rotation Y`: Rotates the light around the Y-axis.
* `Rotation Z`: Rotates the light around the Z-axis.
### Using the Transform Node
Another method for rotating light is to use the Transform node. This node allows you to apply a series of transformations, including rotation, to any object in the graph.
**1. Adding a Transform Node**
* Add a Transform node from the “Nodes” category.
* Connect the Transform node to the input of the Light node.
**2. Rotating the Light**
* Select the Transform node.
* In the property panel, you will find the “Rotation” parameters:
* `Rotation X`: Rotates the light around the X-axis.
* `Rotation Y`: Rotates the light around the Y-axis.
* `Rotation Z`: Rotates the light around the Z-axis.
### Rotating Light Using a Parameter
You can also control the rotation of light using a parameter. This allows you to dynamically adjust the light’s direction based on external input or procedural calculations.
**1. Creating a Parameter**
* Select the “Parameters” tab from the interface.
* Click the “Add Parameter” button.
* Choose a name for the parameter (e.g., “LightRotation”).
* Set the type to “Float” or “Vector3.”
**2. Connecting the Parameter to the Light Node**
* Connect the output of the parameter to the “Rotation Angle” input of the Light node.
* If using a float parameter, connect it to the “Rotation Z” input.
* If using a Vector3 parameter, connect it to the “Rotation” input.
**3. Modifying the Light Rotation**
* Adjust the parameter’s value to rotate the light.
* You can use animation curves or procedural calculations to create dynamic light rotation effects.
### Advanced Techniques
**1. Rotating Light with Multiple Axes**
You can rotate light around multiple axes simultaneously by using multiple Transform nodes.
* Create multiple Transform nodes and connect them in series.
* Rotate the light around the desired axes in each Transform node.
**2. Constraining Light Rotation**
Use the “Limit Rotation” parameter in the Light node to restrict the rotation of light to a specific range.
* Set the “Min Rotation” and “Max Rotation” angles to define the limits.
**3. Using Custom Light Functions**
Substance Designer allows you to create custom light functions using HLSL shaders. This provides advanced control over light rotation and other lighting parameters.
* Create a custom HLSL function that defines the light rotation behavior.
* Use the “Custom Lighting Function” parameter in the Light node to specify your custom function.
### Conclusion
Rotating light in Substance Designer is a versatile technique that allows you to achieve realistic lighting effects and create dynamic materials. By understanding the various methods and techniques described in this tutorial, you can effectively control the direction and intensity of light to enhance the visual quality of your Substance creations.