Visit ComfyUI Online for ready-to-use ComfyUI environment
Create and manage immovable shapes in particle systems for realistic simulations.
The StaticBody node is designed to create and manage static bodies within a particle system, providing a way to define immovable shapes that interact with dynamic particles. This node is particularly useful for setting up boundaries, obstacles, or any static elements that need to influence the behavior of particles in a simulation. By defining properties such as shape, position, elasticity, and friction, you can control how these static bodies interact with the particles, ensuring a more realistic and controlled simulation environment. The node also supports visual representation of these static bodies, allowing you to see their placement and effect within the simulation.
The shape_type parameter defines the type of shape for the static body. It can be either "segment" or "polygon". A "segment" is a straight line between two points, while a "polygon" is a four-sided shape defined by its corner points. This parameter is crucial as it determines the geometric form of the static body and how it will interact with particles.
The x1 parameter specifies the x-coordinate of the first point of the shape. It is a floating-point value ranging from 0.0 to 1.0, with a default value of 0.0. This parameter, along with y1, x2, and y2, defines the position and size of the shape within the simulation space.
The y1 parameter specifies the y-coordinate of the first point of the shape. It is a floating-point value ranging from 0.0 to 1.0, with a default value of 0.0. This parameter works in conjunction with x1, x2, and y2 to define the shape's position and size.
The x2 parameter specifies the x-coordinate of the second point of the shape. It is a floating-point value ranging from 0.0 to 1.0, with a default value of 1.0. This parameter, along with x1, y1, and y2, helps to define the dimensions and orientation of the shape.
The y2 parameter specifies the y-coordinate of the second point of the shape. It is a floating-point value ranging from 0.0 to 1.0, with a default value of 1.0. This parameter, in combination with x1, y1, and x2, determines the shape's size and position.
The elasticity parameter defines how bouncy the static body is when particles collide with it. It is a floating-point value ranging from 0.0 to 1.0, with a default value of 0.9. Higher values result in more elastic collisions, where particles bounce off the static body with greater energy.
The friction parameter specifies the amount of friction between the static body and the particles. It is a floating-point value ranging from 0.0 to 1.0, with a default value of 0.5. Higher values indicate more friction, causing particles to slow down or stop when they come into contact with the static body.
The draw parameter is a boolean that determines whether the static body should be visually represented in the simulation. It has a default value of True. When set to True, the static body will be drawn on the simulation canvas, allowing you to see its position and shape.
The color parameter specifies the color of the static body when it is drawn. It is a string representing an RGB color value, with a default value of "(255,255,255)". This parameter allows you to customize the appearance of the static body for better visualization.
The previous_body parameter is optional and allows you to pass a previously created static body to the function. This parameter is useful for chaining multiple static bodies together, ensuring they are all managed within the same context.
The STATIC_BODY output parameter returns a list of static bodies created by the node. This list includes all the defined static bodies with their respective properties such as shape, position, elasticity, friction, and color. This output is essential for further processing or visualization within the particle system simulation.
previous_body parameter.elasticity and friction parameters to fine-tune the interaction between particles and static bodies for more realistic simulations.draw parameter to visualize static bodies during development and debugging, ensuring they are correctly positioned and shaped.shape_type parameter must be either "segment" or "polygon".shape_type parameter is set to either "segment" or "polygon".x1, y1, x2, y2) are within the range of 0.0 to 1.0.elasticity and friction parameters must be between 0.0 and 1.0.elasticity and friction values are within the valid range of 0.0 to 1.0.color parameter must be a string representing an RGB value.color parameter is in the correct format, such as "(255,255,255)".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.