ComfyUI  >  Nodes  >  RyanOnTheInside >  Static Body | RyanOnTheInside

ComfyUI Node: Static Body | RyanOnTheInside

Class Name

StaticBody

Category
RyanOnTheInside/ParticleSystems
Author
ryanontheinside (Account age: 3752 days)
Extension
RyanOnTheInside
Latest Updated
8/25/2024
Github Stars
0.0K

How to Install RyanOnTheInside

Install this extension via the ComfyUI Manager by searching for  RyanOnTheInside
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter RyanOnTheInside 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

Static Body | RyanOnTheInside Description

Create and manage immovable shapes in particle systems for realistic simulations.

Static Body | RyanOnTheInside:

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.

Static Body | RyanOnTheInside Input Parameters:

shape_type

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.

x1

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.

y1

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.

x2

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.

y2

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.

elasticity

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.

friction

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.

draw

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.

color

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.

previous_body

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.

Static Body | RyanOnTheInside Output Parameters:

STATIC_BODY

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.

Static Body | RyanOnTheInside Usage Tips:

  • To create complex static environments, chain multiple static bodies together using the previous_body parameter.
  • Adjust the elasticity and friction parameters to fine-tune the interaction between particles and static bodies for more realistic simulations.
  • Use the draw parameter to visualize static bodies during development and debugging, ensuring they are correctly positioned and shaped.

Static Body | RyanOnTheInside Common Errors and Solutions:

"Invalid shape_type value"

  • Explanation: The shape_type parameter must be either "segment" or "polygon".
  • Solution: Ensure that the shape_type parameter is set to either "segment" or "polygon".

"x1, y1, x2, y2 values out of range"

  • Explanation: The coordinate values must be between 0.0 and 1.0.
  • Solution: Check that all coordinate values (x1, y1, x2, y2) are within the range of 0.0 to 1.0.

"Elasticity or friction value out of range"

  • Explanation: The elasticity and friction parameters must be between 0.0 and 1.0.
  • Solution: Ensure that the elasticity and friction values are within the valid range of 0.0 to 1.0.

"Invalid color format"

  • Explanation: The color parameter must be a string representing an RGB value.
  • Solution: Verify that the color parameter is in the correct format, such as "(255,255,255)".

Static Body | RyanOnTheInside Related Nodes

Go back to the extension to check out more related nodes.
RyanOnTheInside
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.