🍒Distribute_Icons / 分发图标:
The Distribute_Icons node is designed to enhance your scene images by strategically placing icons based on a mask image. This node allows you to distribute icons across a scene, providing a visually appealing and organized layout. By utilizing a mask, you can control where icons appear, ensuring they are placed only in desired areas. This node is particularly beneficial for creating complex compositions where icons need to be integrated seamlessly into a scene. It offers flexibility in terms of icon size, spacing, and rotation, allowing for a high degree of customization to suit various artistic needs.
🍒Distribute_Icons / 分发图标 Input Parameters:
scene_image
The scene_image parameter is the base image onto which the icons will be distributed. It serves as the canvas for your composition, and the quality and resolution of this image will directly affect the final output.
mask_image
The mask_image parameter acts as a guide for icon placement. Areas of the mask that are highlighted will be considered valid locations for icons, allowing for precise control over where icons appear in the scene.
icon_folder
The icon_folder parameter specifies the directory path where the icons to be distributed are stored. By default, it is set to ./icons, and it should contain the images you wish to use as icons in your scene.
icon_size
The icon_size parameter determines the size of the icons in pixels. It has a default value of 50, with a minimum of 10 and a maximum of 512. Adjusting this parameter will affect the prominence of the icons in the scene.
min_distance
The min_distance parameter sets the minimum distance between icons, ensuring they do not overlap. It has a default value of 0, with a range from 0 to 512. This parameter helps maintain a clean and organized layout.
min_scale
The min_scale parameter defines the minimum scaling factor for the icons, allowing for size variation. It defaults to 0.5, with a range from 0.1 to 10.0. This can be used to create a dynamic and varied appearance in the icon distribution.
rotation_angle
The rotation_angle parameter specifies the angle of rotation for the icons in degrees. It defaults to 90, with a range from 0 to 180. This allows for creative orientation of icons, adding visual interest to the scene.
max_scale
The max_scale parameter, although hidden, sets the maximum scaling factor for the icons. It defaults to 1.0 and works in conjunction with min_scale to define the range of possible icon sizes.
🍒Distribute_Icons / 分发图标 Output Parameters:
IMAGE
The output is an IMAGE that represents the scene with the icons distributed according to the specified parameters. This image is the final composition, showcasing the integration of icons into the scene based on the mask and other settings.
🍒Distribute_Icons / 分发图标 Usage Tips:
- Experiment with different
mask_imagedesigns to control icon placement creatively and achieve unique compositions. - Adjust
icon_sizeandmin_distanceto balance icon prominence and spacing, ensuring a harmonious layout. - Utilize
rotation_angleto add dynamic orientation to icons, enhancing the visual appeal of the scene.
🍒Distribute_Icons / 分发图标 Common Errors and Solutions:
"Icon placement failed: Unable to find a suitable position"
- Explanation: This error occurs when the node cannot find a valid position for an icon based on the mask and distance constraints.
- Solution: Ensure that the
mask_imagehas sufficient highlighted areas for icon placement and consider reducing themin_distanceto allow more flexibility in positioning.
"Invalid icon folder path"
- Explanation: This error indicates that the specified
icon_folderpath does not exist or is incorrect. - Solution: Verify that the
icon_folderpath is correct and that it contains the icons you wish to use. Adjust the path if necessary to point to the correct directory.
