Visit ComfyUI Online for ready-to-use ComfyUI environment
Generate gradient image simulating light source for dynamic lighting effects in AI art.
The LightSource node is designed to generate a gradient image that simulates a simple light source. This node allows you to create various lighting effects by specifying the position of the light, the gradient's intensity, and the colors at the start and end of the gradient. The primary benefit of this node is its ability to produce realistic lighting gradients that can enhance the visual appeal of your images. By adjusting the light position and gradient parameters, you can achieve different lighting effects, such as simulating light coming from the top, bottom, left, right, or even from the corners. This flexibility makes the LightSource node a powerful tool for AI artists looking to add dynamic lighting to their creations.
This parameter specifies the position of the light source. You can choose from various options such as "Left Light", "Right Light", "Top Light", "Bottom Light", "Top Left Light", "Top Right Light", "Bottom Left Light", and "Bottom Right Light". The position of the light affects the direction and angle of the gradient, creating different lighting effects on the image.
This parameter controls the intensity of the gradient. It is a float value with a default of 1.0, a minimum of 0.0, and a maximum of 100.0. Adjusting the multiplier changes the steepness of the gradient, allowing you to create softer or more pronounced lighting effects.
This parameter defines the starting color of the gradient. It can be specified in RGB format (e.g., "255,255,255") or hex format (e.g., "#FFFFFF"). The start color is the color at the position of the light source.
This parameter defines the ending color of the gradient. Similar to the start color, it can be specified in RGB format or hex format. The end color is the color at the opposite end of the gradient from the light source.
This parameter sets the width of the generated gradient image. It is an integer value with a default of 512, a minimum of 0, and a maximum defined by MAX_RESOLUTION. The width determines the horizontal size of the image.
This parameter sets the height of the generated gradient image. It is an integer value with a default of 512, a minimum of 0, and a maximum defined by MAX_RESOLUTION. The height determines the vertical size of the image.
The output of the LightSource node is an image tensor representing the generated gradient. This image can be used as a light source in your AI art projects, providing realistic lighting effects based on the specified parameters. The image is normalized to a float32 format and converted to a tensor for further processing.
light_position settings to see how the light direction affects your image. For example, using "Top Light" can simulate sunlight coming from above.multiplier to fine-tune the intensity of the gradient. A higher multiplier will create a more dramatic lighting effect, while a lower multiplier will produce a softer gradient.start_color and end_color values to create more visually striking gradients. For instance, a gradient from white to black can simulate a strong light source fading into darkness.width and height match the dimensions of the image you are working with to avoid any scaling issues.light_position is provided.light_position parameter is set to one of the valid options listed in the error message.start_color or end_color is not in the correct format.width or height parameters are set to non-positive values.width and height are positive integers within the allowed range.multiplier parameter is set outside the allowed range.multiplier to be within the range of 0.0 to 100.0.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.