ComfyUI Node: Simple Light Source

Class Name

LightSource

Category
gaffer
Author
ray (Account age: 4641 days)
Extension
comfyui's gaffer(ComfyUI native implemen...
Latest Updated
6/19/2024
Github Stars
0.0K

How to Install comfyui's gaffer(ComfyUI native implementation of IC-Light. )

Install this extension via the ComfyUI Manager by searching for  comfyui's gaffer(ComfyUI native implementation of IC-Light. )
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfyui's gaffer(ComfyUI native implementation of IC-Light. ) in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Simple Light Source Description

Generate gradient image simulating light source for dynamic lighting effects in AI art.

Simple Light Source:

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.

Simple Light Source Input Parameters:

light_position

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.

multiplier

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.

start_color

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.

end_color

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.

width

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.

height

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.

Simple Light Source Output Parameters:

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.

Simple Light Source Usage Tips:

  • Experiment with different light_position settings to see how the light direction affects your image. For example, using "Top Light" can simulate sunlight coming from above.
  • Adjust the 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.
  • Use contrasting 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.
  • Ensure the width and height match the dimensions of the image you are working with to avoid any scaling issues.

Simple Light Source Common Errors and Solutions:

Unsupported position. Choose from Left Light, Right Light, Top Light, Bottom Light, Top Left Light, Top Right Light, Bottom Left Light, Bottom Right Light.

  • Explanation: This error occurs when an invalid light_position is provided.
  • Solution: Ensure that the light_position parameter is set to one of the valid options listed in the error message.

Invalid color format. Use RGB or hex format.

  • Explanation: This error occurs when the start_color or end_color is not in the correct format.
  • Solution: Make sure to specify the colors in either RGB format (e.g., "255,255,255") or hex format (e.g., "#FFFFFF").

Width and height must be positive integers.

  • Explanation: This error occurs when the width or height parameters are set to non-positive values.
  • Solution: Ensure that both width and height are positive integers within the allowed range.

Multiplier out of range. Must be between 0.0 and 100.0.

  • Explanation: This error occurs when the multiplier parameter is set outside the allowed range.
  • Solution: Adjust the multiplier to be within the range of 0.0 to 100.0.

Simple Light Source Related Nodes

Go back to the extension to check out more related nodes.
comfyui's gaffer(ComfyUI native implementation of IC-Light. )
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.