Blender V5.3
blender::ClothSimSettings Struct Reference

#include <DNA_cloth_types.h>

Public Attributes

struct LinkNode * cache = nullptr
float mingoal = 0.0f
DNA_DEPRECATED float Cdis = {}
float Cvi = 1.0f
float gravity [3] = {0.0f, 0.0f, -9.81f}
float dt = 0.0f
float mass = 0.3f
DNA_DEPRECATED float structural = 0
float shear = 5.0f
float bending = 0.5f
float max_bend = 0.5f
DNA_DEPRECATED float max_struct = 0
float max_shear = 5.0f
float max_sewing = 0.0f
float avg_spring_len = 0.0f
float timescale = 1.0f
float time_scale = 1.0f
float maxgoal = 1.0f
float eff_force_scale = 1000.0f
float eff_wind_scale = 250.0f
float sim_time_old = 0.0f
float defgoal = 0.0f
float goalspring = 1.0f
float goalfrict = 0.0f
float velocity_smooth = 0.0f
float density_target = 0.0f
float density_strength = 0.0f
float collider_friction = 0.0f
DNA_DEPRECATED float vel_damping = 0
float shrink_min = 0.0f
float shrink_max = 0.0f
float uniform_pressure_force = 0.0f
float target_volume = 0.0f
float pressure_factor = 1.0f
float fluid_density = 0.0f
short vgroup_pressure = 0
char _pad7 [6] = {}
float bending_damping = 0.5f
float voxel_cell_size = 0.1f
int stepsPerFrame = 5
CLOTH_SIMSETTINGS_FLAGS flags = CLOTH_SIMSETTINGS_FLAG_INTERNAL_SPRINGS_NORMAL
DNA_DEPRECATED int preroll = 0
int maxspringlen = 10
short solver_type = 0
short vgroup_bend = 0
short vgroup_mass = 0
short vgroup_struct = 0
short vgroup_shrink = 0
short shapekey_rest = 0
short presets = 2
short reset = 0
struct EffectorWeights * effector_weights = nullptr
CLOTH_BENDING_MODEL bending_model = CLOTH_BENDING_ANGULAR
short vgroup_shear = 0
float tension = 15.0f
float compression = 15.0f
float max_tension = 15.0f
float max_compression = 15.0f
float tension_damp = 5.0f
float compression_damp = 5.0f
float shear_damp = 5.0f
float internal_spring_max_length = 0.0f
float internal_spring_max_diversion = M_PI_4
short vgroup_intern = 0
char _pad1 [2] = {}
float internal_tension = 15.0f
float internal_compression = 15.0f
float max_internal_tension = 15.0f
float max_internal_compression = 15.0f
char _pad0 [4] = {}

Detailed Description

This struct contains all the global data required to run a simulation. At the time of this writing, this structure contains data appropriate to run a simulation as described in Deformation Constraints in a Mass-Spring Model to Describe Rigid Cloth Behavior by Xavier Provot.

I've tried to keep similar, if not exact names for the variables as are presented in the paper. Where I've changed the concept slightly, as in stepsPerFrame compared to the time step in the paper, I've used variables with different names to minimize confusion.

Definition at line 72 of file DNA_cloth_types.h.

Member Data Documentation

◆ _pad0

char blender::ClothSimSettings::_pad0[4] = {}

Definition at line 213 of file DNA_cloth_types.h.

◆ _pad1

char blender::ClothSimSettings::_pad1[2] = {}

Definition at line 208 of file DNA_cloth_types.h.

◆ _pad7

char blender::ClothSimSettings::_pad7[6] = {}

Definition at line 152 of file DNA_cloth_types.h.

◆ avg_spring_len

float blender::ClothSimSettings::avg_spring_len = 0.0f

◆ bending

float blender::ClothSimSettings::bending = 0.5f

Flexion spring stiffness.

Definition at line 94 of file DNA_cloth_types.h.

Referenced by blender::cloth_calc_spring_force().

◆ bending_damping

float blender::ClothSimSettings::bending_damping = 0.5f

Damping of bending springs.

Definition at line 158 of file DNA_cloth_types.h.

Referenced by blender::blo_do_versions_270(), and blender::cloth_calc_spring_force().

◆ bending_model

◆ cache

struct LinkNode* blender::ClothSimSettings::cache = nullptr

UNUSED.

Definition at line 76 of file DNA_cloth_types.h.

◆ Cdis

DNA_DEPRECATED float blender::ClothSimSettings::Cdis = {}

Mechanical damping of springs.

Definition at line 80 of file DNA_cloth_types.h.

Referenced by blender::blo_do_versions_280().

◆ collider_friction

float blender::ClothSimSettings::collider_friction = 0.0f

Friction with colliders.

Definition at line 126 of file DNA_cloth_types.h.

◆ compression

float blender::ClothSimSettings::compression = 15.0f

◆ compression_damp

float blender::ClothSimSettings::compression_damp = 5.0f

Mechanical damping of compression springs.

Definition at line 198 of file DNA_cloth_types.h.

Referenced by blender::blo_do_versions_280(), and blender::cloth_calc_spring_force().

◆ Cvi

float blender::ClothSimSettings::Cvi = 1.0f

Viscous/fluid damping.

Definition at line 82 of file DNA_cloth_types.h.

Referenced by blender::cloth_calc_force().

◆ defgoal

float blender::ClothSimSettings::defgoal = 0.0f

Definition at line 116 of file DNA_cloth_types.h.

Referenced by blender::cloth_apply_vgroup(), and blender::cloth_from_object().

◆ density_strength

float blender::ClothSimSettings::density_strength = 0.0f

Influence of hair density.

Definition at line 124 of file DNA_cloth_types.h.

Referenced by blender::cloth_continuum_step().

◆ density_target

float blender::ClothSimSettings::density_target = 0.0f

Minimum density for hair.

Definition at line 122 of file DNA_cloth_types.h.

Referenced by blender::cloth_continuum_step().

◆ dt

float blender::ClothSimSettings::dt = 0.0f

◆ eff_force_scale

float blender::ClothSimSettings::eff_force_scale = 1000.0f

Scaling of effector forces (see #softbody_calc_forces).

Definition at line 112 of file DNA_cloth_types.h.

◆ eff_wind_scale

float blender::ClothSimSettings::eff_wind_scale = 250.0f

Scaling of effector wind (see #softbody_calc_forces).

Definition at line 114 of file DNA_cloth_types.h.

◆ effector_weights

◆ flags

◆ fluid_density

float blender::ClothSimSettings::fluid_density = 0.0f

Density of the fluid inside or outside the object for use in the hydro-static pressure gradient.

Definition at line 150 of file DNA_cloth_types.h.

Referenced by blender::cloth_calc_force(), and blender::SIM_cloth_solve().

◆ goalfrict

float blender::ClothSimSettings::goalfrict = 0.0f

Definition at line 118 of file DNA_cloth_types.h.

Referenced by blender::cloth_calc_force().

◆ goalspring

float blender::ClothSimSettings::goalspring = 1.0f

Definition at line 117 of file DNA_cloth_types.h.

Referenced by blender::cloth_calc_force(), and blender::do_hair_dynamics().

◆ gravity

float blender::ClothSimSettings::gravity[3] = {0.0f, 0.0f, -9.81f}

Gravity/external force vector.

Definition at line 84 of file DNA_cloth_types.h.

Referenced by blender::blo_do_versions_250().

◆ internal_compression

float blender::ClothSimSettings::internal_compression = 15.0f

◆ internal_spring_max_diversion

float blender::ClothSimSettings::internal_spring_max_diversion = M_PI_4

How much the internal spring can diverge from the vertex normal during creation.

Definition at line 205 of file DNA_cloth_types.h.

Referenced by blender::blo_do_versions_280(), and blender::cloth_build_springs().

◆ internal_spring_max_length

float blender::ClothSimSettings::internal_spring_max_length = 0.0f

The maximum length an internal spring can have during creation.

Definition at line 203 of file DNA_cloth_types.h.

Referenced by blender::cloth_build_springs().

◆ internal_tension

float blender::ClothSimSettings::internal_tension = 15.0f

◆ mass

float blender::ClothSimSettings::mass = 0.3f

The mass of the entire cloth.

Definition at line 88 of file DNA_cloth_types.h.

Referenced by blender::cloth_from_object(), and blender::do_step_cloth().

◆ max_bend

float blender::ClothSimSettings::max_bend = 0.5f

Max bending scaling value, min is "bending".

Definition at line 96 of file DNA_cloth_types.h.

Referenced by blender::cloth_calc_spring_force().

◆ max_compression

float blender::ClothSimSettings::max_compression = 15.0f

◆ max_internal_compression

float blender::ClothSimSettings::max_internal_compression = 15.0f

◆ max_internal_tension

float blender::ClothSimSettings::max_internal_tension = 15.0f

◆ max_sewing

float blender::ClothSimSettings::max_sewing = 0.0f

Max sewing force.

Definition at line 102 of file DNA_cloth_types.h.

Referenced by blender::cloth_calc_spring_force().

◆ max_shear

float blender::ClothSimSettings::max_shear = 5.0f

Max shear scaling value.

Definition at line 100 of file DNA_cloth_types.h.

Referenced by blender::blo_do_versions_280(), and blender::cloth_calc_spring_force().

◆ max_struct

DNA_DEPRECATED float blender::ClothSimSettings::max_struct = 0

Max structural scaling value, min is "structural".

Definition at line 98 of file DNA_cloth_types.h.

Referenced by blender::blo_do_versions_280().

◆ max_tension

float blender::ClothSimSettings::max_tension = 15.0f

◆ maxgoal

float blender::ClothSimSettings::maxgoal = 1.0f

See SB.

Definition at line 110 of file DNA_cloth_types.h.

◆ maxspringlen

int blender::ClothSimSettings::maxspringlen = 10

In percent!; if tearing enabled, a spring will get cut.

Definition at line 169 of file DNA_cloth_types.h.

◆ mingoal

float blender::ClothSimSettings::mingoal = 0.0f

See SB.

Definition at line 78 of file DNA_cloth_types.h.

◆ preroll

DNA_DEPRECATED int blender::ClothSimSettings::preroll = 0

How many frames of simulation to do before we start.

Definition at line 167 of file DNA_cloth_types.h.

◆ presets

short blender::ClothSimSettings::presets = 2

Used for presets on GUI.

Definition at line 183 of file DNA_cloth_types.h.

Referenced by blender::BKE_modifier_blend_read_data(), and blender::BKE_particle_system_blend_read_data().

◆ pressure_factor

float blender::ClothSimSettings::pressure_factor = 1.0f

The scaling factor to apply to the actual pressure. pressure = ((current_volume/target_volume) - 1 + uniform_pressure_force) * pressure_factor

Definition at line 145 of file DNA_cloth_types.h.

Referenced by blender::blo_do_versions_280(), and blender::cloth_calc_force().

◆ reset

short blender::ClothSimSettings::reset = 0

◆ shapekey_rest

short blender::ClothSimSettings::shapekey_rest = 0

◆ shear

float blender::ClothSimSettings::shear = 5.0f

Shear spring stiffness.

Definition at line 92 of file DNA_cloth_types.h.

Referenced by blender::blo_do_versions_280(), and blender::cloth_calc_spring_force().

◆ shear_damp

float blender::ClothSimSettings::shear_damp = 5.0f

Mechanical damping of shear springs.

Definition at line 200 of file DNA_cloth_types.h.

Referenced by blender::blo_do_versions_280(), and blender::cloth_calc_spring_force().

◆ shrink_max

float blender::ClothSimSettings::shrink_max = 0.0f

Max amount to shrink cloth by 0.0f (no shrink), 1.0f (shrink to nothing), -1.0f (double the edge length).

Definition at line 134 of file DNA_cloth_types.h.

Referenced by blender::cloth_shrink_factor().

◆ shrink_min

float blender::ClothSimSettings::shrink_min = 0.0f

Min amount to shrink cloth by 0.0f (no shrink), 1.0f (shrink to nothing), -1.0f (double the edge length).

Definition at line 131 of file DNA_cloth_types.h.

Referenced by blender::blo_do_versions_280(), blender::cloth_shrink_factor(), and blender::do_step_cloth().

◆ sim_time_old

float blender::ClothSimSettings::sim_time_old = 0.0f

Definition at line 115 of file DNA_cloth_types.h.

◆ solver_type

short blender::ClothSimSettings::solver_type = 0

Which solver should be used? txold.

Definition at line 171 of file DNA_cloth_types.h.

◆ stepsPerFrame

int blender::ClothSimSettings::stepsPerFrame = 5

Number of time steps per frame.

Definition at line 163 of file DNA_cloth_types.h.

Referenced by blender::do_init_cloth().

◆ structural

DNA_DEPRECATED float blender::ClothSimSettings::structural = 0

Structural spring stiffness.

Definition at line 90 of file DNA_cloth_types.h.

Referenced by blender::blo_do_versions_280().

◆ target_volume

float blender::ClothSimSettings::target_volume = 0.0f

User set volume. This is the volume the mesh wants to expand to (the equilibrium volume).

Definition at line 140 of file DNA_cloth_types.h.

Referenced by blender::cloth_calc_force().

◆ tension

float blender::ClothSimSettings::tension = 15.0f

◆ tension_damp

float blender::ClothSimSettings::tension_damp = 5.0f

Mechanical damping of tension springs.

Definition at line 196 of file DNA_cloth_types.h.

Referenced by blender::blo_do_versions_280(), and blender::cloth_calc_spring_force().

◆ time_scale

float blender::ClothSimSettings::time_scale = 1.0f

◆ timescale

float blender::ClothSimSettings::timescale = 1.0f

◆ uniform_pressure_force

float blender::ClothSimSettings::uniform_pressure_force = 0.0f

The uniform pressure that is constantly applied to the mesh. Can be negative.

Definition at line 138 of file DNA_cloth_types.h.

Referenced by blender::cloth_calc_force().

◆ vel_damping

DNA_DEPRECATED float blender::ClothSimSettings::vel_damping = 0

Damp the velocity to speed up getting to the resting position.

Definition at line 128 of file DNA_cloth_types.h.

Referenced by blender::blo_do_versions_260(), and blender::blo_do_versions_270().

◆ velocity_smooth

float blender::ClothSimSettings::velocity_smooth = 0.0f

Smoothing of velocities for hair.

Definition at line 120 of file DNA_cloth_types.h.

Referenced by blender::blo_do_versions_250(), and blender::cloth_continuum_step().

◆ vgroup_bend

short blender::ClothSimSettings::vgroup_bend = 0

◆ vgroup_intern

short blender::ClothSimSettings::vgroup_intern = 0

Vertex group for scaling structural stiffness.

Definition at line 207 of file DNA_cloth_types.h.

Referenced by blender::BKE_object_defgroup_remap_update_users(), blender::cloth_apply_vgroup(), and blender::cloth_uses_vgroup().

◆ vgroup_mass

◆ vgroup_pressure

short blender::ClothSimSettings::vgroup_pressure = 0

◆ vgroup_shear

short blender::ClothSimSettings::vgroup_shear = 0

◆ vgroup_shrink

short blender::ClothSimSettings::vgroup_shrink = 0

◆ vgroup_struct

short blender::ClothSimSettings::vgroup_struct = 0

◆ voxel_cell_size

float blender::ClothSimSettings::voxel_cell_size = 0.1f

Size of voxel grid cells for continuum dynamics.

Definition at line 160 of file DNA_cloth_types.h.

Referenced by blender::cloth_continuum_step().


The documentation for this struct was generated from the following file: