ComfyUI Node: Simple Light Source

Class Name

LightSource

Category
gaffer
Author
ray (Account age: 4641days)
Extension
comfyui's gaffer(ComfyUI native implementation of IC-Light. )
Latest Updated
2024-06-19
Github Stars
0.04K

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 gradient images that simulate various lighting conditions, which can be used as simple light sources in your AI art projects. This node allows you to create gradients with customizable colors and positions, providing a versatile tool for enhancing the lighting effects in your images. By adjusting parameters such as light position, color, and intensity, you can achieve a wide range of lighting effects, from subtle shading to dramatic highlights. The primary goal of this node is to offer a straightforward way to incorporate realistic lighting into your artwork, making it an essential tool for AI artists looking to add depth and dimension to their creations.

Simple Light Source Input Parameters:

light_position

This parameter determines the position of the light source in the generated gradient image. 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 you select will affect the direction and intensity of the gradient, simulating the effect of light coming from that specific direction.

multiplier

The multiplier parameter controls the intensity of the gradient. It is a floating-point value with a default of 1.0, a minimum of 0.0, and a maximum of 100.0. Adjusting this value will change the steepness of the gradient, allowing you to create either subtle or more pronounced lighting effects.

start_color

This parameter specifies the starting color of the gradient. You can input the color in either RGB format (e.g., "255,255,255") or hex format (e.g., "#FFFFFF"). The start color represents the color at the light source's origin.

end_color

The end_color parameter defines the ending color of the gradient. Similar to start_color, you can input the color in RGB or hex format. The end color represents the color at the farthest point 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. Adjusting the width will change the horizontal size of the image.

height

The height parameter determines 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. Adjusting the height will change the vertical size of the image.

batch_size

This optional parameter specifies the number of gradient images to generate in a batch. It is an integer value with a default of 1, a minimum of 1, and a maximum of 4096. Increasing the batch size allows you to generate multiple images simultaneously.

prev_image

This optional parameter allows you to input a previous image to which the new gradient image will be appended. This can be useful for creating sequences or combining multiple lighting effects.

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 input parameters. The output image is normalized to a range of 0.0 to 1.0 and can be used directly in further processing or rendering steps.

Simple Light Source Usage Tips:

  • Experiment with different light_position settings to see how the direction of light affects your image.
  • Use the multiplier parameter to fine-tune the intensity of the gradient for subtle or dramatic lighting effects.
  • Combine multiple LightSource nodes with different start_color and end_color settings to create complex lighting scenarios.
  • Utilize the prev_image parameter to layer multiple gradients and achieve more intricate lighting patterns.

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 specified.
  • Solution: Ensure that the light_position parameter is set to one of the supported values listed in the error message.

Invalid color format. Use RGB (e.g., "255,255,255") or hex (e.g., "#FFFFFF").

  • Explanation: This error occurs when the start_color or end_color parameter is not in the correct format.
  • Solution: Verify that the color values are provided in either RGB or hex format.

Width and height must be within the allowed range.

  • Explanation: This error occurs when the width or height parameter is set outside the allowed range.
  • Solution: Ensure that the width and height parameters are within the specified minimum and maximum values.

Batch size must be between 1 and 4096.

  • Explanation: This error occurs when the batch_size parameter is set outside the allowed range.
  • Solution: Adjust the batch_size parameter to be within the range of 1 to 4096.

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.