CreativeCode Settings:
The CreativeCodeSettings node is designed to facilitate the configuration and management of shader rendering settings within the ComfyUI CreativeCode framework. This node serves as a central hub for defining and adjusting various parameters that influence the rendering process, allowing you to tailor the output to your specific artistic needs. By encapsulating these settings, the node provides a streamlined approach to managing complex configurations, ensuring that you can focus on the creative aspects of shader development without getting bogged down by technical details. The primary goal of the CreativeCodeSettings node is to offer a user-friendly interface for setting up and modifying shader parameters, making it an essential tool for artists looking to explore the possibilities of shader-based visual art.
CreativeCode Settings Input Parameters:
select_shader
This parameter allows you to choose from a list of available shaders, providing a starting point for your creative process. The default value is "None", and it is essential for selecting the base shader code that will be used in rendering.
shader_code
The shader_code parameter is a string input where you can input or modify the GLSL or P5 shader code. It supports multiline input, allowing for complex shader scripts. The default shader code is provided, which can be customized to achieve various visual effects.
width
This integer parameter defines the width of the rendered output in pixels. It ranges from a minimum of 64 to a maximum of 4096, with a default value of 640. Adjusting the width impacts the resolution and aspect ratio of the final image or video.
height
Similar to the width, this integer parameter specifies the height of the rendered output in pixels. It also ranges from 64 to 4096, with a default value of 360. The height, in conjunction with the width, determines the overall resolution of the output.
frames
The frames parameter sets the number of frames to be rendered, which is crucial for animations. It ranges from 1 to 2400, with a default of 1, allowing you to create anything from a single image to a full-length animation sequence.
fps
This float parameter specifies the frames per second for the animation, affecting the playback speed. It ranges from 1.0 to 120.0, with a default of 24.0, providing flexibility in how smooth or fast the animation appears.
time_start
The time_start parameter is a float that determines the starting time for the animation, measured in seconds. It ranges from 0.0 to 9999.0, with a default of 0.0, allowing you to control the temporal aspect of the shader's execution.
version_mode
This parameter offers options for the shader version mode, including "auto", "es300", and "glsl330", with "auto" as the default. It determines the GLSL version used, which can affect compatibility and features available in the shader code.
code_type
The code_type parameter allows you to specify the type of shader code being used, with options "glsl" and "p5". The default is "glsl", and this choice influences the syntax and capabilities of the shader code.
CreativeCode Settings Output Parameters:
settings
The settings output parameter encapsulates all the configured settings into a single output, labeled as CC_SETTINGS. This output is crucial for passing the configured parameters to other nodes within the CreativeCode framework, ensuring that the rendering process adheres to the specified configurations.
CreativeCode Settings Usage Tips:
- Experiment with different
shader_codesnippets to explore a wide range of visual effects and animations. - Adjust the
widthandheightparameters to optimize the resolution for your specific display or output requirements, balancing quality and performance. - Utilize the
framesandfpsparameters to create smooth animations, ensuring that the frame rate matches your desired playback speed.
CreativeCode Settings Common Errors and Solutions:
Invalid custom_uniforms JSON
- Explanation: This error occurs when the
custom_uniformsstring is not properly formatted as JSON. - Solution: Ensure that the
custom_uniformsstring is a valid JSON object, with correct syntax including proper use of braces, brackets, and commas.
Resolution must be at least 1x1
- Explanation: This error is raised when the specified
widthorheightis below the minimum resolution threshold. - Solution: Adjust the
widthandheightparameters to be at least 64x64 to meet the minimum resolution requirements.
